Additional Info Adding To Upload.php Additional Info Adding To Upload.php
 

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

Main Menu

Additional Info Adding To Upload.php

Started by will, May 08, 2006, 04:36:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

will

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

Paver


will

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

Joachim Müller

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".

will

Ok, it will be the same static content

Paver

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):
// 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.