Download & Extend

Patch to support content profile module

Project:User Visits
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

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

AttachmentSize
user_visits_content_profile.patch537 bytes

Comments

#1

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

Maybe something wrong in the file patch?

#2

Category:feature request» bug report

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();
           }

#3

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

AttachmentSize
error.jpg 52.7 KB

#4

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.

#5

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

#6

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