https://www.icyphoenix.com/viewtopic.php?f=26&t=3394
-----------------------------------
thomastoget
Fri 04 Jan, 2008 14:44

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

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

OPEN [b]album_page.php[/b]
FIND
[codeblock]if ($album_config['rate'])
{
	$template->assign_block_vars('rate_switch', array());
}[/codeblock]
REPLACE WITH
[codeblock]if ($album_config['rate'] && $userdata['session_logged_in'])
{
	$template->assign_block_vars('rate_switch', array());
}[/codeblock]

OPEN [b]album_rate.php[/b]
FIND
[codeblock]if( $album_config['rate'] == 0 )
{
	message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}
[/codeblock]
REPLACE WITH
[codeblock]if( ($album_config['rate'] == 0) || (!$userdata['session_logged_in']) )
{
	message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}[/codeblock]


-----------------------------------
thomastoget
Tue 08 Jan, 2008 15:01

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:


-----------------------------------
Artie
Tue 08 Jan, 2008 23:40

Re: Guest Rating
-----------------------------------
[smiley smilie=7 fontcolor=000000 shadowcolor=000000 shieldshadow=1]Your Welcome[/smiley] 

Glad it work for you.


