coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 permissions => Topic started by: thomaskarado on November 23, 2011, 05:51:02 AM

Title: Only admin can upload
Post by: thomaskarado on November 23, 2011, 05:51:02 AM
Hi guys I am new here
How are you all doing, I hope fine.
I could not find in search about uploads aloud only for admin. it is possible?, if yes how is the confiruration please.
Thank you. :)
Title: Re: Only admin can upload
Post by: Αndré on November 23, 2011, 10:48:34 AM
Open the group manager and remove the upload privileges for all other user groups.
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 12:03:05 PM
Oh yes , I miss it thank you very much,
What abou downloads only for members ...I could not find in this "permission" settings.
Thank you
Title: Re: Only admin can upload
Post by: Αndré on November 23, 2011, 12:09:05 PM
What exactly do you mean with "downloads"?
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 12:46:22 PM
when I click in the file opens a download page without login
in the "film page?"
http://gol3d.co.cc/index.php
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 12:59:04 PM
http://comemaria.comeze.com/123.JPG (http://comemaria.comeze.com/123.JPG)
sample
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 01:02:02 PM
lol sorry stil learning operating here
Title: Re: Only admin can upload
Post by: Αndré on November 23, 2011, 01:18:47 PM
What kind of files are they? I assume that aren't pictures but other file types with custom thumbnails?
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 01:26:49 PM
 this is ZIP files 3ds models  :)
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 01:35:38 PM
Yes ZIP files with costom thmbnails
Title: Re: Only admin can upload
Post by: Αndré on November 23, 2011, 02:06:32 PM
Without code modification you have to set the access level to "thumbnail only" in the group manager.
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 02:21:31 PM
Thank you
But with this settings visitors can not access  information and coments page.
Title: Re: Only admin can upload
Post by: Αndré on November 23, 2011, 02:46:49 PM
That's correct. If you need that functionality you have to edit the code. There's no config option.
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 02:50:58 PM
thank you for you attention. :)
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 04:41:53 PM
where do i find this code...I could not find please
Title: Re: Only admin can upload
Post by: Αndré on November 23, 2011, 05:04:46 PM
Copy the function theme_html_picture from themes/sample/theme.php to your theme's theme.php file if it doesn't exist. Then, find
        $pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a><br />" . $LINEBREAK;
and replace with
        if (USER_ID) {
            $pic_html = "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a><br />" . $LINEBREAK;
        } else {
            $pic_html = "<img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /><br />" . $LINEBREAK;
        }
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 05:15:26 PM
Wow good...very good
Nice thank you very much
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 05:20:35 PM
mannnnn it works but.........i just notice a thing........how the user can know that he need to login to download...... :'(
Title: Re: Only admin can upload
Post by: Αndré on November 23, 2011, 05:24:53 PM
Have a look at the code change (it's not hard to understand, even if you're not familiar with coding). Just add your message to that line
$pic_html = "<img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /><br />" . $LINEBREAK;
e.g.
$pic_html = "<img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /><br />Login to download this file" . $LINEBREAK;
Title: Re: Only admin can upload
Post by: thomaskarado on November 23, 2011, 05:33:48 PM
Yes Now seems to be fine...thank you very much Sir.... ;D