semiColon 0 Posted November 29, 2007 Report Share Posted November 29, 2007 hello everybody!i used this guest book: http://www.phpjunkyard.com/php-guestbook-script.phpit's so far so good with me.. but how can i prevent the posts by the guests until i approve them?Thanks, Quote Link to post Share on other sites
Ingolme 1,020 Posted November 29, 2007 Report Share Posted November 29, 2007 If you were programming it yourself, I'd say add an extra field to the database table for "approved/not approved" and make it "not approved" for guests by default. Then you can switch it to "approved" in some kind of admin panel. Quote Link to post Share on other sites
semiColon 0 Posted November 29, 2007 Author Report Share Posted November 29, 2007 No.. this guest book have not a database..Is there another way to do that? Quote Link to post Share on other sites
Ingolme 1,020 Posted November 29, 2007 Report Share Posted November 29, 2007 A guestbook without a database? Then it must save the data in a text file or something?If you had it in a database it would be so much easier, something likeSELECT * FROM table WHERE approval='approved'I don't know hwo this system you want works, so I can't help you. Quote Link to post Share on other sites
semiColon 0 Posted November 29, 2007 Author Report Share Posted November 29, 2007 yeah, it uses a text file to save the data.i'll try another with a database, if there isn't any method to that without it.. thanks, Quote Link to post Share on other sites
Ingolme 1,020 Posted November 29, 2007 Report Share Posted November 29, 2007 Anything can be done if you put some thinking into it, but I just find it simpler with databses than text files. One could build a PHP library that reads and writes in text files with an SQL-like syntax, but I believe it to be more work than it's worth. Quote Link to post Share on other sites
justsomeguy 1,135 Posted November 29, 2007 Report Share Posted November 29, 2007 That list of bad words is a good read. Thankfully GBook is protecting the internet against people posting words like "asinine", "christ sakes", "jerk", and "n3gro". Sounds a little asinine to me.Line 726 of the main script is this:$addline = $name.$delimiter.$from.$delimiter.$email.$delimiter.$url.$delimiter.$comments.$delimiter.$added.$delimiter.$isprivate.$delimiter.'0'.$delimiter.$_SERVER['REMOTE_ADDR']."\n";That is the line that it's going to write to the file. You can add your own field there to indicate whether or not the entry has been approved. Line 878 has this:list($name,$from,$email,$url,$comment,$added,$isprivate,$reply)=explode($delimiter,$lines[$i]);That is breaking up the line in the file into variables to print. You would modify that section as well to get the approval field and check if it's approved before it gets displayed.I'm not sure how the script checks if someone is logged in or not. I'm not sure about that script in general, I don't really have a lot of faith in people who use things like <p> </p> Quote Link to post Share on other sites
killboy 0 Posted November 30, 2007 Report Share Posted November 30, 2007 Why don't you program the guestbook yourself? It's quite easy... I could give you some code if you will Quote Link to post Share on other sites
morrisjohnny 0 Posted December 5, 2007 Report Share Posted December 5, 2007 If you want a guestbook, i could provide you with one although it does use a database, but with a little tweaking i could add the approved not approved feature on it, along with "block word's" list.? just message me on the forums if your interested as i'm currently at school and wn't b home for another 12 hours. Quote Link to post Share on other sites
semiColon 0 Posted December 5, 2007 Author Report Share Posted December 5, 2007 Thanks all my friends..I've done it ..(f) Quote Link to post Share on other sites
morrisjohnny 0 Posted December 5, 2007 Report Share Posted December 5, 2007 no bother, glad to see you have done what you where looking for Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.