You are here

README.txt in Recently Read 7.2

Same filename and directory in other branches
  1. 8 README.txt
  2. 6 README.txt
  3. 7.3 README.txt
  4. 7 README.txt
// $Id$


== SUMMARY ==


The Recently Read module displays the history of recently read content (nodes) 
a particular user has viewed. Each authenticated user has its own history 
recorded, so this module may be useful i.e. for displaying recently viewed 
products on the e-commerce site. The history is displayed as a block and each 
content type gets its own block.

Currently, Recently Read does not track history for anonymous users.

If you need more flexibility, this module can be replaced by properly configured
Flag, Rules and Views modules. Check out the following links for more details:
* http://drupal.org/node/405754
* http://jan.tomka.name/blog/list-recently-viewed-nodes-drupal

For a full description of the module, visit the project page:
  http://drupal.org/sandbox/pgorecki/1080970

To submit bug reports and feature suggestions, or to track changes:
  http://drupal.org/project/issues/1080970


== REQUIREMENTS ==

None.


== INSTALLATION ==

* Install as usual, see http://drupal.org/node/70151 for further information.


== CONFIGURATION ==

* Customize the module settings in Administer >> Site configuration >> 
  Recently read content. On this pace you can:

  - Select which content types will should be tracked by the module

    After enabling content type tracking, go to Administer >> Site building >>
    Blocks to configure the block settings of each tracked content type.

  - Recently read list length specifies the maximum number of nodes 
    per user per content type that will be stored in a databse. Note that this
    is different from "Maximum number of links to display in the block" setting
    available in the Recently read block configutation options.


== CUSTOMIZATION ==

Recently read module lacks UI for advanced configuration, but most tasks can
be easily implemented by code snippets or in the theme layer.

* Displaying more than a node title

  By default, Recently Read block displays a list of links to node titles.
  You can customize the output by overriding theme_recently_read_item() and
  theme_recently_read_item_list() functions in your theme.
  
  For example, to display an image field and a link:
  
  function mytheme_recently_read_item($variables) {
    $item = $variables['item'];
    $node = node_load($item['nid']);
    if ($node->type=='article') {
      $image = field_view_field('node', $node, 'field_image', 'default');
    }
    return l($item['title'], 'node/' . $item['nid']) . render($image);
  }

* Multiple content types in the same block

  To display multiple content types in the same block, create a new block with PHP body
  and modify the following examlpe to your needs:

  <?php
  // disable page caching if this block is displayed
  recently_read_disable_page_cache();
  // get 3 recently read pages and articles items for current user
  // (you can skip the last argument to display all items)
  global $user;
  user_is_logged_in() ? $user_id = $user->uid : $user_id = 0;
  $items = recently_read_get_read_items(array('page', 'article'), $user_id, 3);
  // get html string with all items
  return theme('recently_read_item_list', array('items' => $items));
  ?>


== CONTACT ==

Current maintainer:
* Przemyslaw Gorecki (pgorecki) - http://drupal.org/user/642012

File

README.txt
View source
  1. // $Id$
  2. == SUMMARY ==
  3. The Recently Read module displays the history of recently read content (nodes)
  4. a particular user has viewed. Each authenticated user has its own history
  5. recorded, so this module may be useful i.e. for displaying recently viewed
  6. products on the e-commerce site. The history is displayed as a block and each
  7. content type gets its own block.
  8. Currently, Recently Read does not track history for anonymous users.
  9. If you need more flexibility, this module can be replaced by properly configured
  10. Flag, Rules and Views modules. Check out the following links for more details:
  11. * http://drupal.org/node/405754
  12. * http://jan.tomka.name/blog/list-recently-viewed-nodes-drupal
  13. For a full description of the module, visit the project page:
  14. http://drupal.org/sandbox/pgorecki/1080970
  15. To submit bug reports and feature suggestions, or to track changes:
  16. http://drupal.org/project/issues/1080970
  17. == REQUIREMENTS ==
  18. None.
  19. == INSTALLATION ==
  20. * Install as usual, see http://drupal.org/node/70151 for further information.
  21. == CONFIGURATION ==
  22. * Customize the module settings in Administer >> Site configuration >>
  23. Recently read content. On this pace you can:
  24. - Select which content types will should be tracked by the module
  25. After enabling content type tracking, go to Administer >> Site building >>
  26. Blocks to configure the block settings of each tracked content type.
  27. - Recently read list length specifies the maximum number of nodes
  28. per user per content type that will be stored in a databse. Note that this
  29. is different from "Maximum number of links to display in the block" setting
  30. available in the Recently read block configutation options.
  31. == CUSTOMIZATION ==
  32. Recently read module lacks UI for advanced configuration, but most tasks can
  33. be easily implemented by code snippets or in the theme layer.
  34. * Displaying more than a node title
  35. By default, Recently Read block displays a list of links to node titles.
  36. You can customize the output by overriding theme_recently_read_item() and
  37. theme_recently_read_item_list() functions in your theme.
  38. For example, to display an image field and a link:
  39. function mytheme_recently_read_item($variables) {
  40. $item = $variables['item'];
  41. $node = node_load($item['nid']);
  42. if ($node->type=='article') {
  43. $image = field_view_field('node', $node, 'field_image', 'default');
  44. }
  45. return l($item['title'], 'node/' . $item['nid']) . render($image);
  46. }
  47. * Multiple content types in the same block
  48. To display multiple content types in the same block, create a new block with PHP body
  49. and modify the following examlpe to your needs:
  50. // disable page caching if this block is displayed
  51. recently_read_disable_page_cache();
  52. // get 3 recently read pages and articles items for current user
  53. // (you can skip the last argument to display all items)
  54. global $user;
  55. user_is_logged_in() ? $user_id = $user->uid : $user_id = 0;
  56. $items = recently_read_get_read_items(array('page', 'article'), $user_id, 3);
  57. // get html string with all items
  58. return theme('recently_read_item_list', array('items' => $items));
  59. ?>
  60. == CONTACT ==
  61. Current maintainer:
  62. * Przemyslaw Gorecki (pgorecki) - http://drupal.org/user/642012