TinyPortal

Development => Support => Topic started by: mariusfv on April 23, 2011, 06:09:12 PM

Title: Disable download rating
Post by: mariusfv on April 23, 2011, 06:09:12 PM
First of all: Happy Easter to team and to all members!

Its possible to disable download rating ? I search on forum, and I not find this option.

BTW last week I find a bug of TP, but wasn't possible to post on TP site because I can't access the website for weeks, I can access TP for hours and after "page not found"(strange), a team of my ISP come home to me, check everything, change my IP, etc. But the final conclusion is:
"is a problem with TP host server" or
you are IP banned(i don't find a reason for IP ban) or
TP host server/firewall "auto ban you for High Traffic packet send" (lets be serious I use latest Bitdefender IS antivirus-firewall up to date with rules clearly set, and I have my own IP(static IP) used only by me...).

I solve the bug in the dirty way, but I think is a bug, posted here:
http://www.simplemachines.org/community/index.php?topic=430202.0


SMF 2.0 RC5, latest TP version!
Title: Re: Disable download rating
Post by: IchBin on April 23, 2011, 10:02:55 PM
In each article you can allow or deny the option to rate the article.

As for the problem with the site, yes we are aware of it. It is a problem with the server DNS. However I have setup www.tinyportal.net to work on the same site and it does not have any problems. Feel free to use www.tinyportal.net instead of tinyportal.co.uk from now on.
Title: Re: Disable download rating
Post by: mariusfv on April 24, 2011, 12:31:55 AM
I change my dns to opendns, everything is ok till now, it seem that with opendns isn't problems.

BTW I want to disable download rating not article rating, is that possible ?

10x in advance!
Title: Re: Disable download rating
Post by: IchBin on April 24, 2011, 05:30:45 PM
Ah sorry about that. There is no option in TP to disable the ratings at this time. The code would have to manually be removed.
Title: Re: Disable download rating
Post by: mariusfv on April 25, 2011, 10:16:10 AM
If isn't a hard work, can you please tell me what part of code I must to remove and from which file ?
10x in advance.

Quote from: IchBinâ,,¢ on April 24, 2011, 05:30:45 PM
Ah sorry about that. There is no option in TP to disable the ratings at this time. The code would have to manually be removed.
Title: Re: Disable download rating
Post by: IchBin on April 25, 2011, 03:09:39 PM
In Themes/default/TPdlmanager.template.php

Code (find and comment out or remove) Select
<div id="rating">' . $txt['tp-ratingaverage'] . ' ' . ($context['TPortal']['showstars'] ? (str_repeat('<img src="' .$settings['tp_images_url']. '/TPblue.gif" style="width: .7em; height: .7em; margin-right: 2px;" alt="" />', $dlitem['rating_average'])) : $dlitem['rating_average']) . ' (' . $dlitem['rating_votes'] . ' ' . $txt['tp-ratingvotes'] . ')</div>';

if($dlitem['can_rate'])
{
echo '
<form class="ratingoption" style="padding-left: 0;" name="tp_dlitem_rating" action="',$scripturl,'?action=tpmod;sa=rate_dlitem" method="post">
' , $txt['tp-ratedownload'] , '
<select size="1" name="tp_dlitem_rating">';
for($u=$context['TPortal']['maxstars'] ; $u>0 ; $u--)
{
echo '
<option value="'.$u.'">'.$u.'</option>';
}
echo '
</select>
<input type="submit" name="tp_dlitem_rating_submit" value="',$txt['tp_rate'],'" />
<input name="tp_dlitem_type" type="hidden" value="dlitem_rating" />
<input name="tp_dlitem_id" type="hidden" value="'.$dlitem['id'].'" />
<input type="hidden" name="sc" value="', $context['session_id'], '" />
</form>
';
}
else
echo '
<div class="ratingoption"><em class="smalltext">'.$txt['tp-dlhaverated'].'</em></div>';


Title: Re: Disable download rating
Post by: Lesmond on April 25, 2011, 03:53:28 PM
Hope you dont mind IchBin.
Don't remove the '; after the last </div> in the code IchBinâ,,¢ posted ;)
Title: Re: Disable download rating
Post by: mariusfv on April 25, 2011, 04:00:09 PM
10x both for help, you have right, first I remove all and was a syntax error.
10x

Solved