I'm talking about the one that ozo posted.
I think I have to mod something in link.php...but can't quite put my finger on it.


![]() |
| | Thread Tools | Display Modes |
| ||||
|
I'm talking about the one that ozo posted. I think I have to mod something in link.php...but can't quite put my finger on it. |
| |||
|
Hey thanks this is one thing I left out that is nice. Add this code segment to story.php in your root pligg directory //Update number of clicks here $db->query("UPDATE " . table_links . " SET clicks = clicks + 1 WHERE link_id = " . $id); before: // log the pageview $pageview = new Pageview; $pageview->type='story'; $pageview->page_id=$link->id; $pageview->user_id=$current_user->user_id; require_once(mnminclude.'check_behind_proxy.php'); $pageview->user_ip=check_ip_behind_proxy(); That should do the trick. Cheers! |
| ||||
|
Hey Ozo, is this bit of code missing from your original post or is this in response to Genghis? Just trying to understand what this does? |
| |||
|
Okay this is a response to his request. I created it to count the number of clicks when it links (outs) to the story. What he wants is the number of clicks to also increase when a user clicks the "read more" link, so this is basically an add on. If you want your clicks updated in that manner add it, otherwise you can disregard that post.
Last edited by ozo; 06-21-2007 at 03:55 PM. Reason: typo |
| ||||
|
I love the ozo brain! Thanks |
| ||||
|
thats what i thought - just checking. great mod ozo |
| |||
| Quote:
Thanks! Pandora Stations |
| |||
| Quote:
|
| |||
|
Thanks Ozo. This feature seems nice but is it possible to use this if outlinks are disabled. If outlinks are disabled then the out.php is not in use and counting doesn't work. Could the out.php part be inserted to some other file? |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Counting Clicks instead of Votes | kahunabear | Questions and Comments | 14 | 11-21-2010 09:57 PM |
| [mod] count clicks instead of votes | abcdefgary | Questions and Comments | 6 | 06-15-2008 12:34 AM |
| News based on Clicks instead of Votes | mde05 | Questions and Comments | 2 | 01-14-2008 09:32 AM |
| users total votes? | inggenia | Questions and Comments | 2 | 07-09-2007 08:44 AM |
| Registering Clicks instead of Votes | kahunabear | Questions and Comments | 2 | 02-01-2007 07:50 PM |