So as the title says, i almost got a good hack working for the guestbook system.
After searching the forums, and having my own need, i started trying to find a way to hide the Add A Comment box on the guestbook system.
I came across some good ideas on some websites and began to put together a way to hide the Add A Comment box.
*!* Note. I am not a programmer and im sure the following work will show you that. And obviously the reason why i cant get this going myself.
I started with this as a basic idea on how to make this work.
http://www.dynamicdrive.com/dynamicinde ... ontent.htm
And started to add it to the /phpwcms_template/inc_cntpart/guestbook/ file and came up with this..(click on the Leave A Comment link....duh)
http://www.jo-s.com/phpwcms_template/in ... fault.html
But the problem is, it doesnt work when a guestbook is added to an article. You can see what i mean here. And it also hides the comment that is already there...
http://www.jo-s.com/forever.phtml
So can anyone figure out what the problems are, and we can start to put together a proper easy hack for this issue.
I'm Using wCMS 1.2.6.
Thanks,
-ITS
Almost Got A Good Hack For Guestbook!!!
-
Infect The System
- Posts: 45
- Joined: Mon 13. Mar 2006, 03:19
- Contact:
- Oliver Georgi
- Site Admin
- Posts: 9934
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
This can be done by using simple CSS and a little JavaScript.
All you have to do is wrapping the form in some <div>:
The default should look like this:
Then do this:
And here is some sample code - put it in a new file and test it in your bowser - and you will understand.
This can be extended by suing a JavaScript function and some CSS classes and so on...
Oliver
All you have to do is wrapping the form in some <div>:
The default should look like this:
Code: Select all
<!--FORM_START//-->
<table border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#F5F5F5" style="margin-bottom:10px;">
......
</table>
<!--FORM_END//-->Code: Select all
<!--FORM_START//-->
<div id="showgbform"><a href="#" onclick="document.getElementById('showgbform').style.display='none';document.getElementById('gbForm').style.display='block';">Add your comment</a></div>
<div id="gbForm" style="display:none;">
<table border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#F5F5F5" style="margin-bottom:10px;">
......
</table>
</div>
<!--FORM_END//-->Code: Select all
<html>
<body>
<div id="showgbform"><a href="#" onclick="document.getElementById('showgbform').style.display='none';document.getElementById('gbForm').style.display='block';">Add your comment</a></div>
<div id="gbForm" style="display:none;background-color:#cccccc;width:300px;height:100px;">
xvxcvxcvcv
<br>
<br>
<a href="#" onclick="document.getElementById('showgbform').style.display='block';document.getElementById('gbForm').style.display='none';">Close</a>
</div>
</body>
</html>Oliver