forum.coppermine-gallery.net

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
Code: [Select]
        $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
Code: [Select]
        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
Code: [Select]
$pic_html = "<img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /><br />" . $LINEBREAK;e.g.
Code: [Select]
$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