advanced guestbook private links?
hello, I am happy to find this forum because it's very helpful
This is my problem; I have tried many PHP gbooks out there after megabook crapped out on me and deleted all my entries, and now im using advanced guestbook. (http://proxy2.de/scripts.php)
However, I don't like the fact when someone posts a "private" entry you can't (even though you are the admin) see it IN the guestbook. You need to go to the admin panel to see it.
In megabook guestbook, when someone posted a private entry, it would show that someone did so, only it would show a link that would allow an admin to enter the PW and access the private entry.
Is there anyway to do that in advanced guestbook? when someone leaves a private entry, I want a link to show up that the admin needs to click on to access it.
This is what I want it to do:
Megabook is a guestbook script written in CGI.
http://www.militerry.com/megabook/
here is the viewpriv.cgi file (linked below as a text file) that makes the private function work; it works when someone submits a private entry. Then, in the guestbook, private entries are shown as links saying "private entry" (or whatever you want them to say) and when an admin clicks on that link, they enter their admin password and then can read the private entry.
http://hello-tokyo.net/yumi/viewpriv.txt
( right click and "save as" to open it into a text editor.
Also, in the header template, this is the pop-up javascript code that makes private entries pop up in little windows in the guestbook:
http://hello-tokyo.net/yumi/header.txt
(you can't view this file directly -- right click and "save as" to open it into a text editor.
To see it in action, I found a megabook guestbook that someone has. You can see the public entries and the private entry links:
http://paper-devil.org/gbook/guestbook.cgi
the private entries in this guestbook are labled "[FOR ME!]" you can see they are links that open up to ask for a admin password. The private entries are submitted if you check the "private message" checkbox.
Can anyone help me with this?
yumiko posted this at 03:53 — 26th August 2003.
They have: 6 posts
Joined: Aug 2003
no one knows how to do this?
m3rajk posted this at 16:49 — 26th August 2003.
They have: 461 posts
Joined: Jul 2003
i haven't tried making one. are you using a db?
Mark Hensler posted this at 16:52 — 26th August 2003.
He has: 4,048 posts
Joined: Aug 2000
His current guestbook is using Perl and a flatfile.
m3rajk posted this at 16:56 — 26th August 2003.
They have: 461 posts
Joined: Jul 2003
have never done it with perl. made a really simple one using php 3.0.x and a txt file in school over a year ago. but i can't help with perl. if he wants to move to php i'm willing ot help. souns like something that would be a good learning experience.
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
yumiko posted this at 17:43 — 26th August 2003.
They have: 6 posts
Joined: Aug 2003
the guestbook im using is a PHP one, and yes, it uses a database.
Suzanne posted this at 18:51 — 26th August 2003.
She has: 5,507 posts
Joined: Feb 2000
And the one you want to use is Perl and uses a flatfile... ? It's also someone else's work, I'd recommend contacting the original script writer and getting his assistance, or the assistance of the person who successfully modified it in the way you want it to be modified.
It doesn't look like the modified version does anything other than allow the admin to see there is a post, you can still only view them through a tweak, not directly on the page (which is what I thought you wanted). That would be a matter of generating a link instead of doing nothing when a private message is posted. Then the popup would check the password and retrieve the particular comment for viewing.
yumiko posted this at 09:09 — 27th August 2003.
They have: 6 posts
Joined: Aug 2003
"you can still only view them through a tweak, not directly on the page (which is what I thought you wanted). That would be a matter of generating a link instead of doing nothing when a private message is posted. Then the popup would check the password and retrieve the particular comment for viewing. "
yes, that's what I would like to do. I don't need to use the "megabook CGI" script in the PHP guestbook, I just want to make private entries work and look like it does .. but I don't know how.
Suzanne posted this at 15:28 — 27th August 2003.
She has: 5,507 posts
Joined: Feb 2000
You'll have to find where these functions are within the script you want to use, then edit them to work (Mark will likely correct the flaws in my logic here... ):
When an entry is submitted, check to see if it's private or not, if it's private, record it with a flag that indicates it's private.
When generating the page, check to see if each comment is private or not. If it's not, print the comment, if it is, print the link to the popup window.
You'll have to create the check password page (you can probably use the same code for the admin section itself), but pass the comment id along. When the password is accepted, run a script that you write called "viewprivatecomment.php" or something like that, wherein you get the comment by it's id and display it on the page.
Check the database, there is probably already a flag for private/public since that feature is in the application, so you can use that to form your test.
Do remember that this guestbook is under license and you need to keep careful documentation of what you edit and what you're doing when you edit.
yumiko posted this at 22:57 — 28th August 2003.
They have: 6 posts
Joined: Aug 2003
well .. I have no idea how to start doing what i'm supposed to, because I don't know how to write PHP. (X_X)
m3rajk posted this at 01:13 — 29th August 2003.
They have: 461 posts
Joined: Jul 2003
what scripting languages do you know?
yumiko posted this at 01:16 — 29th August 2003.
They have: 6 posts
Joined: Aug 2003
I know html, I know how to edit some cgi, but I don't know how to write php .. I would need help with what i'm trying to do here.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.