forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: sjordan on August 08, 2006, 12:44:11 am

Title: Confirmation after vote
Post by: sjordan on August 08, 2006, 12:44:11 am
Hello,

I'm working with a client. He wanted a confirmation of some sort after votes were cast. I noticed that ratepic.php uses two redirects:

lines 119 & 120
Quote
header($header_location . $location);
pageheader($lang_info, "<META http-equiv=\"refresh\" content=\"1;url=$location\">");

As line 119 uses the php header functionality, it seems that line 120 would never get executed. But looking at line 121 ...
Quote
msg_box($lang_info, $lang_rate_pic_php['rate_ok'], $lang_continue, $location);
it looks like at some point the mechanism to provide a confirmation and then redirect was supported.

Thus I commented out line 119, effectively re-instating the confirmation feature; things seemed to work as the client wanted, except for one thing -- in his browser IE 6, no redirect happened.

Security settings are at default. Nothing particularly special about them.

Any thoughts on all this?

Thanks in advance.

CPG v 1.4.8
Title: Re: Confirmation after vote
Post by: sjordan on August 16, 2006, 05:37:43 am
Any thoughts on the vote confirmation?
Title: Re: Confirmation after vote
Post by: Stramm on August 16, 2006, 08:09:08 am
seems the header call has been forgotten to replace somewhen. However it's not the right place to add some sort of confirmation. That you'd need to have before the query that stores the vote into the db.

Seems to be pretty easy to do to me. In the code not only GET pic and rate but also eg. confirm. If confirm <> yes you call the new code, else execute the existing one.

In the new code block you have just a link or button that calls the page itself again ( ratepic.php?pic=xxx&rate=xxx&confirm=yes )

done