forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: gregik on August 24, 2004, 10:16:20 am

Title: Guests and Favorites
Post by: gregik on August 24, 2004, 10:16:20 am
Hello!

How can I restrict guests to add files to Favorites?
Title: Re: Guests and Favorites
Post by: Joachim Müller on August 24, 2004, 10:25:49 am
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, find
Code: [Select]
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();
} else {
and replace it with something like this (not tested though):
Code: [Select]
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
Title: Re: Guests and Favorites
Post by: gregik on August 24, 2004, 10:57:25 am
Thanks!  :)
Title: Re: Guests and Favorites
Post by: Joachim Müller on August 24, 2004, 10:59:05 am
issue solved then? Did the code I posted work for you?

GauGau
Title: Re: Guests and Favorites
Post by: gregik on August 24, 2004, 11:11:05 am
nope ... it does not work

I removed all cookies and still it downloads zip file