GUESTBOOK : Comment Marked as Abuse - Horizontal line insertion
Author: Steven DobrowskiMARKED AS AN ABUSE
I have implemented insertion of code [ <style>.imBlogPostAbuse{ display:none;}</style> ] in the site header html (alternatively, the code can also be inserted directly before the php code in the guestbook widget to get the same effect) to remove the button which would normally let site visitors click on a comment (guestbook or blog) to mark it as an abusive statement. Removal of the button prevents visitors from accidentally marking comments as abuse, something the Guestbook/Blog administrator can do at the point of approval/disapproval..
However, posts are now shown immediately above the three [ Name:*E-mail:*Internet website: ] fields that the visitor completes before adding their message to the guestbook. That is, there is no separation between the posted comments and these fields.
HORIZONTAL LINE INSERTION
To provide suitable separation, I wish to insert a horizontal line below the posted comments and above the first [ Name: ] of these fields. It is not clear where this insertion can be made.
Presumably "<?php echo '<hr />'; ?> " needs to be inserted to create the effective insertion, but in which file should it be placed?
I had assumed the insertion should be made in one of the guestbook.php files (there are several of them in the original installation, preview, and upload folders.
Can you please say which file(s) need to be modified, and confirm use of the correct code to insert?
Thanks. Steve
Hello Steve,
Unfortunately I cannot give you support for custom code but I can explain you where you can find it. To insert a Horizontal Line to separate the entries and the form you need to modify the x5engine.php file in the res folder. Before you make any changes remember to backup the original file. You need to search inside the file the guesbook part and add the <HR>.
Hope this helps.
Author
OK Claudio, here's what I have done.
OPENED x5engine.php in a html editor (I have used FrontPage 2003).
SAVED (BACKEDUP) original copy of files
The file is in two locations:
AMEND CODE
Between original LINES 2547 and 2548 inserted the following 5 lines of code ....
/**
* INSERT HORIZONTAL LINE / BREAK LINE ON CODELINE 2551
*/
echo "<hr />";
echo "<br />";
SAVED file to both locations. (saving to the original installation folder may throw up a read-only message. If so, copy and paste the saved file at location 1 to location 2 in windows explorer; it's what I had to do)
UPLOAD whole site to server. Uploading only the changed pages will not upload the x5engine.php file. Alternatively, ftp the file using an external ftp client such as WISE-ftp directly from location 1 to the res folder on the server.
Bingo! horizontal line and line break now appear where the Post Abuse button used to appear.
Steve