NO "add to favorites" for anyone but me NO "add to favorites" for anyone but me
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

NO "add to favorites" for anyone but me

Started by grizel, November 30, 2004, 08:34:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

grizel

How do i turn off the option for anyone and their uncle (logged in or not) to add pictures as favorites? I want that option OFF or only avavible to me, the admin.

Casper

You can turn off the ability to download the favourites as a zip, in the config settings for 'general settings'.

The actual act of 'add to favourites' makes no change to the gallery, it just amends the cookie on the users machine.  This will change in the next version, where it is in the database, but it still only affects that user.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

grizel

i have the zip option off, but can you tell me which strip of code where I would disable how?

Casper

Open displayimage.php, and find;
$info[$lang_picinfo['addFavPhrase']] = "<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . "\">" . $lang_picinfo['addFav'] . '</a>';
    } else {
        $info[$lang_picinfo['addFavPhrase']] = "<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . "\">" . $lang_picinfo['remFav'] . '</a>';


Change it to;
//$info[$lang_picinfo['addFavPhrase']] = "<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . "\">" . $lang_picinfo['addFav'] . '</a>';
    } else {
        //$info[$lang_picinfo['addFavPhrase']] = "<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . "\">" . $lang_picinfo['remFav'] . '</a>';
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here