Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 01-03-2008, 07:48 AM
Constant Pligger
Pligg Version: 9.7
Pligg Template: Yget
 
Join Date: Nov 2006
Posts: 160
Thanks: 26
Thanked 1 Time in 1 Post
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, 08:01 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
Do we need to use the votes images that you provided?

Geoserv
Reply With Quote
  #23 (permalink)  
Old 01-03-2008, 08:22 AM
computerbar's Avatar
Pligg Donor
Pligg Version: 9.9.5
Pligg Template: yget,lemontwi
 
Join Date: Nov 2007
Location: UK
Posts: 79
Thanks: 32
Thanked 9 Times in 8 Posts
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.
__________________
PeekLocal

Unmissable pligg Mods..
Reply With Quote
  #24 (permalink)  
Old 01-03-2008, 08:34 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
Ok, got it lined up, but for some reason the clicks don't increase.

Geoserv.
Reply With Quote
  #25 (permalink)  
Old 01-03-2008, 10:11 AM
computerbar's Avatar
Pligg Donor
Pligg Version: 9.9.5
Pligg Template: yget,lemontwi
 
Join Date: Nov 2007
Location: UK
Posts: 79
Thanks: 32
Thanked 9 Times in 8 Posts
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>
__________________
PeekLocal

Unmissable pligg Mods..

Last edited by computerbar; 01-03-2008 at 10:18 AM..
Reply With Quote
  #26 (permalink)  
Old 01-03-2008, 10:20 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
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, 10:23 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
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, 10:26 AM
computerbar's Avatar
Pligg Donor
Pligg Version: 9.9.5
Pligg Template: yget,lemontwi
 
Join Date: Nov 2007
Location: UK
Posts: 79
Thanks: 32
Thanked 9 Times in 8 Posts
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]
__________________
PeekLocal

Unmissable pligg Mods..
Reply With Quote
The Following User Says Thank You to computerbar For This Useful Post:
  #29 (permalink)  
Old 01-03-2008, 10:28 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 849
Thanks: 74
Thanked 49 Times in 45 Posts
I had step 3 in the wrong spot.

My mistake.

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

Unmissable pligg Mods..
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit Antispam Addon v 0.1 AnAlienHolakres3 Pligg Modules 22 10-01-2008 05:08 PM
Special Advertising Add-On for banners Tutorial AnAlienHolakres3 Modification Tutorials 18 07-30-2008 09:25 AM
[mod] count clicks instead of votes abcdefgary Modification Tutorials 8 06-14-2008 11:34 PM
Pligg Team Addon Installation GUIDE & MANUAL AnAlienHolakres3 Modification Tutorials 17 04-07-2008 03:41 PM
Vote count and Title Link only on front page tommy818 General Help 1 10-25-2007 04:40 AM


Search Engine Friendly URLs by vBSEO 3.2.0