Advanced search  

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

Pages: [1]   Go Down

Author Topic: Additional Info Adding To Upload.php  (Read 5208 times)

0 Members and 1 Guest are viewing this topic.

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Additional Info Adding To Upload.php
« on: May 08, 2006, 04:36:04 pm »

Hi all

Just wanted to know if there is a chance of adding additional info just in between the upload boxes & the continue button in upload.php

Thanks ;D
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Additional Info Adding To Upload.php
« Reply #1 on: May 09, 2006, 02:49:00 am »

What do you want to add?
Logged

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: Additional Info Adding To Upload.php
« Reply #2 on: May 09, 2006, 09:45:33 pm »

Hi Paver

I want to add additional information to the bottom of the upload.php page like the information at the top of the page ;D
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Additional Info Adding To Upload.php
« Reply #3 on: May 09, 2006, 10:52:58 pm »

OK, to put the question the other way round: is the stuff you want to see added, is it suppossed to be always the same static content, or is it suppossed to change, depending on the user, album, whatever? Is it suppossed to be a pic, a table, textual context, a banner?
Don't just rephrase your initial question; there's a good reason why Paver asked the question. If you want us to help, post more info. If you ask generic questions, you'll get generic answers, like "just put in the necessary code".
Logged

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: Additional Info Adding To Upload.php
« Reply #4 on: May 09, 2006, 11:43:53 pm »

Ok, it will be the same static content
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Additional Info Adding To Upload.php
« Reply #5 on: May 10, 2006, 12:21:31 am »

Ok... static content makes it a little easier, but looking at upload.php, I see that there are various ways the upload form can be output depending upon whether the user can customize the form or not and the various upload admin options.

A simple answer if you just want to hack the upload.php file and add in your content manually is to search for $lang_continue which is the language-specific "continue" text for the continue button you mentioned.  There are multiple ones so you either have to add in your content in all of them or figure out how you have your upload configuration set and pick the correct one.

Actually an easier way is to modify the close_form() function that creates all of the "continue" buttons (except for the message boxes used for intermediate pages and thus not the original upload form):
Code: [Select]
// The close form function creates the submit button and the closing tags.
function close_form($button_value) {

// Pull the language array into the function.
global $lang_upload_php;

// Create the submit button and close the form.
echo <<<EOT
        <tr>
                <td colspan="2" align="center" class="tablef">
                        <input type="submit" value="{$button_value}" class="button" />
                </td>

        </tr>

EOT;
}

Add in your code above the <tr> with the appropriate table cell tags and that should work for all the different upload forms.

If you don't want to hack your upload script, you could create a plugin which does this addition for you.  But for a quick mod, hacking the script is your simplest bet.  Make sure to put comment tags bracketing your mod (with your initials or something uniquely identifying) so you can search for your mods in the future when you upgrade Coppermine and have to re-apply your mod to the new upload.php file.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.