coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: hozyali on January 23, 2007, 08:28:17 AM

Title: allow user upload
Post by: hozyali on January 23, 2007, 08:28:17 AM
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
Title: Re: allow user upload
Post by: Joachim Müller on January 23, 2007, 08:45:22 AM
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.
Title: Re: allow user upload
Post by: hozyali on January 23, 2007, 08:55:28 AM
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
Title: Re: allow user upload
Post by: 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.
Title: Re: allow user upload
Post by: 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.

Ali
Title: Re: allow user upload
Post by: Joachim Müller on January 24, 2007, 01:11:07 PM
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.
Title: Re: allow user upload
Post by: hozyali on January 24, 2007, 01:51:30 PM
Thanks for all your help. This issue has been resolved.

Regards
Ali
Title: Re: allow user upload
Post by: Joachim Müller on January 24, 2007, 02:50:28 PM
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.
Title: Re: allow user upload
Post by: hozyali on January 24, 2007, 02:53:51 PM
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