|
#1
|
|||
|
|||
|
Comment popup - reload after comment.
I just spent a good chunk of time trying to get comments popoup to refresh after someone posts.
I tried various onload comands, and could not get any to work. Assistance??? PS If you (pixelpunk) realyy ran for pres as promised on line 289, I'd vote for you. |
|
#2
|
||||
|
||||
|
ROFL, don't read the code, it's not good for your health
![]() Do you want an immediate re-direct or what are you after? Have you tried meta-refresh in the comment_template.html ? // punk
__________________
icq: 66760929 |
|
#3
|
||||
|
||||
|
To get an immediate redirect.
Find Code:
if(($parent_id != "") and ($message != "")) {
$query = "insert into ".$pixelpost_db_prefix."comments(id,parent_id,datetime,ip,message,name,url)
VALUES('NULL','$parent_id','$datetime','$ip','$message','$name','$url')";
$result = mysql_query($query);
}
Code:
header("Location: index.php?popup=comment&showimage=$parent_id");
exit;
// punk
__________________
icq: 66760929 |
|
#4
|
|||
|
|||
|
I explain
I don't have time to test it right now, but what I am looking for is After someone enters a comment, rathere than going to the "thank you blah....." page is refreshes the comments to show what they just added. Whilst testing I was trying to mantain error checking.
|
|
#5
|
|||
|
|||
|
tested
I tested the code, no change seemed to be aparent, just stayed at confirmation page.
I tried meta refresh with Code:
<meta http-equiv="refresh" content="1;url=index.php?popup=comment&amp;showimage=$parent_id'>$lang_comment_redirect"> How is it done when the comments are not in a popup window, it shows the added comment instantly? Scott |
|
#6
|
||||
|
||||
|
It's the same routine without the popup.
The header(Location thing should really work. Find line 585 in main index.php, add a meta-refresh there and see if that'll work. // punk
__________________
icq: 66760929 |
|
#7
|
|||
|
|||
|
thats where i have it, but it reloads and says "comming soon!"
is the above meta code right? or should it be formatted differently. |
|
#8
|
||||
|
||||
|
If it says "Coming Soon!" I would guess the image id don't get passed back to the script for some reason.
I can look up this "later", today I think I'm rather busy at work, unfortunately. If you are somewhat savvy you can try and find out why the $parent_id is blank in that particular statement, or if it ain't blank then something is wrong in the url. // punk
__________________
icq: 66760929 |
|
#10
|
||||
|
||||
|
winklebleck, Did you ever figure this out?
|
| Post Reply |
| Thread Tools | |
|
|