Advanced search  

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

Pages: [1]   Go Down

Author Topic: Only admin can upload  (Read 8465 times)

0 Members and 1 Guest are viewing this topic.

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Only admin can upload
« 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. :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Only admin can upload
« Reply #1 on: November 23, 2011, 10:48:34 am »

Open the group manager and remove the upload privileges for all other user groups.
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #2 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Only admin can upload
« Reply #3 on: November 23, 2011, 12:09:05 pm »

What exactly do you mean with "downloads"?
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #4 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
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #5 on: November 23, 2011, 12:59:04 pm »

Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #6 on: November 23, 2011, 01:02:02 pm »

lol sorry stil learning operating here
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Only admin can upload
« Reply #7 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?
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #8 on: November 23, 2011, 01:26:49 pm »

 this is ZIP files 3ds models  :)
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #9 on: November 23, 2011, 01:35:38 pm »

Yes ZIP files with costom thmbnails
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Only admin can upload
« Reply #10 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.
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #11 on: November 23, 2011, 02:21:31 pm »

Thank you
But with this settings visitors can not access  information and coments page.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Only admin can upload
« Reply #12 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.
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #13 on: November 23, 2011, 02:50:58 pm »

thank you for you attention. :)
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #14 on: November 23, 2011, 04:41:53 pm »

where do i find this code...I could not find please
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Only admin can upload
« Reply #15 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;
        }
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #16 on: November 23, 2011, 05:15:26 pm »

Wow good...very good
Nice thank you very much
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #17 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...... :'(
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Only admin can upload
« Reply #18 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;
Logged

thomaskarado

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Only admin can upload
« Reply #19 on: November 23, 2011, 05:33:48 pm »

Yes Now seems to be fine...thank you very much Sir.... ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.