The recently viewed nodes module allows you to log any nodes
a user visits. This works for both anonymous users and
logged in users. You can limit what nodes are logged by type
and to specific roles.

The list can also be saved to database, with flexible admin
settings that will allow you to tailor the module to your
server.

An example use of the module is for UberCart. You can log
anonymous nodes visits and when the user logs in, it
will automatically save the list for that user.

You may also use the public function recently_viewed_nodes_session_manage('view')
to get an array'd list of nodes visited. This is useful for
custom coding.

This module does not exist in any way. There is a way of getting a list of recently visited nodes for anon users using the triggers module I believe. However, my module provides a module that works with both anon and logged in users.

This is a working copy that is used on live websites. Please try it out for yourself.

Comments

Amarjit’s picture

Here is a link to the sandbox: http://drupal.org/node/1098004

Further Info:
The list is designed to be used as say a 'recently viewed' block that the user can use to go back to products, etc.

Amarjit’s picture

tr’s picture

Status: Active » Needs work

Link to sandbox in #1 is wrong.

This module seems to duplicate functionality. A search on drupal.org for similar functionality shows lots of examples, including one interesting blog post http://jan.tomka.name/blog/list-recently-viewed-nodes-drupal

Given that, I'd like to see a much more thorough statement of why this is needed.

tr’s picture

I'd like to point out that this also sounds the same as another project application: http://drupal.org/sandbox/sepehr/1073796

tr’s picture

Component: new project application » module
Status: Needs work » Postponed (maintainer needs more info)

The original poster still has not posted a link to a sandbox project, and has not responded to comment #3. It has been 11 weeks. I have notified the applicant via his/her contact tab that I intend to deny this application and close this issue two weeks from now, unless the requested information is supplied.

Amarjit’s picture

TR,

Sorry for the late reply and I recieved your e-mail - thanks for that.

In regards to the link you posted, I have already read thsi before when I was looking for a solution. However, this solution does not work for anonymous users. A problem also arises when using caching.
-
My module fixes all this by managing it's own sessions. A great feature I have implemented on top of this is the fact that when a user logs in, the session is automatically assigned to that user. The session can be then saved to the database against that user.
If the user was to log in at a later date, his 'recent' list would automatically be loaded.

In the case of the user having a saved list already and having a anonymous list - a setting can be enabled to overwrite it either way.

As you can see from my module, it makes use of the database, which the other module you suggested does not. My module also allows you to limit the recently viewed to certain roles and content types.

Hope this helps,
Amarjit.

Amarjit’s picture

Status: Postponed (maintainer needs more info) » Needs review

Changing status.

tr’s picture

Status: Needs review » Postponed (maintainer needs more info)

Can't be "needs review" because there is no code yet. You still haven't posted a link to your sandbox - I mentioned this in both #3 and #5.

If that other project lacks some features you think are necessary, a better course would be to collaborate to build a module that satisfies both your needs. The resulting module will be more useful to the community, and having two people work on a project will produce a much better result than having just one. The community isn't well-served by needless duplication of effort.

Amarjit’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I commited the code, that I had updated as well. It has disappeared for some reason.

I willcontact the author of the 'similar' project to see if we can enhance the current module.

Closing project.

MakeOnlineShop’s picture

Hello Amarjit,

As I haven't found any other working module showing recently viewed nodes to anonymous users, can you please provide a link to your module ?

Thanks a lot.

jeff.maes’s picture

Take a look at this module: http://drupal.org/project/flag

Amarjit’s picture

Hello,

Got your e-mail. Here is the sandbox URL. Hope this helps:

http://drupal.org/sandbox/AmarjitBharath/1097470

Please note it has only been developed in Drupal 6.

Cheers,
Amarjit

MakeOnlineShop’s picture

Thank you so much.

Amarjit’s picture

Your welcome

Amarjit’s picture

I have updated this module to allow a 'force re-check' nodes. This basically refreshes the node data and ensures the user has access to the node and it exists. If not - the node is dropped from the list.

I have also added Title, Path and 'Node type' to stored within this session. This way, no node loads need to be carried out. It may be a feature in the future to refresh nodes on a time interval.

I have also added functionality to force node refresh when users are logging in. This is useful for wish-lists, etc.

There is a 'template' within the module file. This module can be installed and used straight away. It should be moved a tpl file later on though.

This module was tested before I did these changes. However, there seems to be a problem with user_save not storing the details for logged in users. This is not a priority for me at the moment.
So this part of the module is non-functioning.

Cheers,
Amarjit

avpaderno’s picture

Issue summary: View changes
Status: Closed (duplicate) » Closed (won't fix)