Only admin can upload Only admin can upload
 

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

Main Menu

Only admin can upload

Started by thomaskarado, November 23, 2011, 05:51:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thomaskarado

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. :)

Αndré

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

thomaskarado

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

Αndré

What exactly do you mean with "downloads"?

thomaskarado

when I click in the file opens a download page without login
in the "film page?"
http://gol3d.co.cc/index.php


thomaskarado

lol sorry stil learning operating here

Αndré

What kind of files are they? I assume that aren't pictures but other file types with custom thumbnails?

thomaskarado

 this is ZIP files 3ds models  :)

thomaskarado

Yes ZIP files with costom thmbnails

Αndré

Without code modification you have to set the access level to "thumbnail only" in the group manager.

thomaskarado

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

Αndré

That's correct. If you need that functionality you have to edit the code. There's no config option.

thomaskarado


thomaskarado

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

Αndré

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;
        }

thomaskarado

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

thomaskarado

mannnnn it works but.........i just notice a thing........how the user can know that he need to login to download...... :'(

Αndré

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;

thomaskarado

Yes Now seems to be fine...thank you very much Sir.... ;D