FAP SUPPORT - Guest Rating »  Show posts from    to     

Icy Phoenix


Archived phpBB Topics (Styles, Mods, Support) - FAP SUPPORT - Guest Rating



thomastoget [ Fri 04 Jan, 2008 14:44 ]
Post 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!


Artie [ Tue 08 Jan, 2008 02:58 ]
Post 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: [Hide] [Select]
if ($album_config['rate'])
{
$template->assign_block_vars('rate_switch', array());
}

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


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

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


thomastoget [ Tue 08 Jan, 2008 15:01 ]
Post subject: Re: Guest Rating
That did work! Perfect 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 . This did the trick! Thank you very much for help.


Artie [ Tue 08 Jan, 2008 23:40 ]
Post subject: Re: Guest Rating
Your Welcome

Glad it work for you.




Powered by Icy Phoenix