I tried to use this project for my ecommerce website built with ubercart. But as I have several product classes (so several node types), I didn't manage to display only one block for all my product classes. Is there a way to have a key that would be a product (available for every product classes) or something like this ?

Comments

pgorecki’s picture

I'm planning to integrate this module with Views in the near future, stay tuned.

christelle41’s picture

Thanks a lot, I stay tuned.

imoreno’s picture

Any updates on this feature? I think that it is mandatory to have one block that will display all recent node types

BR
Itzhak

pgorecki’s picture

Starting from alpha4 you can do it via a custom block with php code:

// get all recently read pages and articles items for current user
global $user;
$items = recently_read_get_read_items(array('page', 'article'), $user->uid);

// get html string with all items
return theme('recently_read_item_list', array('items' => $items));
pgorecki’s picture

Status: Active » Fixed
imoreno’s picture

THX,
Working very well for me.
1. what do i had to add to the code in order to limit the number of nodes that are displayed e.g 5 ?
2. is it possible to add a "clean all" link at the bottom of this custom block?

BR
Itzhak

pgorecki’s picture

ad. 1. you can specify number of nodes as a 3rd parameter, i.e.

$items = recently_read_get_read_items(array('page', 'article'), $user->uid, $node_count);

ad. 2. I'm not planning to add such functionality in the near future. You can do it programmatically by removing node entries in recently_read_nodes table (logged in user), or by removing $_SESSION["recently_read-$node_type"] array (anonymous). Any patches are welcome.

imoreno’s picture

Adding just the parameter $node_count as in your example results an error : Undefined variable: node_count

Where exactly this parameter needs to be added?

BR
Itzhak

pgorecki’s picture

Simply replace $node_count with a constant:

// display 10 nodes
$items = recently_read_get_read_items(array('page', 'article'), $user->uid, 10);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.