allow user upload allow user upload
 

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]

Main Menu

allow user upload

Started by hozyali, January 23, 2007, 08:28:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hozyali

Sorry for the confusion, I mixed up.

the question is, how can I allow users to be able to upload pictures?
right now when we goto upload.php, it gives permission error to unlogged user, instead it should redirect to login screen if the user is not logged in and logged in users should be able to upload photos in the specified albums.

Thanks

Joachim Müller

Edit anycontent.php, replacing the current content with<?php
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

if (!
USER_ID) {
  
starttable("100%""Welcome");

  
?>

  <tr><td class="tableb" >
  Welcome guest. You can upload files after having <a href="register.php">registered</a>. If you already have registered, <a href="login.php">log in</a> with the username and password you chose during registration.
  </td></tr>
  <?php
  endtable
();
}
?>
Upload the file (replacing the one existing on your server), then go to coppermine's config and add "anycontent" to the field "the content of the main page". For details, refer to http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#changing or http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#NoLastUploads

This will show a teaser message for your guests that explains everything.

hozyali

Thanks for your reply. I did like you said, but it shows a message on the index.php page instead at http://www.bookstocollect.com/gallery/upload.php

the user still sees the permission error on upload.php page.

Please advise.

Ali

hozyali

Im not sure how but it was allowed in 1.3x gallery. unlogged users were able to upload files... but its not working since I upgraded the gallery.

hozyali

did you reply GauGau?

i received a notification but don't see your reply on the board.

Ali

Joachim Müller

Quote from: hozyali on January 23, 2007, 09:17:51 AM
did you reply GauGau?

i received a notification but don't see your reply on the board.
As you can see I haven't replied before. You probably got a notification because you replied.

Quote from: hozyali on January 23, 2007, 08:56:38 AM
Im not sure how but it was allowed in 1.3x gallery. unlogged users were able to upload files... but its not working since I upgraded the gallery.
If you want to allow guest uploads, do so on the groups page. This hasn't changed from cpg1.3.x to cpg1.4.x.

Quote from: hozyali on January 23, 2007, 08:55:28 AM
I did like you said, but it shows a message on the index.php page instead at http://www.bookstocollect.com/gallery/upload.php

the user still sees the permission error on upload.php page.
Expected behaviour. It does what you initially requested. You haven't requested a message to be shown on the uploads page. If you haven't enabled guest uploads, guests will never see messages on the upload screen though.

hozyali

Thanks for all your help. This issue has been resolved.

Regards
Ali

Joachim Müller

For the benefit of others with similar issues we appreciate feedback on solved issues: just saying "issue has been solved" is not helpfull. It would be more helpfull instead if you posted what you actually did.
This is the proper way to say thanks: you give something back to the community.

hozyali

Quote from: GauGau on January 24, 2007, 01:11:07 PM
As you can see I haven't replied before. You probably got a notification because you replied.
If you want to allow guest uploads, do so on the groups page. This hasn't changed from cpg1.3.x to cpg1.4.x.
Expected behaviour. It does what you initially requested. You haven't requested a message to be shown on the uploads page. If you haven't enabled guest uploads, guests will never see messages on the upload screen though.

Yes, we did the same as your mentioned and it worked fine. Thanks again.

Regards
Ali