You are browsing the archive for PHP-Nuke.

Avatar of knut

by knut

Stop comment spam in PHP Nuke

March 20, 2006 in CMS, PHP-Nuke

I have a lot of comment spam on my Nuke site. This module is a possible solution.
=================================
Stop the spam in comments of PHP-Nuke’s articles
=================================
Author: aeniGma aka Eremita Solitario
Site : http://www.thekey.it
==============================================================================

When you are a webmaster often you got problems by spammers that fill your
site with every kind of shit. As this spammer use script they can fill hundred
of site in minutes, and the problem became disturbing.

A case of spamming that I do not support is the one coming into the comments
of sites managed with PHP-Nuke. Obviously this problem is more present in that
sites that permit posting to anonymous visitors.

To solve the problem I made a patch to activate the security-code check to
post a comment. To accomplish this I made 3 simple modifications at the
original script. This simple mod can be made in less than 10 minutes.

The file to patch is: html/modules/News/comments.php and it must be modded in
3 points. In the next lines you will find the position and the code to patch.

——————————————————————————
Al line 599 ca.
——————————————————————————

modify by adding AFTER the line:

[CODE TO SEARCH]
if (is_user($user) AND ($anonpost == 1)) { echo “
“._POSTANON.”
“; }
[CODE TO SEARCH]

this piece of code:

[CODE TO INSERT]
/* Start Patch for security code by aeniGma – http://www.thekey.it */
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
echo ”
Type security-code:
“;
echo “
“;
echo “
“;
echo “
“;
/* End Patch for security code */
[CODE TO INSERT]

——————————————————————————
At line 683 ca.
——————————————————————————

Do the same mod that you made at line 599, by adding the same piece of code
AFTER this:

[CODE TO SEARCH]
echo “
“._POSTANON.”
“;
}
[CODE TO SEARCH]

——————————————————————————
At line 794 ca.
——————————————————————————

Modify the code:

[CODE TO SEARCH]
case “”._OK.”":
CreateTopic($xanonpost, $subject, $comment, $pid, $sid, $host_name, $mode, $order, $thold, $posttype);
break;
[CODE TO SEARCH]

with the next version:

[CODE TO SUBSTITUTE]
case “”._OK.”":
$datekey = date(“F j”);
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
if ($code != $gfx_check) {
replyPreview ($pid, $sid, $subject, $comment, $xanonpost, $mode, $order, $thold, $posttype);
} else {
CreateTopic($xanonpost, $subject, $comment, $pid, $sid, $host_name, $mode, $order, $thold, $posttype);
}
break;
[CODE TO SUBSTITUTE]

The-End, at this point save the file and from this point to post a comment is
necessary to insert the right security-code.

PAY ATTENTION:
1) This instruction was made based on the version 7.6 of PHP-Nuke, for other
versions you must correct the code by yourself. For every modification I
have indicated the piece of code that you find just before the modification,
so you can find the right position for the modification.

2) With this modification if a user insert the wrong code the comment will be
previewed instead of being posted. This mod do not manage the error of
inserting the wrong code, it will only block the posting by doing preview till
the right code is inserted.

DISCLAIMER:
The modification reported here are released AS-IS, and I’m not responsible for
any damage that you can do to your site wile implementing this mod. Remember
to backup all data that you modify BEFORE doing anything, so you could
roll-back the changes.

=================================
EOF | aeniGma – http://www.thekey.it
=================================

Popularity: 71% [?]

Avatar of knut

by knut

FREE Webmaster Tools – SEO Tools

March 15, 2006 in PHP-Nuke, Search Engine Optimization

PHP-Nuke Addons


http://www.iwebtool.com/Sakset fra PHPNUKES websted

Addons: Search Engine Optimization Tools Module v1.0

astalavistabd writes Search Engine Optimization(SEO)
is a very important term for all webmasters. Many websites offer many
types of SEO tools. Hence, we decided to code a complete SEO tools for
phpnuke community so that they don’t have to go to different sites to
look for these tools. OurSEO Tools Module v1.0
is a collection of different Search Engine Optimization tools for
PHP-Nuke. These tools are powered by http://www.iwebtool.com and all
these tools are free.”

Popularity: 3% [?]