PDA

View Full Version : Rate it on link display ?!


omaron
01-31-2007, 10:45 PM
Is it possible to add a link to "rate site" directly on links display page?

Put it after the Link details or Report broken links and open in a popup window, same as report broken links, allowing people to rate a link without going to details page?!

John Turner
02-01-2007, 06:04 AM
Hi omaron,

Here simple solution for you.
open '../templates/{YOUR TEMPLATE}/link-display.tpl'
*** find following code

{if $config.broken_links_report}
| <a href="javascript:void(0)" onclick="reportBrokenLink({$link.id})">{$lang.report_broken_link}</a>
{/if}

*** replace with following code

{if $config.broken_links_report}
| <a href="javascript:void(0)" onclick="reportBrokenLink({$link.id})">{$lang.report_broken_link}</a>
{/if}
{if $config.link_rating}
<br /><form action="view-link.php?id={$link.id}" link method="post" style="margin-top: 10px;">
<select name="rating">
<option value="">Site rank</option>
{section name=rating loop=$config.link_rating_max+1 start=1 max=$config.link_rating_max}
<option value="{$smarty.section.rating.index}" {if $smarty.post.rating eq $smarty.section.rating.index}selected="selected"{/if}>{$smarty.section.rating.index}</option>
{/section}
</select>
<input type="submit" name="rate" value="{$lang.rate_link}" />
</form>
{/if}


*** save and close it.

This modification is already present in TODO-list for V2.2

omaron
02-01-2007, 08:46 AM
thanks. will do it.

John Turner
02-01-2007, 08:47 AM
You are welcome,
please post results.

omaron
02-01-2007, 12:47 PM
works fine. some css can be applyed based on template to have button and dropdown menu look nicer.

Simon Gooffin
02-01-2007, 01:08 PM
Hi,
Actually it's a temporary solution :) We are planning to realize AJAX rating in the next version. You might have seen something similar - you mouse over stars for say and click.. Results are displayed without any page reload

omaron
02-01-2007, 01:46 PM
Hi,
Actually it's a temporary solution :) We are planning to realize AJAX rating in the next version. You might have seen something similar - you mouse over stars for say and click.. Results are displayed without any page reload

Yes, i seen it.. is pretty cool.

Actually i had spent a little time with that hack and i have made it all rin is a small popup window. I could not tell u exactly what i did, i am not very good with php and i spent couple hours moving and adding codes here and tehre.. i just know i like the way it works now so far :)

sokrates4612
02-04-2007, 11:41 PM
Hi,
Actually it's a temporary solution :) We are planning to realize AJAX rating in the next version. You might have seen something similar - you mouse over stars for say and click.. Results are displayed without any page reload

Hello you can find some inspiration on http://www.surf.sk/vizitka-418-cestopisna-galeria-fotografii/
(also see a section "Kódy"...)

Jovi
02-24-2007, 05:28 PM
Hi,
Actually it's a temporary solution :) We are planning to realize AJAX rating in the next version. You might have seen something similar - you mouse over stars for say and click.. Results are displayed without any page reload

Hi Simon, I refer to the Pro edition and that I have the unlimited license.

Do u do customisation work? Please PM me and I would need to discuss on a quote.

Regards