Here's a patch that modifies the Drupal 6 version to support the Content Profile module. It also removes support for usernode and nodeprofile. These module have been replaced by content profile.

Please review this minor change.

Regards,

Marius

CommentFileSizeAuthor
#3 error.jpg52.7 KBGolDRoger
user_visits_content_profile.patch537 bytesmariusooms

Comments

GolDRoger’s picture

mhhh I've tryed to install the patch but continue to fail.

Maybe something wrong in the file patch?

tberger97’s picture

Category: feature » bug

I believe the patch is missing the closing } for the if statement. Add that and should be good to go. Code I used is below.

if (module_exists('content_profile') && is_content_profile($node->type)) {
           //Don't count if role is hidden
           if (!user_visit_is_hidden($user)) {
             $referer = referer_uri();
           }
GolDRoger’s picture

StatusFileSize
new52.7 KB

mhhh I tryed to apply the patch but still continue to showing me tish error (see attached file)

Tamela’s picture

Has this been fixed? Is this going to be in the next version of this module? I've never been able to do the patch thing so I'm waiting for the next version of this module. I have three sites using Content Profile and I'd love to have this module.

pydubreucq’s picture

Hi,
I think it will be a very good thing too...
Thanks by advance ;)
Bye

mauriziopinotti’s picture

if you're having problems with patch #1 try this:

--- user_visits.module.orig	2010-10-20 00:00:03.000000000 +0200
+++ user_visits.module	2010-10-20 00:00:11.000000000 +0200
@@ -201,7 +201,7 @@
   // Record visits on profile nodes
   if (arg(0) == 'node' && is_numeric(arg(1)) && !arg(2)) {
     $node = node_load(array('nid' => arg(1)));
-    if ((module_exists('nodeprofile') && is_nodeprofile($node->type)) OR (module_exists('usernode') && $nody->type == USERNODE_CONTENT_TYPE)) {
+    if (module_exists('content_profile') && is_content_profile($node->type)) {
       //Don't count self-clicks
       if ($user->uid != $node->uid) {
         //Count view
amitgoyal’s picture

Status: Needs review » Fixed

Thanks all! This has been fixed in 6.x-1.x-dev.

Status: Fixed » Closed (fixed)

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