"Apply Modification" direct link to the album modified "Apply Modification" direct link to the album modified
 

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]

Main Menu

"Apply Modification" direct link to the album modified

Started by bb3, March 16, 2009, 06:38:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bb3

I wonder if i can change the link of "apply modification" because whenever i click apply modification it links to same modifying page. same with the album whenever i click "update album" it also links to the album modifying page.

what am i want to do is to change the link of the "apply modification" and "update album" i want them to link on the album of the modified file and to the modified album itself.

does anyone know to do it? thanks

link to my gallery:

http://gallery.redlens.org

uname: test
pword: user

thanks

Joachim Müller

#1
I have no idea what you're talking about, but the "apply modification" buttons are not actually links, but submit buttons for forms. The way forms work mean that the form data entered by the visitor needs to be processed on a page - you can not deliberately change the target of a form. What you can do though is adding some code that performs a redirect after the form data have been processed. However, this is where you have lost me: what form should redirect to what page? Post deep links if you can.

bb3

sorry for the misunderstanding

what i want is whenever i hit the apply modification i want to redirect it to the album page and not in the modify page which is the default

http://redlens.org/gallery/editOnePic.php?id=147&what=picture <----- this is the modify page. you can see the "apply modification" button and when you click it, it redirects to the same page and i want to redirect it in the album page in which the modified files belong.

thanks for your time

Joachim Müller

Untested code out of the back of my head (please report): edit editOnePic.php, findif (isset($_POST['submitDescription'])) process_post_data();and replace withif (isset($_POST['submitDescription'])) {
        process_post_data();
$header_location = (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) ? 'Refresh: 0; URL=' : 'Location: ';
        $redirect = "displayimage.php?pos=-$pid";
header($header_location . $redirect);
pageheader('OK', "<meta http-equiv=\"refresh\" content=\"0;url=$redirect\" />");
msg_box($lang_info, 'redirecting', 'continue', $redirect);
pagefooter();
ob_end_flush();
die;
}

bb3

hi Joachim,

thanks!! it works but it redirected to the file itself. what i want to happen is to redirect it to the album where you can see thumbnails and where the file belongs.

i also tested multiple modification but it didnt redirect to the album http://redlens.org/gallery/index.php?file=jupload/jupload&action=edit_uploaded_pics&album=41&nb_pictures=3

Sorry but im not good in coding

thanks for the big help joachim

Joachim Müller

Changeif (isset($_POST['submitDescription'])) {
        process_post_data();
$header_location = (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) ? 'Refresh: 0; URL=' : 'Location: ';
        $redirect = "displayimage.php?pos=-$pid";
header($header_location . $redirect);
pageheader('OK', "<meta http-equiv=\"refresh\" content=\"0;url=$redirect\" />");
msg_box($lang_info, 'redirecting', 'continue', $redirect);
pagefooter();
ob_end_flush();
die;
}
toif (isset($_POST['submitDescription'])) {
        process_post_data();
$header_location = (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) ? 'Refresh: 0; URL=' : 'Location: ';
        $redirect = "thumbnails.php?album=$aid";
header($header_location . $redirect);
pageheader('OK', "<meta http-equiv=\"refresh\" content=\"0;url=$redirect\" />");
msg_box($lang_info, 'redirecting', 'continue', $redirect);
pagefooter();
ob_end_flush();
die;
}
then