[Does this count as a request?]
This is a hack which will show a direct link to the picture after uploading it.
After choosing the album to place it in, and pressing continue, the link appears at the bottom, so users can quickly copy and paste. I need this for a forum, as we want a moderatable image gallery/uploading place sort of like photobucket or imageshack.us. However, I'm new to coppermine, so this code should NOT BE USED except as demonstration.
In upload.php
replace
// Create the form and echo more instructions.
create_form($form_array);
// More instructions.
if(count($escrow_array) > '1') {
form_statement($lang_upload_php['place_instr_2']);
}
// Make button say 'Continue.'
close_form($lang_continue);
// Close the table, create footers, and flush the output buffer.
endtable();
pagefooter();
ob_end_flush();
with
// Create the form and echo more instructions.
create_form($form_array);
// More instructions.
if(count($escrow_array) > '1') {
form_statement($lang_upload_php['place_instr_2']);
}
// Make button say 'Continue.'
close_form($lang_continue);
//OMGHAX
if ($uploaded_pic != ""){
echo ("<tr><td>http://localhost/cpg/". $uploaded_pic."</td></tr>");
}
//end OMGHAX
// Close the table, create footers, and flush the output buffer.
endtable();
pagefooter();
ob_end_flush();
NOTE: You may want to replace localhost/cpg/ with the location of your gallery installation.
Although this is just a demonstration, that's what I'm aiming for. Is that fine for what I need, or is there a safer, better way to go about this?
Replacingecho ("<tr><td>http://localhost/cpg/". $uploaded_pic."</td></tr>");
withecho ("<tr><td>".$CONFIG['ecards_more_pic_target']. $uploaded_pic."</td></tr>");
should make this code work without the need to hardocde the URL of your gallery folder.
Alright! Thanks so much! Oh, and by the way, sorry about forgetting to set version. :P I'm a dolt.
If you upload only one picture it doesn't shows the link to the uploaded file.
This is also the case, when you upload more than 1 picture, it shows the links to all except the last one. ???