Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Upload for Users  (Read 13715 times)

0 Members and 1 Guest are viewing this topic.

mexfred

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Upload for Users
« on: December 11, 2006, 05:09:15 pm »

May be I should go away from the computer and play with anything more simple,
but 2 days ago, when I installed coopermine, I opend for my kids private galerys.
When I remember correct, there was a buttom to add fotos/files. It was possible
to upload 5 pictures at once. Today I cann`t find this funcction.
May be anybody can tell me, should I go on with playing easy games or anybody
has an idea to fix the problem.

Thanks
« Last Edit: December 14, 2006, 08:08:46 am by GauGau »
Logged

mexfred

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Upload for Users
« Reply #1 on: December 11, 2006, 05:40:22 pm »

when I`m (administrator) in, admin or user mode, I find the buttom to add fotos/files,
in as a user, no buttom.
May be I`m not so silly as I thought. :) :) :) :) ;D ;D ;D

How I get the buttom for my users ????????????????????????
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload for Users
« Reply #2 on: December 11, 2006, 08:04:51 pm »

Read the documentation. You need to allow them to upload to their personal galleries or to public galleries.

Joachim
Logged

mexfred

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Upload for Users
« Reply #3 on: December 11, 2006, 08:22:57 pm »

Hallo Joachim,
ich schreibe Dir auf Deutsch, denke Du verstehst das.
Habe die Doku gelesen, in der Usereinstellung ist das Uploaden fuer Privat Galerys freigegeben.
Funktionierte auch am Anfang. Hatte andere Probleme, konnte mich nicht einloggen hatte deshalb
auf die 4.10 upgedatet. Nach Cookie loeschen war dieses Problem dann beseitigt, Danke an Sami.
Wuesste nicht wo ich noch einen Einstellungsfehler bei den Usern habe, habe dies mind. 10 mal
angeschaut. ??? ??? ??? ??? ??? ??? ???

Wenn Du Dich nochmals bemuehen wuerdest, Danke.

Gruss Fred
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload for Users
« Reply #4 on: December 11, 2006, 08:27:20 pm »

On the regular support board only English is acceptable, as only Stramm and I do speak German, while the other devs don't. Additionally, your postings are suppossed to serve as a reference for others, that's the whole idea of running a support board. Therefor, I'll ignore your posting in German. This is not a private chat between you and me - it's a support board.
Logged

mexfred

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Upload for Users
« Reply #5 on: December 11, 2006, 08:37:10 pm »

Sorry, taht I wrote in German,
your first answer was to read the documentation, I did,
the permissions for User are set correct, upload to privat albums is permitted.

First the problem did not exist, it came up after updating to 4.10 because I got other
problems, thanks to Sami for fixing.

Now a user cannot upload fotos/files, before it was possible.

Thanks for help


Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload for Users
« Reply #6 on: December 11, 2006, 08:40:59 pm »

Post a link and non-admin test user account then. Posting a screenshot of your groups page (using "additional options" when composing your message and attaching the screenshot to your posting) might help as well.
Logged

mexfred

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Upload for Users
« Reply #7 on: December 11, 2006, 08:56:34 pm »

Hey again,
its done, you can use "tester" with password "test"
group settings you fin attached.

Fred
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload for Users
« Reply #8 on: December 11, 2006, 09:22:40 pm »

OK, great. Now we have a test user name and correspoding password. If we had a link to your page, it would be even more helpfull ::).
Logged

mexfred

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Upload for Users
« Reply #9 on: December 11, 2006, 09:34:10 pm »

Sorry,

the page is http://www.espeleto.com/fotogalerie/index.php

Sorry again.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload for Users
« Reply #10 on: December 11, 2006, 09:44:56 pm »

OK, I see. Looks like a bug to me. Moving accordingly. Try turning on public uploads for the registered group.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload for Users
« Reply #11 on: December 14, 2006, 08:07:51 am »

OK, this is actually a bug that existed both in the stable as well as the devel branch. When a user is member of a group that doesn't have the privilege to upload to public albums, but has the privilege to have a personal gallery, the upload link is not being displayed. When going to the upload screen manually, the user gets an error message.
I updated both branches of the SVN repository with the fixes below. Fixes will therefor be in cpg1.4.11 and cpg1.5.0 (once they get released).

To fix this manually, perform the steps outlined below:

1) upload.php
Edit upload.php, find
Code: [Select]
if (!USER_CAN_UPLOAD_PICTURES) {and replace with
Code: [Select]
if (!USER_CAN_UPLOAD_PICTURES && !USER_CAN_CREATE_ALBUMS) {This will make sure that the upload screen doesn't show an error message in the first place if public uploads are off and personal galleries are on.
Explanation for advanced users: the constant USER_CAN_CREATE_ALBUMS is named a bit misleading for historical reasons. Actually, it determines if a user can have a personal gallery.
Find
Code: [Select]
if (!count($public_albums_list) && !count($user_albums_list)) {
    cpg_die (ERROR, $lang_upload_php['err_no_alb_uploadables'], __FILE__, __LINE__);
}
and replace with
Code: [Select]
if (!count($public_albums_list) && !count($user_albums_list)) {  // there's no album where the user is allowed to upload to
    if (USER_CAN_CREATE_ALBUMS) {
        cpg_die (ERROR, $lang_upload_php['err_no_alb_uploadables'].'<br />&nbsp;<br /><a href="albmgr.php" title="'.$lang_user_admin_menu['albmgr_title'].'" class="admin_menu">'.$lang_user_admin_menu['albmgr_lnk'].'</a>', __FILE__, __LINE__);
    } else {
        cpg_die (ERROR, $lang_upload_php['err_no_alb_uploadables'], __FILE__, __LINE__);
    }
}
This will fix uploading and remind users who are allowed to have a personal gallery that they need to create at least one album before being able to upload a file.

2) include/themes.inc.php
Edit include/themes.inc.php, find
Code: [Select]
    if (!USER_CAN_UPLOAD_PICTURES) {
        template_extract_block($template_sys_menu, 'upload_pic');
    }
and replace with
Code: [Select]
    if (!USER_CAN_UPLOAD_PICTURES && !USER_CAN_CREATE_ALBUMS) {
        template_extract_block($template_sys_menu, 'upload_pic');
    }
This will fix the visibility of the upload link.

3) Check your custom theme
If you have created a custom theme (i.e. one that doesn't come with Coppermine by default), you will have to make sure to fix the issue as well. Open themes/yourtheme/theme.php, try to find
Code: [Select]
function theme_main_menu($which)If you don't have that line, then you're fine and won't have to perform additional steps. If you do have that function defined in your theme, do as suggested in step 2 (searching for     if (!USER_CAN_UPLOAD_PICTURES) { and applying the suggested fix).

Finally, upload your changed files and test-drive everything.

@devs: please confirm

Cheers

Joachim
Logged

mexfred

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 20
Re: Upload for Users
« Reply #12 on: December 15, 2006, 01:33:49 am »

Ok, I can confirm, your buckfix is working perfectly,
I know, you are not interested to follow up my posts, but may be, for others they got the
same problem, I post a problem (its easyer to explain in german), looks as its a buck also
and you can check and may be fix it for the comunity.

Thanks for fixing the upload problem

Saludos

Fred Mexico ;D
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Upload for Users
« Reply #13 on: December 15, 2006, 09:39:35 am »

We have a "one issue per thread" policy that you agreed to respect when signing up. It is mandatory to respect this policy especially in postings on the bugs board, as not doing so will confuse others. You were suppossed to reply to this thread saying "your suggested fix is working as expected" or by saying "doesn't work for me". No other reply is permitted, particularly not remarks that make others think that there might be related issues. Your "wannabe-bug-report" "Keyword problem" deals with something entirely different. If you must refer to it, then provide a link as well, as others are not mind readers. There's no benefit for others if you refer to a German posting on the international bugs board.

Locking this thread now.
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 18 queries.