SOLVED FAP SUPPORT - Guest Rating


Subject: FAP SUPPORT - Guest Rating
Hello, i have a problem with my personal album. Guests are rating pictures and is screwing up and cheats the ratings!
I dont have FAP but the "old" versjon of smartors gallery(FAP is an addon to this) and I dont (yet) want to upgrade to FAP since my album is very custom modded.
I need to stop guests from rating on album_page.php(album_showpage in FAP) and album_rate.php. I have searched alot and only found some code for FAP that i tried to adapt. But it dont work. :( I have also tried to use some code from the FAP but no luck.

Can someone please help me "hard-code" an simple fix for blocking out guests from rating anything? I want to allow guest to watch pictures but not rate. I saw MightyGordon wrote somewhere that this is fixed in the latest version of FAP so hope somebody knows what to do. I can send or post my files if needed!
Thank you very much for support!

Profile PM  
Subject: Re: Guest Rating
I don't have Smartor installed to check this, but see if this will do what you want

OPEN album_page.php
FIND
Code: [Download] [Hide] [Select]
if ($album_config['rate'])
{
$template->assign_block_vars('rate_switch', array());
}

REPLACE WITH
Code: [Download] [Hide] [Select]
if ($album_config['rate'] && $userdata['session_logged_in'])
{
$template->assign_block_vars('rate_switch', array());
}


OPEN album_rate.php
FIND
Code: [Download] [Hide] [Select]
if( $album_config['rate'] == 0 )
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}

REPLACE WITH
Code: [Download] [Hide] [Select]
if( ($album_config['rate'] == 0) || (!$userdata['session_logged_in']) )
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}

Profile PM  
Subject: Re: Guest Rating
That did work! Perfect :D Minc over at Smartors made another mod on album_page so it has an extra rating field. I can remove that again from the template :thanks: :thanks: :thanks: . This did the trick! Thank you very much for help. :thanks:

Profile PM  
Subject: Re: Guest Rating
Your Welcome

Glad it work for you.

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.2351s (PHP: 8% SQL: 92%)
SQL queries: 13 - Debug Off - GZIP Enabled