Link Clicks-Count Addon

Register an Account
Reply
 
Thread Tools Display Modes
  #21 (permalink)  
Old 01-03-2008, 08:48 AM
Constant Pligger
Pligg Version: 9.7
Pligg Template: Yget
 
Join Date: Nov 2006
Posts: 154
Finally got to try out this add-on on my site, and it seems to work fine. *phew*
But I'm having a small problem AlienHolakres, why is it that the top of the voting box is not aligned with the story title any more? I'm attaching a pic for your understanding. Thanks a lot for this mod.

Reply With Quote
  #22 (permalink)  
Old 01-03-2008, 09:01 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
Do we need to use the votes images that you provided?

Geoserv
Reply With Quote
  #23 (permalink)  
Old 01-03-2008, 09:22 AM
computerbar's Avatar
Pligg Donor
Pligg Version: 9.9.5
Pligg Template: yget,lemontwi
 
Join Date: Nov 2007
Location: UK
Posts: 67
Quote:
Originally Posted by Geoserv View Post
Do we need to use the votes images that you provided?

Geoserv
You can use your own just make sure you name it properly in your main.css (read first post) and adjust your images size and position.
Reply With Quote
  #24 (permalink)  
Old 01-03-2008, 09:34 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
Ok, got it lined up, but for some reason the clicks don't increase.

Geoserv.
Reply With Quote
  #25 (permalink)  
Old 01-03-2008, 11:11 AM
computerbar's Avatar
Pligg Donor
Pligg Version: 9.9.5
Pligg Template: yget,lemontwi
 
Join Date: Nov 2007
Location: UK
Posts: 67
I had the same problem

I am sure you have only once the code, which only track the URL, if outgoinglink are activated Iguess.
but it sorted after this and it adds up every time you click on the link.

Code:
<div class="top"> 
		<div class="toptitle" id="ls_thetitle-{$link_shakebox_index}">

			{if $use_title_as_link eq true}

{if $url_short neq "http://" && $url_short neq "://" && $url_short neq "1"}  <a onclick="sendClickedValue({$link_id},{$link_shakebox_index});" href="{$url}" {if $open_in_new_window eq true} target="_blank"{/if}>{$title_short}</a>
{else}
<a href="{$story_url}" onclick="sendClickedValue({$link_id},{$link_shakebox_index});">{$title_short}</a>
{/if}
{else}
{if $pagename eq "story"}

{if $url_short eq "http://" OR $url_short eq "://" OR $url_short eq "1"}
{$title_short}
{else}
<a href="{$story_url}" onclick="sendClickedValue({$link_id},{$link_shakebox_index});">{$title_short}</a>

{/if}

{else}
<a href="{$story_url}" onclick="sendClickedValue({$link_id},{$link_shakebox_index});">{$title_short}</a>
{/if}
{/if} 
		


</div>

Last edited by computerbar; 01-03-2008 at 11:18 AM.
Reply With Quote
  #26 (permalink)  
Old 01-03-2008, 11:20 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
Ok, I pasted what you provided and the count goes up when I click the story link, but when it loads the story the count shows zero, and when I return to the main page the counts are all zeros.

Geoserv.
Reply With Quote
  #27 (permalink)  
Old 01-03-2008, 11:23 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
Further to the above post, I checked the DB, and it shows clicks on the stories, so its not a DB issue.

Geoserv.
Reply With Quote
  #28 (permalink)  
Old 01-03-2008, 11:26 AM
computerbar's Avatar
Pligg Donor
Pligg Version: 9.9.5
Pligg Template: yget,lemontwi
 
Join Date: Nov 2007
Location: UK
Posts: 67
you sure you have followed the STEP1 and STEP 2 in the first post???
1)add var clicks:
var $clicks=0;

2) after function store_basic add following function:


$clicks=$this->clicks+1;
$sql = "UPDATE " . table_links . " set `clicks`=$clicks WHERE link_id=".$this->id;
$db->query($sql);
} [/COLOR]
Reply With Quote
  #29 (permalink)  
Old 01-03-2008, 11:28 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
I had step 3 in the wrong spot.

My mistake.

Thanks,
Geoserv.
Reply With Quote
  #30 (permalink)  
Old 01-03-2008, 11:30 AM
computerbar's Avatar
Pligg Donor
Pligg Version: 9.9.5
Pligg Template: yget,lemontwi
 
Join Date: Nov 2007
Location: UK
Posts: 67
by the way you need to fix your published post and Home link
http://www.topstumbles.comhttp//www.topstumbles.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit Antispam Addon v 0.1 AnAlienHolakres3 Free Modules 45 12-05-2011 12:48 AM
Special Advertising Add-On for banners Tutorial AnAlienHolakres3 Questions and Comments 19 10-25-2009 08:56 AM
Sig, link, and post count restrictions Cuilan Questions and Comments 4 02-09-2009 04:16 PM
[mod] count clicks instead of votes abcdefgary Questions and Comments 6 06-15-2008 12:34 AM
Vote count and Title Link only on front page tommy818 Questions and Comments 1 10-25-2007 05:40 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development