|
#1
|
||||
|
||||
|
GeoS No SPAM template
Hi all dear Pixelpost users,
Today, after few weeks of prepering to do it, you can download and test my antispam template. This is made for current Pixelpost version (1.5 final). As this is in development stage then please make backup of your /index.php file (if you hack it). Here is the link: ZIP - http://piotrgalas.com/projects/geos_...ate_PPv1.6.zip PS This is adapted for use simple template. Installation: 1) Be sure you are using Pixelpost 1.5 final. Whole hack is made only for this version of Pixelpost. 2) Download file linked above. 3) Unpack it into your local pixelpost directory. So index.php should replace previous one in directory and there should be new file called comment.php. There should be also new dir within Pixelpost's template dir called geos-nospam. 4) If you want you can use this tamplate and customize it or take this code: HTML Code:
<div id="comments"> <a name="comments"></a> <script language='javascript' type='text/javascript'>flip('comments',0);</script> <IMAGE_COMMENTS> <ul id="new_comments"><li> </li></ul> <div class="border_left" id="comment_form"> <img src="thumbnails/thumb_<IMAGE_NAME>" alt="<IMAGE_TITLE>" title="<IMAGE_TITLE>" style="float:right" /> <b>ADD COMMENT</b><br /><br /> Message:<br /> <textarea name='message' id='message' rows='4' cols='45' class='input2'></textarea><br /><br /> Name:<br /> <input type='text' name='name' id='name' class='input2' value='<VINFO_NAME>' /><br /><br /> Website URL, if any: <br /> <input type='text' name='url' id='url' class='input2' value='<VINFO_URL>' /><br /><br /> Email: <br /> <input type='text' name='email' id='email' class='input2' value='<VINFO_EMAIL>' /><br /><br /> <input type='checkbox' name='vcookie' id='vcookie' value='set' checked="checked" /> Save User Info<br /><br /> <input type='hidden' name='parent_id' id='parent_id' value='<IMAGE_ID>' /> <input type='hidden' name='parent_name' id='parent_name' value='<IMAGE_NAME>' /> <button class='input3' onclick='save_comment();'>Add</button> </div> <div id="add_state"></div> </div> Remember also to copy to own template and include paths to two additional JS libraries (and then change path to correct one): HTML Code:
<script type="text/javascript" src="templates/geos-nospam/scripts/advajax.js"></script> <script type="text/javascript" src="templates/geos-nospam/scripts/lib.php"></script> 7) More or less it should be all. Code isnt perfect yet but this is some good base to solve SPAM issue. As Ive made few more tweaks from time of publishing this then maybe in near future there will be small tweak. Last edited by GeoS; 08-06-2007 at 06:48 PM. |
|
#2
|
|||
|
|||
|
the file comment.php goes where?
/includes ? /admin or in the same folder as index.php? I'm going to test it out.. |
|
#3
|
||||
|
||||
|
im currently not getting any spam, so i cant help...even hidden areas of pixelpost.org development are spam free right now...weird.
__________________
i should say more clever stuff |
|
#4
|
||||
|
||||
|
comment.php goes with index.php file to root dir of Pixelpost installation.
PS I forgot to add that live demo of very similar solution (but without option of hashing variable names) is available to watch at: http://blog.piotrgalas.com/ Feel free to test it and for that leave a comment
|
|
#5
|
||||
|
||||
|
At evening there will be an update because thanks to Connie I found one small logical error which stoped Opera from posting comments.
There will be also added error number info which can help to debug comment script or just to find out why comment wasnt posted. |
|
#6
|
||||
|
||||
|
After deeper look in to the code there wasnt any big issue.
Template package (available from link at my signature or above) is updated right now with additional variable which makes all hashes unique for each virtual host directory. As I found out (thx Connie) inside /templates/geos-nospam/scripts/lib.php it would be good to replace relative URL: HTML Code:
advAJAX.post({
url: "comment.php",
HTML Code:
advAJAX.post({
url: "http://blog.piotrgalas.com/comment.php",
PS Tested with Firefox 1.0.3, Opera 9.01, MSIE 6.0 SP1 (XP edition) and MSIE 6.0 SP1 (w2k proff edition) . |
|
#7
|
|||
|
|||
|
I have followed the instructions above.
My issues is, when a comment is submitted, the page get hung on http://<website>/index.php?x=save_comment. No comment is getting submitted. Please advise |
|
#9
|
|||
|
|||
|
Sorry for replying late.
I did copy both files index.php and comment.php under root of my site. Ps: These are the files that came with “geos_no_spam_template.rar’ Thanks |
|
#10
|
||||
|
||||
|
So it cant if you also took code from my image_template.html file and put to yours template file. Cut out from comment form <form> and </form> tags. Thanks to this hack both of them are useless.
First post in topic updated with installation instructions. |
| Post Reply |
| Thread Tools | |
|
|