![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| [mod] count clicks instead of votes this small modification will allow pligg admins to count the clicks of the story title as votes, as requested here. notes: 1.) when the user clicks the story title, the vote is calculated and "voted" shows up as well as disables voting again for the user, but the number of votes won't change unless you refresh the page. 2.) i don't recommend this (at all) because like I've said before, if someone places the link/url to that pligg story, the view/vote count of that story won't increase when someone opens up that url. the vote count will only increase if someone votes, or clicks the story link. i dont recommend this! but whatever. erm, ok. here goes. open up link_summary.tpl of your template ( I used yget 9.6 for this example) and find: 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 "://"}
<a href="{$url}" {if $open_in_new_window eq true} target="_blank"{/if}>{$title_short}</a>
{else}
<a href="{$story_url}">{$title_short}</a>
{/if}
{else}
{if $pagename eq "story"}
<a href="{$url}">{$title_short}</a>
{else}
<a href="{$story_url}">{$title_short}</a>
{/if}
{/if}
</div> Code: {else}
<a href="{$story_url}">{$title_short}</a>
{/if}
{/if}
</div> Code: {else}
<a href="{$story_url}"{if $Voting_Method eq 1} onclick="javascript:{$link_shakebox_javascript_vote}"{/if}>{$title_short}</a>
{/if}
{/if}
</div> |
| The Following 5 Users Say Thank You to abcdefgary For This Useful Post: | ||
| Sponsored Links |
| |||
| ozo has posted another method. his allows a separate count for the number of clicks to that story, while my method counts the click as a "vote". check here: counting clicks instead of votes |
| ||||
| even if i don't wind up using this, i wanted to thank gary for acknowledging the communities request and banging this out. its a 'good thing' for the forum
__________________ RunStream :: RSS feed creator | RSS Marketing Platform | TagBlast! ...and a Pligg site on deck! |
| |||
| Will this work with earlier version of Pligg. Im still using 9.1. I hope it does this would be perfect. |
| |||
| Quote:
But yes, I think this will work. But I like ozo's modification better since the view count is separate from the voting. but it's your choice which one to use. |
| |||
| Great mod, thanks! However, would recommend instead of using This {else} <a href="{$story_url}"{if $Voting_Method eq 1} onclick="javascript:{$link_shakebox_javascript_vot e}"{/if}>{$title_short}</a> {/if} {/if} </div> I recommend this {else} <a href="{$story_url}"{if $Voting_Method eq 1 && $link_shakebox_currentuser_votes eq 0 && $link_shakebox_currentuser_reports eq 0} onclick="javascript:{$link_shakebox_javascript_vot e}"{/if}>{$title_short}</a> {/if} {/if} </div> This will about getting the popup saying that the story is already voted ![]()
__________________ iWantTo - What do you want today? -- ToyRating - It's All About Toys -- RIA Forum for RIA Hobbyist -- Yahoo and Craigslist Mashup |
| |||
| |||
| worked for me mostly hey loose, It worked on my site. There are a few little things that you have to take care of. If you copy and paste, you have to make sure that you post the word "vote" as one word, not as "vot" (space) "e" which can happen due to the line break in the post. Also you have to paste the code into 5 different places, not one as implied above. You have to paste the code to replace the three other similar spaces directly above (the <a> links with either $url or $story_url). You will then have to adjust the code you are pasting ($url is either remains $url or changes to $story_url accordingly). Then you have to look down the page into the section for newly submitted stories, and paste the code once there, replacing a similar piece of code. Hope this helps, I know the examples aren't illustrated as clearly as possible, but it should be enough to get you past this little bump in devel. B medicalschoolresources.com |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| counting clicks instead of votes | lumpen5 | Pligg Mods | 41 | 01-04-2008 04:47 PM |
| Query count - logged in vs not logged in? | Simon | Core Development | 7 | 04-05-2007 11:19 PM |
| Counting Clicks instead of Votes | kahunabear | Pligg Mods | 13 | 04-03-2007 08:18 AM |
| Registering Clicks instead of Votes | kahunabear | General Help | 2 | 02-01-2007 05:50 PM |
| Count script. | LG-2 | Pligg Mods | 6 | 10-10-2006 01:19 AM |






Linear Mode

