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: How to add an Upload form in the frontpage?  (Read 7408 times)

0 Members and 1 Guest are viewing this topic.

avatarz

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
How to add an Upload form in the frontpage?
« on: December 18, 2010, 12:55:08 am »

Hi,
This is my first post.
I need some help to add in my coppermine powered gallery http://www.msnavatarz.com/ , an upload form in the frontpage. I want that my users can easy upload images directly from the frontpage. Please give me some help..

My website is http://www.msnavatarz.com/
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: How to add an Upload form in the frontpage?
« Reply #1 on: December 18, 2010, 10:13:10 am »

Not sure I fully understand your question.  ???

Your users should, (as long as they have the correct permissions), see a "Upload file" button at the top of every page.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

avatarz

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How to add an Upload form in the frontpage?
« Reply #2 on: December 18, 2010, 03:53:46 pm »

Not sure I fully understand your question.  ???

Your users should, (as long as they have the correct permissions), see a "Upload file" button at the top of every page.

I know that there is a link, but I dont want just e link. I need a form where the users can upload one photo at once.

Here is a screenshot. (http://www.pixhostr.com/image-5C90_4D0CCADA.jpg)
Logged

avatarz

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How to add an Upload form in the frontpage?
« Reply #3 on: December 18, 2010, 03:56:06 pm »

I can't post photos here?  ??? Here is the link to the photo of the screenshot http://www.pixhostr.com/image-5C90_4D0CCADA.jpg
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: How to add an Upload form in the frontpage?
« Reply #4 on: December 20, 2010, 10:07:13 am »

I can't post photos here?
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270617.html#msg270617


What exactly should happen when they upload a file? If you just have the "select file" form element, you have to hard-code to which album the files should be uploaded. Is this what you want?


Moving to themes board.
Logged

avatarz

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How to add an Upload form in the frontpage?
« Reply #5 on: December 22, 2010, 11:13:19 am »

http://forum.coppermine-gallery.net/index.php/topic,55415.msg270617.html#msg270617


What exactly should happen when they upload a file? If you just have the "select file" form element, you have to hard-code to which album the files should be uploaded. Is this what you want?


Moving to themes board.

After the upload the user have to be sent to the form where he/she can choose an album from a drop down menu, plus the title, description, keywords fields. This the way how coppermine works, or not? This is the simple one, where can be uploaded one file at time. See the screenshot.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: How to add an Upload form in the frontpage?
« Reply #6 on: December 22, 2010, 11:31:13 am »

This the way how coppermine works, or not?
No. You have to select an album before you upload.
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: How to add an Upload form in the frontpage?
« Reply #7 on: February 01, 2011, 01:34:27 am »

Quote
No. You have to select an album before you upload.

What is if we set a choosen album by default. Everthing uploaded from this simple frontpage upload form goes in this default album.
I would like a modification like this. A lot of people could use coppermine as a free image hosting script too.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: How to add an Upload form in the frontpage?
« Reply #8 on: February 01, 2011, 01:47:19 pm »

What is if we set a choosen album by default. Everthing uploaded from this simple frontpage upload form goes in this default album.
Then it's possible. Please post a link to your gallery and describe exactly where you preferably want the upload field to be displayed. A screenshot could also help.


A lot of people could use coppermine as a free image hosting script too.
What's the problem of using the existing upload forms?
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: How to add an Upload form in the frontpage?
« Reply #9 on: February 01, 2011, 03:22:45 pm »


Quote
What's the problem of using the existing upload forms?

Nothing is wrong. It's fine and ok. But an upload form just in the frontpage is much simpler for the normal user.

Then it's possible. Please post a link to your gallery and describe exactly where you preferably want the upload field to be displayed. A screenshot could also help.

http://www.galsh.com/

I will put the form just under the header. I can read the code and can work with template.html
If you give me the right code for this I think I can implement it myself.

Thank you.

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: How to add an Upload form in the frontpage?
« Reply #10 on: February 01, 2011, 03:48:17 pm »

I will put the form just under the header
Please create a screenshot and mark where exactly it should be, as I'm currently not sure what contains to the header for you and what not.
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: How to add an Upload form in the frontpage?
« Reply #11 on: February 01, 2011, 04:21:11 pm »

As I said I can implement it myself if I have the code for the upload form!
Whatever, here you have a screenshot.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: How to add an Upload form in the frontpage?
« Reply #12 on: February 01, 2011, 04:37:44 pm »

Code: [Select]
list($timestamp, $form_token) = getFormToken();
$template_gallery_admin_menu .= <<< EOT
    <form name="cpgform" id="cpgform" method="post" action="db_input.php" enctype="multipart/form-data" >
    <input type="hidden" name="event" value="picture" />
    <input type="hidden" name="album" value="1" />
    <input type="hidden" name="form_token" value="{$form_token}" />
    <input type="hidden" name="timestamp" value="{$timestamp}" />
    <input type="file" name="userpicture" size="40" class="listbox" />
    <input type="submit" value="Upload" />
EOT;
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: How to add an Upload form in the frontpage?
« Reply #13 on: February 02, 2011, 12:48:57 am »

I tried this using anycontent.php and then using template.html but with the same error:

Error A valid form token could not be found.
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: How to add an Upload form in the frontpage?
« Reply #14 on: February 02, 2011, 01:04:48 am »

I think that anycontent.php is the right direction to go. :) It is ideal for a frontpage upload form.
Cheers
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: How to add an Upload form in the frontpage?
« Reply #15 on: February 02, 2011, 09:19:13 am »

Works for me as expected when I add the following code to anycontent.php in my testbed:
Code: [Select]
list($timestamp, $form_token) = getFormToken();
echo <<< EOT
    <form name="cpgform" id="cpgform" method="post" action="db_input.php" enctype="multipart/form-data" >
        <input type="hidden" name="event" value="picture" />
        <input type="hidden" name="album" value="1" />
        <input type="hidden" name="form_token" value="{$form_token}" />
        <input type="hidden" name="timestamp" value="{$timestamp}" />
        <input type="file" name="userpicture" size="40" class="listbox" />
        <input type="submit" value="Upload" />
    </form>
EOT;
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.