forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: will on May 08, 2006, 04:36:04 pm

Title: Additional Info Adding To Upload.php
Post by: will 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
Title: Re: Additional Info Adding To Upload.php
Post by: Paver on May 09, 2006, 02:49:00 am
What do you want to add?
Title: Re: Additional Info Adding To Upload.php
Post by: will 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
Title: Re: Additional Info Adding To Upload.php
Post by: Joachim Müller 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".
Title: Re: Additional Info Adding To Upload.php
Post by: will on May 09, 2006, 11:43:53 pm
Ok, it will be the same static content
Title: Re: Additional Info Adding To Upload.php
Post by: Paver 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.