|
#1
|
|||
|
|||
|
save info cookie for the comments
I've found this brought up somwhere in the forum but I can't find if there was a solution offered. Anyone know how to include a save info cookie for the comments?
|
|
#2
|
|||
|
|||
|
Just realized that this feature may have been part of my pixelpost download but quite a bit of alteration was done to achieve what I was after so I can't remember. If it was there can someone tell me how I can get that feature back ?
__________________
http://www.smallestphoto.com/ |
|
#3
|
|||
|
|||
|
I also have modified mine quite a bit, but look for this bit of code:
// visitor information in comments $vinfo_name = ""; $vinfo_url = ""; if(isset($_COOKIE['visitorinfo'])) { // do stuff list($vinfo_name,$vinfo_url) = split("%",$_COOKIE['visitorinfo']); } $tpl = ereg_replace("<VINFO_NAME>",$vinfo_name,$tpl); $tpl = ereg_replace("<VINFO_URL>",$vinfo_url,$tpl); |
|
#4
|
|||
|
|||
|
thanks for the help. Ok - I've found that bit of code in the index.php file. Now what do I need to do?
__________________
http://www.smallestphoto.com/ |
|
#5
|
|||
|
|||
|
If I'm not mistaken, as long as you have the save cookie code at the top (below), it should be working.
// Set cookie for visitor counter, re-count a person after 60 mins setcookie("lastvisit","expires in 60 minutes",time() +60*60); // save user info if requested if($_POST['vcookie'] == "set") { $name = clean($_POST['name']); $url = clean($_POST['url']); setcookie("visitorinfo","$name%$url%l",time() +60*60*24*30); // save cookie 30 days } |
|
#6
|
|||
|
|||
|
That code is certainly there but it's not working. What about the code you mention you below your post - where should that be?
|
|
#7
|
|||
|
|||
|
It's very close to the top of your main index.php file.
Perhaps you don't have cookies turned on in your browser? |
|
#8
|
|||
|
|||
|
Found the code. Still doesn't work though. It's not my browser. No ones details are being saved. You can take a peek:
www.smallestphoto.com
__________________
http://www.smallestphoto.com/ |
|
#9
|
|||
|
|||
|
You don't have the checkbox on your page to save info. If you want to bypass the checkbox, I think if you just remove the IF statement around the cookie save, it will save everybody whether they want it or not.
if($_POST['vcookie'] == "set") { //remove this line ...keep code inside the brackets } //remove this end bracket Let me know if it works. Nice site by the way! |
|
#10
|
|||
|
|||
|
Well that just makes entirely too much sense!
|
| Post Reply |
| Thread Tools | |
|
|