News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

Guests and Favorites

Started by gregik, August 24, 2004, 10:16:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gregik

Hello!

How can I restrict guests to add files to Favorites?

Joachim Müller

those are client-sided favorites, nothing is done to your page. If you want to stop them from downloading the favorites as zip, edit zipdownload.php, findif ($CONFIG['enable_zipdownload'] != 1) {
//someone has entered the url manually, while the admin has disabled zipdownload
pageheader($lang_error);
starttable('-2', $lang_error);
print <<<EOT
<tr>
        <td align="center" class="tableb">
      {$lang_errors['perm_denied']}
      </td>
</tr>
EOT;
endtable();
pagefooter();
ob_end_flush();
} else {
and replace it with something like this (not tested though):if ($CONFIG['enable_zipdownload'] != 1) {
//someone has entered the url manually, while the admin has disabled zipdownload
pageheader($lang_error);
starttable('-2', $lang_error);
print <<<EOT
<tr>
        <td align="center" class="tableb">
      {$lang_errors['perm_denied']}
      </td>
</tr>
EOT;
endtable();
pagefooter();
ob_end_flush();
} elseif (!$USER){
//a guest tries to download, send him away
pageheader($lang_error);
starttable('-2', $lang_error);
print <<<EOT
<tr>
        <td align="center" class="tableb">
      You don't have permission to download your favorites as zip file. If you were registered and logged in, you would be able to do so. Why don't you <a href="register.php">register now</a>?
      </td>
</tr>
EOT;
endtable();
pagefooter();
ob_end_flush();
} else {


GauGau

gregik


Joachim Müller

issue solved then? Did the code I posted work for you?

GauGau

gregik

nope ... it does not work

I removed all cookies and still it downloads zip file