PDA

View Full Version : GeoS No SPAM template


GeoS
09-11-2006, 08:20 PM
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_no_spam_template_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:
<div id="comments">
<a name="comments"></a>
<script language='javascript' type='text/javascript'>flip('comments',0);</script>
<IMAGE_COMMENTS>
<ul id="new_comments"><li>&nbsp;</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>
and put it to own image_template.html file.

Remember also to copy to own template and include paths to two additional JS libraries (and then change path to correct one):
<script type="text/javascript" src="templates/geos-nospam/scripts/advajax.js"></script>
<script type="text/javascript" src="templates/geos-nospam/scripts/lib.php"></script>

6) You can open templates/geos-nospam/scripts/lib.php and add something to value of $key variable (but by default it should be enough mixed thanks to variable $_SERVER['DOCUMENT_ROOT'] to be safe for use against SPAM BOTs).

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.

Connie
09-15-2006, 05:36 PM
the file comment.php goes where?

/includes ?
/admin

or in the same folder as index.php?

I'm going to test it out..

blinking8s
09-17-2006, 09:48 AM
im currently not getting any spam, so i cant help...even hidden areas of pixelpost.org development are spam free right now...weird.

GeoS
09-17-2006, 05:48 PM
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 :)

GeoS
09-18-2006, 08:05 AM
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.

GeoS
09-18-2006, 10:29 PM
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:
advAJAX.post({
url: "comment.php",
with absolute one i.e. like this:
advAJAX.post({
url: "http://blog.piotrgalas.com/comment.php",

Now it should work fine in every conditions.

PS Tested with Firefox 1.0.3, Opera 9.01, MSIE 6.0 SP1 (XP edition) and MSIE 6.0 SP1 (w2k proff edition) .

mrmastii
09-22-2006, 01:33 PM
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

GeoS
09-22-2006, 06:09 PM
Did you change index.php file and uploaded comment.php to root dir of Pixelpost??

mrmastii
09-26-2006, 03:25 PM
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

GeoS
09-26-2006, 04:30 PM
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.

mrmastii
09-26-2006, 08:04 PM
I did copy and pasted above code. Still I am getting same problem.
I did small test, with the original index.php, comments are getting posted, however with your new index.php, it is hanging at http://<website>/index.php?x=save_comment.

soj
09-26-2006, 08:25 PM
Hello - would you be so kind as to post a zip file of the template pack? TIA! soj

GeoS
09-26-2006, 08:36 PM
@soj: Ill in a minute. http://geos.wzzone.com/projects/geos_no_spam_template.zip

@mrmastii: give me a link. It is impossible to go to ...?x=save_comment with good coded template.

mrmastii
09-26-2006, 11:01 PM
I have tried different templates as well, but same thing.
Btw, I am using one of the default template “pixelpost-light” that came with the package.
My blog link is ....link removed
Many thanks

GeoS
09-26-2006, 11:35 PM
@mrmastii: You cant read with understood. I was saying about removing:
<form method='post' action='index.php?x=save_comment' name='commentform' accept-charset='ISO-8859-1'>

This is why you go to the save_comment on which new index.php hangs up (as it doesnt support it any more).

As I see currently you didnt switch to antispam template and event didnt put proper comment form supporting antispam solution and links to JS libs in the head of template (between <head> and </head> tags).

That is why it doesnt work :P

PS IMHO your vertical images are to high and definitely not for 1280x1024 screens.

mrmastii
09-27-2006, 01:36 AM
Geos,
Thank you for all your help,
I hade to modify few things, [including commenting <form method…>], and had to move the location of comment class [ <span class="addcomment"> +<a href="" …..] little up.
I guess it behaved little different with my template.
Again thanks for your help
Keep up the good work

soj
09-27-2006, 02:30 AM
Dziekuje for the quick zip and all your effort. I am actually using one install as a portfolio - comments are not needed in such an instance. Another install will be used for a photoblog, as intended.

Regardless, I appreciate this elegant piece of software.

soj

GeoS
09-27-2006, 08:46 AM
@soj: no problem.

@mrmastii: write me a PM if you still have some issues.

I belive that this idea for part of template which is comment form and its support will handle SPAM problem and solve it.

kristarella
10-20-2006, 01:03 AM
GeoS, thanks for the heads up in the other thread about this. I've been getting spammed like there's not tomorrow!
I was wondering if has to be like this: <script language='javascript' type='text/javascript'>flip('comments',0);</script>
<IMAGE_COMMENTS> With the comments coming after the javascript. Previously I had the image comments in a separate div to the comment form, not sure why now, possibly just for styling purposes. Will it still work if I move the comments out to some where else?

I obviously don't know anything about javascript. I hope to learn someday :)

kristarella
10-20-2006, 01:08 AM
Actually, it's okay, I'd still like to know the answer but it seems that I currently have two <IMAGE_COMMENTS> tags in my template but only the one after the javascript is showing up so I shall style that one to my liking and get rid of the old one.

Cheers.

GeoS
10-21-2006, 12:06 AM
This JS code was to hide by default layer with ID comments. The easiest way is to test and del content which you think isnt needed.

kristarella
10-24-2006, 12:27 PM
I don't know if this no-spam comments ever worked or stopped working but my comments aren't working now. It says "Saving comment..." but doesn't do anything more.

Does the div have to be called "comments"... I already had a div called comments and had that styled so I renamed it "addcomment" maybe that's making it incompatible with comments.php?


Help please?

DikkieBurger
10-24-2006, 12:43 PM
Yes, I thik the div has the be called coments because the js is using it.

kristarella
10-24-2006, 01:40 PM
Thanks for your reply!

I've gone and broken it all now, the comments don't show up :( right before bed time too. I'll have to come back to it later :(

GeoS
10-25-2006, 12:00 AM
Names of divs from solution should stay as they are because the content of them is changed with JS and it needs to know what it should be.

Goatie
10-26-2006, 08:50 PM
This method doesn't work at all... not even if I do all the things described in this thread.
I've put the <script>-thingies in the <head>-section, removed the <form>-tags... I've even tried using the template that is in the package.
All it does is.. NOTHING! Nothing happens when I press the button, it only stays at the same page, not posting any comments or goes to another page.

Sorry if my tone of voice is a little negative, but it has nothing to do with your solution.. I've just had a bad day. But I do look forward to when you're getting a stable version out and gets some good feedback from other users.

Cheers =)

GeoS
10-26-2006, 09:44 PM
Did you upload whole package on server with template dir and moded index.php with new comment.php? Do you have JavaScript enabled browser?

Goatie
10-27-2006, 02:29 AM
I've done all of those things, but strangely enough they wont work every time I try it. I've even tried to make a fresh install of PP1.5 and added your template/hack on the same server. But don't bother with my problems... I've found another solution to protect my photoblog against spam attacks.

Cheers =)

GeoS
10-27-2006, 10:06 AM
If you found such then its nice. But without good info about problem I cant solve it for the rest of users. In all my installations it works really cool.

keoshi
12-04-2006, 03:25 PM
Hey,

Would you be kind enough to point out what changes you made to index.php? Or Simply have a text file with the line numbers and additional strings.

I'm asking you this because I've made huge changes to my index.php to achieve my photoblog and I can't simply replace it =\

Thanks in advance!

GeoS
12-04-2006, 09:00 PM
The easiest solution in such situation would be to download i.e. winmerge and compare both files.
If you changed something that isnt said it would all go fine. In very close future I want to sit back to all my addons templates and so on and write to it documentation.

Bretteville
12-28-2006, 08:03 PM
I installed this template on a blog a few days ago, and noticed that the jbgmap add-on and this template had a compatibility issue in the css file included with the template.

http://www.xanderville.org/jbgmap.jpg

My knowledge with css, php and html is very limited, at best, but I managed to find a solution for my blog. The text in the info box in the map uses the same css code as the text in the template, and light grey on a white background isn't the best combination.

As I said, my knowledge on this is very limited, so the easiest way for me to fix this was to create a seperate css file for the jbgmap_template file. I made a copy of the file dark.css, and renamed it to jbgmapdark.css, and edited the part of the code below (the part in red). For the white background I chose black (#000) as the text color.


/* .............................. */
/* Basic */
/* .............................. */

body {
background-color:#666;
font-size:10px;
font-family:Verdana, Arial, Helvetica, sans-serif;
letter-spacing:0.5px;
color:#eee;
padding:0px;
margin:0px;
margin-bottom:20px;
text-align:center;
}


There was also a conflict which caused the images on the map not to load. I fixed this by editing the following part of the css file (text in red):


/* .............................. */
/* Browse */
/* .............................. */

#page {
background:#515151;
border:1px solid #aaa;
padding:20px;
text-align:left;
width:65%;
margin:0px auto;
margin-bottom:25px;
line-height:16px;
}

#page a {
font-weight:bold;
}

#page img {
background:#fff;
padding:5px;
border:1px solid #333;
}


I changed the word page to "side" (Norwegian for 'page'), to be sure I chose a word that wouldn't create another conflict.

After I made these two corrections everything worked perfectly. Before this template I got around 100 spam comments per day. Since I switched to this, three days ago, I haven't received a single one. So far it seems to be working perfectly, and it doesn't hurt that it looks great as well. :D

kristarella
02-15-2007, 11:03 PM
I want to give this another go, before that I have a quick question. Does this solution depend on javascript to stop the spammers or is there something more complex at work? I already have my comments in javascript which shows and hides the info and comments. Would that be enough to foil spammers with javascript disabled or not?

kristarella
02-18-2007, 11:04 PM
I've tried to implement this again. I've replaced index.php (but modified the one you provided so that my whole image, not thumbnails show up in RSS), I've put comments.php with the index, I've put JS in my scripts folder and linked to it, I've replaced my comments and comment form with the code you provided (minus the image thumbnail floated to the right). Finally I changed my CSS to correspond to your IDs.

The comments and comment input don't show up on my site. When I look at the source for my page it's all there. When I select the blank area (where comments and input should be) and view selection source it's all there with an added display:none; as a style. Where the heck is that coming from?!

austriaka
02-19-2007, 08:25 AM
Kristarella, your site is completely down right now so I can't even have a look at it.

Since Akismet seems not to be working anymore for the last weeks, I did something very stupid but right now it seems to work:
I wrote two if-statements into the save_comment section to reject my most spam words:
into the $name-part:
if (preg_match('/(replica|generic)/i', $url)) {die("SPAM Injection Error :(");}
into the $url-part:
if (preg_match('/(phorumz|freeringtones|yourtopbank|replica|vidiac| pozitor)/i', $url)) {die("SPAM Injection Error :(");}

Right now spammers don't come via an image page but call my blogs "save_comment"-function directly from an own script. I can see this in my image stats (image_stats_addon); there was no image visit from the commenters IP in that time.
For that reason I did something very simple: I changed the $_GET variable 'save_comment' to a fantasy word (right now it is "flup") and call the form action of the comment form like <form method='post' action='index.php?x=flup' name='commentform' accept-charset='UTF-8'>
This will not work very long because I am sure they will find it out within 2 months , but perhaps PP 1.6 is published until that...

There is another part in index.php, I don't understand for what this is for:
// build a string with all comments
if(isset($_GET['x'])&&($_GET['x'] == "") or (isset($_GET['popup'])&&$_GET['popup'] == "comment"))
{
if(isset($_GET['comment'])&&$_GET['comment'] == "save")
{...
I didn't find a template where "comment=save" is used in the URL string, but it seems as spam bots are using it. So I changed the "save" to "flup" as well...

HTH
KArin

GeoS
02-21-2007, 07:56 PM
I see that you have still old method of storing comments. You need to upload all files and have same field names as in my example template or change their names in lib.php.
If you have any problems then email me, skype me or write message on ICQ. At free time Ill try to help with it. In near future I want start to work on manuals as now I got site where I want to publicate it. There is only need of free time to sit and to write it.

kristarella
02-22-2007, 09:14 AM
Thanks for your response GeoS. I uploaded my old files and set it to moderation because I couldn't figure out the problem with the new ones. I think I uploaded everything - index and comment.php to the main directory, lib.php and the js files to the scripts folder in my own template and modified my image_template.html to have the new comment section and the js files in the header. I've put back all the no-spam files if you want to look at my site now.

GeoS
02-25-2007, 08:38 PM
Probably its not showing because you need one more thing to link under comments link.

To the A tag:
<a href="javascript:toggleSec('sec-info', 'toggle-info');" class="toggle">

Add this (put it before > mark):
onclick="flip('comments',1);return false;"

kristarella
02-26-2007, 07:11 AM
Apparently this is the night for me to break all my sites in some way! This didn't work - you can see what happens on the site. I really don't know anything about javascript but the js that you refer to is governed by www.kristarella.com/photoblog/templates/naked-dark/scripts/drop.js if that helps...

GeoS
02-27-2007, 05:21 PM
You didnt get what I wrote :/

Change:
<a href="javascript:toggleSec('sec-info', 'toggle-info');" class="toggle">

to:
<a href="javascript:toggleSec('sec-info', 'toggle-info');" class="toggle" onclick="flip('comments',1);return false;">

This should work fine.

kristarella
02-27-2007, 08:32 PM
You didnt get what I wrote :/

:( Due to my lack of understanding of javascript it's true I don't "get" what you wrote but I can follow instructions, I did exactly what you said.

This snippet from my source code:
<a href="javascript:toggleSec('sec-info', 'toggle-info');" class="toggle" onclick="flip('comments',1);return false;">Info &amp; Comments <span id="toggle-info">[+]</span></a>

Sorry if I sound snippy, I just get frustrated when I can't fix my website properly.

GeoS
02-28-2007, 09:59 AM
I see its still doesnt work so try to change it to:
<a href="javascript:toggleSec('sec-info', 'toggle-info');flip('comments',1);return false;" class="toggle">Info &amp; Comments <span id="toggle-info">[+]</span></a>

kristarella
03-16-2007, 10:26 PM
Thankyou for putting up with me! It's working now :)

GeoS
03-17-2007, 04:12 PM
Cool that your problem is solved :D

JETC
07-20-2007, 05:10 AM
Hey GeOS,

I am really having a tough time finding the changes you made in Pixelpost 1.5 index.php. I think I followed everything to implementing your AJAX comment form except for making modifications for index.php.

Can you help with that?

-=edit=-

Ok, I got it to work. I am able to add comments but there are quite a few weird behaviors that happen.

First, after I click add button, it adds the comment or seemingly publish the comments but it is still on moderation queue on the admin. The person who made a comment sees the comment he made but not everyone else.

Second, after I click the add button, the button gets cut off. My comment div for some reason gets smaller.

Third, after making the comment, the no comment is still in effect. I am asumming because the comment is not published immediately which I would like to.

Lol, Ok..I found the changes in the index.php. I'm assuming this is the only changes in index.php for the No Spam. I would like some help in merging these changes in the pixelpost 1.6 index.php. Could you just copy and paste the changes as is?
/////////////
// build a string with all comments
if(isset($_GET['x'])&&($_GET['x'] == "") or (isset($_GET['popup'])&&$_GET['popup'] == "comment"))
{
if(isset($_GET['comment'])&&$_GET['comment'] == "save")
{
// Ramin added more protections
if (eregi ("Content-Transfer-Encoding", $_POST['parent_name'].$_POST['email'].$_POST['url'].$_POST['name'].$_POST['message'].$_POST['parent_id'])) {die("SPAM Injection Error :(");}
if (eregi ("MIME-Version", $_POST['parent_name'].$_POST['email'].$_POST['url'].$_POST['name'].$_POST['message'].$_POST['parent_id'])) {die("SPAM Injection Error :(");}
if (eregi ("Content-Type", $_POST['parent_name'].$_POST['email'].$_POST['url'].$_POST['name'].$_POST['message'].$_POST['parent_id'])) {die("SPAM Injection Error :(");}

$datetime = gmdate("Y-m-d H:i:s",time()+(3600 * $cfgrow['timezone'])); // current date+time //was date("Y-m-d H:i:s");
$ip = $_SERVER['REMOTE_ADDR'];
// $parent_id $parent_id = $_POST['parent_id'];
$parent_id = isset($_POST['parent_id']) ? $_POST['parent_id'] : "";
if (eregi("\r",$parent_id) || eregi("\n",$parent_id)){ die("No intrusion! ?? :(");}
if (!is_numeric($parent_id))
die('parent_id is not correct!');

// $message $message = clean(nl2br($_POST['message']));
$message = isset($_POST['message']) ? $_POST['message'] : "";
$message = clean_comment($message);
$message = nl2br($message);

// $name $name = clean($_POST['name']);
$name = isset($_POST['name']) ? $_POST['name'] : "";
if (eregi("\r",$name) || eregi("\n",$name)){ die("No intrusion! ?? :(");}
$name = clean_comment($name);

// $url $url = clean($_POST['url']);
$url = isset($_POST['url']) ? $_POST['url'] : "";
if(eregi("\r",$url) || eregi("\n",$url)){ die("No intrusion! ?? :(");}
if(strpos($url,'https://') === false && strpos($url,'http://') === false && strlen($url) > 0) $url = "http://".$url;
$url = clean_comment($url);

// $parent_name $parent_name = clean($_POST['parent_name']);
$parent_name = isset($_POST['parent_name']) ? $_POST['parent_name'] : "";
if (eregi("\r",$parent_name) || eregi("\n",$parent_name)){ die("No intrusion! ?? :(");}
$parent_name = clean_comment($parent_name);

// $email $email = clean($_POST['email']);
$email = isset($_POST['email']) ? $_POST['email'] : "";
if (eregi("\r",$email) || eregi("\n",$email)){ die("No intrusion! ?? :(");}
$email = clean_comment($email);

// check that only one email-adress entered
$onlyone = $email;
$numberofats = substr_count("$onlyone", "@");
if ($numberofats > 1) {die("only one email-adress allowed");}

$cmnt_moderate_permission = $cfgrow['moderate_comments'];

if ($cmnt_moderate_permission=='yes')
$cmnt_publish_permission ='no';
if ($cmnt_moderate_permission=='no')
$cmnt_publish_permission ='yes';

if($parent_id == "") $extra_message = "<b>$lang_message_missing_image</b><p />";

if($message == "") $extra_message = "<b>$lang_message_missing_comment</b><p />";

if(($parent_id != "") and ($message != "")){

// check the comment with banlists
if (!is_comment_in_blacklist($message,$ip,$name)){

// send it to moderation if contains banned words but not black listed!
if(is_comment_in_moderation_list($message,$ip,$nam e)){
$cmnt_publish_permission = 'no';
$cmnt_moderate_permission = 'yes';
}

// to the job now
if ($cmnt_moderate_permission =='yes')
$extra_message = "<p /><b>$lang_message_moderating_comment</b><p />";
sql_save("INSERT INTO ".$pixelpost_db_prefix."comments(id,parent_id,datetime,ip,message,name,url ,email,publish)
VALUES(NULL,'$parent_id','$datetime','$ip','$messa ge','$name','$url','$email','$cmnt_publish_permiss ion')");
}
} // end if not in the black list
}
} // end if comment

GeoS
07-22-2007, 05:59 PM
Hi JETC,

1. Behaviour of publication depends from settings at admin side. If you set to publish instantly then it should behave like this (only reason of other behaviour could be my mistake). Showing it for poster is only to give him effect and to stop next post of the same content (comment).

2. If you have it online then Ill look on it later (within 2-3 hours).

3. I have to check what you mean.

Ill try to make it 1.6 compatible tonight.

JETC
07-22-2007, 06:55 PM
Ok, the problem you saw was when you were commenting :rolleyes: I already have set the global comments to publish instantly. Even with that, it still puts the comments into moderation queue for some reason and I have to manually approve it.

The other problem is that for some reason the comment box gets smaller after you submit the comment.

Other than that, it seems to be getting the comments and ajax is displaying them immediately even though the comments is being put into queue.

Also this is my testing site which you should check to see this:
http://web.njit.edu/~jc242/plg/index.php

Thank you again.

GeoS
07-22-2007, 08:48 PM
Im going to take a shower right now and then going to check this code.

GeoS
07-22-2007, 11:51 PM
OK, I know where is issue with comments publication. Ill handle with it tomorrow just like with the rest of things.
Today I started rewriting other addon, Im in the middle of this process and its quite late here :P That is why it must wait a day.

JETC
07-22-2007, 11:53 PM
Lol, it's ok. No rush at all. I just want to use the ajax commenting to work since I would like to deviate from captcha as much as I can for the visitors even though it has been quite effective :]

GeoS
07-24-2007, 11:45 PM
Right now its here (working version for PP 1.6):
http://piotrgalas.com/projects/geos_no_spam_template_PPv1.6.zip

Later Ill do whole update process.

JETC
07-25-2007, 05:53 PM
Ah, thank you very much. I have successfully implemented it for my site and it works great. No spam whatsoever and no CAPTCHA as well :) My only gripe is that it automatically posts the comments through ajax of course. That's great but it doesn't work if it is the very first comment since the "No Comment" is still displayed until the person refreshes the page.

GeoS
07-26-2007, 06:20 AM
Ok, now I know what you are talking about. Im writing note to solve it.
As I remember its done at my blog so there should be very easy to add it also in here.

kristarella
08-05-2007, 04:29 AM
I've been using this and it seems to be working nicely (thankyou!), but it always posts the comments as masked until I reveal them, even though I've got them set to publish instantly.
Any idea why?

GeoS
08-05-2007, 07:51 PM
No idea as current version has code straigh from oryginal code. All should work correctly.
Ill try to look on that in some free time.

JETC
08-05-2007, 08:50 PM
He maybe using the previous code. The code GeOS fixed does not have that problem anymore. Try using the code posted on this page.

Although the problem of No Comment still appearing even after the user has posted a comment still remains. The user has to refresh to just see his comment and not the No Comment part. ;)

kristarella
08-05-2007, 11:14 PM
I might be using old code... I'll check that.

I'm not sure what part of "kristarella" and my avatar indicates that I would be a "he" though. :P

JETC
08-05-2007, 11:25 PM
I might be using old code... I'll check that.

I'm not sure what part of "kristarella" and my avatar indicates that I would be a "he" though. :P

Easy...there are no girls in the internet >_> (j/k)

Anyhoo, try the new one, it's works except for that little thing I posted above. I have my finals tomorrow so I'll look on how to go about that on Tuesday or something.

GeoS
08-06-2007, 07:27 PM
Updated. Have fun. If there is any problem with template validation then let me know. Today I was trying to fix this "no comments yet." text in fast way.

PS lib.php in file with:
if(lis.length == 1 && lis[0].innerHTML=="No Comments Yet.")
says what search for to hide when there is new comment added. If you are using other language (then english) then put here text from your language.

JETC
08-07-2007, 03:00 AM
Hrmm, there seems to be an error with your updated script on the 1st page. I just uploaded your template with no modification on it and it crops an error. It says
Line: 49
Char: 4
Error: 'obj' is undefined

Let me play around it some more. Did you just made the extra change on lib.php?

-=edit=-
Oh, I think I know where my problem is. I got another ul tag on my site and I think it's interfering with that. I need to find another work around for that. :(

StatVoid
08-07-2007, 05:45 AM
I'm trying to implement the code into my template and while it almost works...it's not posting the comment, not even into the queue. I have pretty much all of the elements of the original template involved, so I don't know where I am going wrong. Can somebody please help me? Visit my website, Static in the Void (http://www.statvoid.com/), and try to post a comment and you'll see what I mean.

Hopefully it's a slight oversight on my behalf, but I feel I've tried everything.

BTW...I've gotten this issue with the default geos template as well and yet I'm using PP1.6.

JETC
08-07-2007, 06:25 AM
If you downloaded and used the file in hte first page, it seems to be not working. GeOS tried fixing the No Comment Yet. bug yet for some reason or another, something got messed up. I'm actually working on it now although I don't think I'll be able to solve it tonight seeing it's 2:30 in the morning here ;x

P.S.
Thanks for the comment, btw :)

-=edit=-
Ok, finally got it to work. Not sure what the problem was other than I was using another <ul> and an extra set of <li> from before.

kristarella
08-08-2007, 05:43 AM
Easy...there are no girls in the internet >_> (j/k)
Hehe, yeah... okay :P

Thanks GeoS for the update, it's all working now. Thanks JETC for pointing it out to me.

GeoS
08-08-2007, 09:36 PM
So please let me know if still anyone have problems. The best would be PM.

PS From saturday Im off for my vacations for around 2 weeks.

JETC
08-08-2007, 10:45 PM
Oh cool. Have fun GeoS and thanks for the help.

Everything seems to be working fine without a hitch so it's all good.

JETC
03-24-2008, 12:46 PM
Argh..comments not working after upgrade to v1.7.1 from 1.6. I get the

Error Message:
Connect DB Error: Cause #1 ....

I know it's made for v1.6 but I see in your site which is v1.7.x, your ajax comment is still working. I'm assuming that something got messed up in the index.php during upgrade. GeoS, any way you can help me modify my index.php for it to work?

GeoS
03-27-2008, 10:22 PM
As I remember my addon had own comment script which was DB independent (between current release 1.6.x and 1.5 - there was no difference between this versions). If you uploaded all files this should work correctly.

JETC
03-28-2008, 02:39 AM
Ok, I'll try again and see what's up with that. I know I uploaded things correctly since I was able to upload the photos just fine and all that except making comments, which gave me the problem.

-=edit=-
Ok, I just did everything and the problem seems to be in comment.php. It gives me that connect db error. I looked at the comment.php and I see a couple of places where it queries the database and gets the config and whatnot.

GeoS
03-28-2008, 08:57 AM
I see that Im able to comment your photos. Let me know when you switch to my solution and we will try to debug it.

In meanwhile I wrote new SEO solution for Pixelpost which you can watch at Ties blog - http://www.blauwgestreept.nl/index.php

JETC
03-28-2008, 01:15 PM
Yeah, I reverted it back to just captcha. This time, I re-uploaded the ajax commenting one. I'll try and see what's up with comment.php. Maybe try to rewrite how it queries and gets info from the db?

Also, I'm curious as to what was changed in the index.php from the regular one since you have a custom index.php included in your template before.

-=edit=-
Ok, I did some tinkering and I noticed that the start_mysql was missing some parameters in the comment.php so I changed it to start_mysql('includes/pixelpost.php','front');

That seems to work for me. Thank you for trying to look on it as well :) Now on to check that SEO addon :]

GeoS
03-29-2008, 02:57 PM
Index.php had stipped default comment code to make it as secure as it only can be.

Cool that you solved this isssue on own hand ;)