Archive for the 'Software' Category

Avoiding Spam in Joomla

Thursday, September 21st, 2006

If you own or administer a Joomla/Mambo site and are frequently being attacked by spammers in your forum/guestbook/gallery, com_securityimages may be the solution for you. There are some instructions here to show how to configure it to work with joomlaboard/simpleboard. Basically, you just call the security framework at insertion and validation time. To add anti-spam support for zOOm gallery (com_zoom), just edit the file /components/com_zoom/www/view.php and find the following lines:

<input type="hidden" name="isAdmin" value="<?php echo $zoom->_isAdmin; ?>" />
</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value=
"<?php echo _ZOOM_ADD;?>" class="button" /></td>

Replace this lines with:

 


<input type="hidden" name="isAdmin" value=
"<?php echo $zoom->_isAdmin; ?>" />
</td>
</tr>
<?php include ($mosConfig_absolute_path.
'/administrator/components/com_securityimages/client.php'); ?>
<tr>
<td class="sb_leftcolumn">Anti-spam:
</td>
<td>
<?php echo insertSecurityImage("security_refid"); ?><br/>
<?php echo getSecurityImageText("security_try"); ?></td></tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value=
"<?php echo _ZOOM_ADD;?>" class="button" /></td>

Now find the lines:

if ($zoom->_gallery->_images[$key]->isMember($popup)) {
if ($submit === true) {
    $uname = $zoom->getParam($_REQUEST, 'uname');
    $comment = ($zoom->getParam($_REQUEST, 'comment'));
    $zoom->_gallery->_images[$key]->addComment($uname,$comment);
        }

and replace them with:

 

if ($zoom->_gallery->_images[$key]->isMember($popup)) {
include ($mosConfig_absolute_path.
'/administrator/components/com_securityimages/server.php');
$checkSecurity = checkSecurityImage($security_refid, $security_try);
if ($submit === true) {
        if ($checkSecurity==false){
        echo "";} else{ $uname = $zoom->getParam($_REQUEST, 'uname'); $comment = ($zoom->getParam($_REQUEST, 'comment')); $zoom->_gallery->_images[$key]->addComment($uname,$comment); }} 

And that’s it! You should now have captcha images showing up on your zOOm gallery comment boxes, avoind the huge ammount of spam that this component is usually victim.

 

This code was implemented in this website: Carapecos Online – Photo Gallery and is currently using SecurityImages component 4.2.1 

VN:F [1.9.11_1134]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.11_1134]
Rating: 0 (from 0 votes)

Popularity: 17% [?]

CASCON 2006

Wednesday, September 6th, 2006

CASCON 2006 wil take place from October 16 to October 19, in Toronto, Canada. 

"CASCON 2006 is the 16th in the Annual International Conference hosted
by the IBM Centers for Advanced Studies. This "Meeting of Minds"
provides an exciting forum for exchanging ideas and experiences in the
ever-expanding and critical fields of software development and
computing."

I will be presenting at CASCON, doing both a workshop and a technology showcase. Both sessions will be about the same subject: DB2 9 and it’s pureXML™ features.

VN:F [1.9.11_1134]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.11_1134]
Rating: 0 (from 0 votes)

Popularity: 4% [?]

DBI1082E error message when creating new DB2 instance

Tuesday, September 5th, 2006

I recently spent a few hours at work trying to understand why I was receiving the DB2 error message with code DBI1082E.
After
I installed DB2 on an AIX machine, I needed to create an instance. When
running "db2icrt vrodrig", I got this error. The error message was:
DBI1082E

The file or directory /home/vrodrig/sqllib already exists.

At
the first time I hit the error, the solution was obvious: just go and
delete the folder, that existed because of a previous DB2 installation.
However, the error persisted. And even more funny, there was a new
/home/vrodrig/sqllib folder being created every time I ran "db2icrt
vrodrig". This was strange. I deleted the folder before running
db2icrt, but when running the command, it would always fail, and there
would be a new

/home/vrodrig/sqllib folder there. So, the symptom was something like:
sqllib folder is only created when db2icrt is ran, but db2icrt fails
because sqllib already exists.


After searching on google, only one link revealed itself of some interest and usefullness. It was this post at developerWorks.
 Although
the post didn’t had the solution for my problem, it had some ideas that
led me to fix the problem. And the problem was that because I was
logging in to the system with the user id vrodrig, there was already a
db2profile file from the previous installation being sourced at login
time. This would cause the actual db2 installation to write some stuff
to

/home/vrodrig/sqllib even before creating the instance. To fix the
problem, just login to the system with a different user, then "su" to
root, delete the folder
/home/vrodrig/sqllib, run "db2icrt vrodrig" and voila, you are done! (Note: replace vrodrig and /home/vrodrig/sqllib with your user id and sqllib folder).


Just
as a side note, either this is not a very common error, or there isn’t
that many information about DB2 out there. I found just one link
talking about the same problem.

VN:F [1.9.11_1134]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.11_1134]
Rating: +1 (from 1 vote)

Popularity: 17% [?]

Programming Perl

Thursday, April 27th, 2006

I have finally decided to learn Perl. I like to be constantly learning new programming languages, and I’ve been delaying my Perl introduction for a long long time.
I want to develop a TWiki
plugin to track the progress of our product testing and, since TWiki is
written in Perl, this will be my opportunity to learn and practice the
language.
Besides using some ideas and code from TWiki’s Project Planner Plugin,
I also bought a Perl book, for those moments when I want to really
understand things instead of just copy and paste from the web.
0596000278.01._AA_SCMZZZZZZZ_.jpgI was indecisive between the books "Learning Perl" and "Programming Perl",
and my choice was the second one. Since somebody at work already has
the first one, we can now share our books when needed (we are both Perl
newbies :-)).
The book came from Barnes & Noble, with a 20% company’s discount.

VN:F [1.9.11_1134]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.11_1134]
Rating: 0 (from 0 votes)

Popularity: 2% [?]