back button after error message back button after error message
 

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

back button after error message

Started by durangod, January 01, 2010, 05:51:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

durangod

hi, i have had this for about a week now and love it, i have done well to get this far without joining the forum, i wanted to challenge myself but this issue is just taking up alot of time and i cant figure it out, i have done searchs on form but cannot seem to find what i need, and nothing in documentation.

here is a link to my gallery, http://www.durangodaves.com/ddfotoup/index.php

Here is my question, im trying to clean up all the error messages that do not have a back button or continue button, i have done a pretty good job so far with getting the little things fixed and cleaning up some of the mods and figuring it out for myself but this one has me perplexed

in the ratepic.php file in the error routine i want to add a back or continue button to the error box, (i could just add expanitory text to the lang file but i dont want to do that) i want an actual button,  i can see the routine at the bottom not only for the error such as calling the forbidden variable out of lang file and i can see at the very bottom where the routine is to do the refresh, i just dont know what part of the code to put where..  here is the bottom portion of the ratepic.php and i have bolded the section in particular, one bold are in the error creator section and one bold area in the refresh section, how do i combine them to work.. what do i add the the error section to get a back or continue button to display.

[b]if (!empty($user) && $user==$owner && !USER_IS_ADMIN) cpg_die(ERROR, $lang_rate_pic_php['forbidden'], __FILE__, __LINE__);[/b]// Update picture rating
$new_rating = round(($row['votes'] * $row['pic_rating'] + $rate * 2000) / ($row['votes'] + 1));
$sql = "UPDATE {$CONFIG['TABLE_PICTURES']} " . "SET pic_rating = '$new_rating', votes = votes + 1 " . "WHERE pid = '$pic' LIMIT 1";
$result = cpg_db_query($sql);
// Update the votes table
$sql = "INSERT INTO {$CONFIG['TABLE_VOTES']} " . "VALUES ('$pic', '$user_md5_id', '$curr_time')";
$result = cpg_db_query($sql);

/**
* Code to record the details of hits for the picture if the option is set in CONFIG
*/
if ($CONFIG['vote_details']) {
$client_details = cpg_determine_client();
// Get the details of user browser, IP, OS, etc
$os = $client_details['os'];
$browser = $client_details['browser'];
$time = time();
$referer = addslashes(htmlentities($_SERVER['HTTP_REFERER']));
// Insert the record in database
$query = "INSERT INTO {$CONFIG['TABLE_VOTE_STATS']}
                 SET
                    pid = $pic,
                    rating = $rate,
                    Ip   = '$raw_ip',
                    sdate = '$time',
                    referer = '$referer',
                    browser = '$browser',
                    os = '$os'";
cpg_db_query($query);
}

[b]$location = "displayimage.php?pos=" . (- $pic);
$header_location = (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . $location);
pageheader($lang_info, "<META http-equiv=\"refresh\" content=\"1;url=$location\">");
msg_box($lang_info, $lang_rate_pic_php['rate_ok'], $lang_continue, $location);[/b]
pagefooter();
ob_end_flush();

?>


thanks fo your time

Joe Carver

Although not a "button" - this method works well for me. Read all of the posts in the thread.

   
All Themes - Error Recovery and Return for Users - cpg_die page

durangod

thank  you both, works perfect !!   by the way A+ on the whole software and its documentation, i have had a very nice experience so far and very impressive work...  thanks for the help..

durangod

just out of curiosity would that back option mod i installed in the other link (the page write) have anything to do with my recapture mod not working now..mmmmmm  i have not made any other changes but some minor home page changes for my paypal, thats the only major change...  any ideas... ill try to uninstall in and install the mod again.

durangod

well thats not it, i removed all code that i entered and uninstalled recapture and reinstalled and its not working, all of a sudden just like that its not working.... strange.. it does not even come up its just a normal login box..

Joe Carver

Gallery looks to have Captcha 3.0 plugin installed. If you are referring to reCAPTCHA v2.5 plugin not working then it is likely that a file mod. is getting in the way of the plugin - start with clean, unmodified files. Changing the cpg_die message should not affect other Coppermine functions.

durangod

ok thanks appreciate that, since this post title is not about captcha, this will be my last messge here i dont want to use the space for a new issue... but i will tell you that i had to remove the recaptcha and not use it, for some reason, related to this or not, it just stopped working altogether, i could get it on reg but noplace else so i just got rid of it completly and started using the simple captcha (not the recaptcha) in the plugin list.. and that is working fine... thanks for the reply, and just to be clear, the fix on this posting title works great, thanks...  ok done lol