1
MikeOConnor
Re: Akismet implementation for Xoops -- Comments

Ah! Perfecto.

The only thing I forgot was to pull the Akismet class stuff into the Class directory (read up the thread a little bit for that gizmo).

Once I did that, it worked like a charm just like you've posted it (of course, I'm running PHP5 which is the version of the code you're using -- for most folks, you'll want to substitute the PHP4 version but the mapping should be easy).

I'm loving this hack -- it lets Akismet take a look at all comments in the system, not just the ones coming through AMS.

You da man! Sorry it took me sooo long to try it out. My excuse is that all of the hacking time has been sucked up by studying for the ham-radio license exam. But putting this into my system was a really rewarding 15 minute break from radio.

Thankyou thankyou thankyou!!



2
MikeOConnor
Re: Akismet implementation for Xoops -- AMS

Uffda... I need some help from the assembled gang. I went rummaging for the place to put the Akismet call in AMS and can't figure out where to put it. Anybody out there understand AMS well enough to be able to tell me where it actually posts a comment to the database?

There are several layers of included calls in AMS and I'm not enough of a programmer to be able to figure out which is the one that actually does the posting. I have a feeling that AMS may be using XOOPS core code to do the posting, which would be neat because then the hack would catch comment spam in *all* comments, not just the ones in AMS. But, like I said, I can't figure out where to insert the code.



3
MikeOConnor
Re: Akismet implementation for Xoops

Ok here's the code that I used to fix comment spam in the "Contact us" XOOPS module. Works a treat!

I put the Akisment.class.php file in the Class folder (yep, made sense to me too).

I modified the modules/contact/index.php file. I inserted your code between these two lines in that file -- this is where the file gets set to send the email;

$xoopsMailer->setBody($adminMessage);
$xoopsMailer->send();

I took your code, stuck in my info (site, Wordpress key, etc) and ran up the code looking for variables that would work. The first time I tried it, I wound up with a blank screen, so i commented it out and then uncommented each line. As I came across errors (leading to a blank screen) I'd fix 'em. Completely nifty.

Quote:

// start Akismet hack --
include_once XOOPS_ROOT_PATH . '/class/Akismet.class.php';
$WordPressAPIKey = 'PutYourKeyHere';
$MyBlogURL = 'http://www.YourName.Tld/modules/AMS';
$name = $usersName;
$comment = $usersComments;

$akismet = new Akismet($MyBlogURL ,$WordPressAPIKey);
$akismet->setCommentAuthor($usersName);
$akismet->setCommentAuthorEmail($usersEmail);
$akismet->setCommentAuthorURL($usersSite);
$akismet->setCommentContent($usersComments);
$akismet->setPermalink('http://www.YourName.Tld/modules/contact');
if($akismet->isCommentSpam()){
// Here, the routine you want to perform when spam is caught
redirect_header( 'index.php', 2, 'Your submission looks like spam to us');
exit();
}
// end Akismet, store the submission normally


Perfecto! I pasted a little spam into the comment field and the module came back with that "your comment looks like spam to us". Put in a real message and it came through fine.

I'm completely fired up. AMS hack is next.



4
MikeOConnor
Re: Akismet implementation for Xoops

That was a completely nifty post! All the clues I need. And a great starting point for others as well, I'll bet.

Thanks for putting the little write-up about where to put the Akismet class. That helped me over a rough spot.

Thanks!



5
MikeOConnor
Re: Akismet implementation for Xoops

Hi Stew,

The thing I find appealing about Akismet integrated into XOOPS modules is that Wordpress doesn't do all the same stuff that XOOPS does. I use AMS for some complex sites, and I'd love to be able to stitch Akismet into those sites without having to convert them over to WordPress.



6
MikeOConnor
Re: Akismet implementation for Xoops

Sorry to revive such an old thread, but I would **love** to have more detail on how you wove Akismet into a XOOPS module. I've been using it with my WordPress blogs and it's absolutely the greatest thing since sliced bread. Cut my comment spam from 50 a day to zero.

My XOOPS blogs are getting hammered and Akismet would be just the ticket.

So, if you're still watching this thread, let me throw myself at your feet -- details would be GREAT.



7
MikeOConnor
Re: Podcasting

Yep, i gotta agree. i goofed around with the WordPress plugins and they're not robust enough -- way too many quirks (under XOOPS 2.13.0.2 anyway) for me to endorse that approach.



8
MikeOConnor
Re: Podcasting

here are some useful links for folks who might want to do some development;

The RSS specification can be found here;

http://www.rssboard.org/rss-specification


Here's a different ("unofficial") version that you might find useful;

http://www.shas3.com/rss,2,specification.html


A gizmo to validate the feed that is produced by your code can be found here;

http://feedvalidator.org/



9
MikeOConnor
Re: Podcasting

I second that thought -- use whatever module turns your crank (news, bbs, downloads, whatever).

But *don't* use the XML that XOOPS (or RSSFit, or whatever) produces -- those XML-generators don't grok enclosures and all the other goodies that the aggregators want. That's the value of post-processing your XML through Feedburner.



10
MikeOConnor
Re: Podcasting

No need for a module.

Here's how it would work using plain-vanilla Xoops.

- Create a podcast (MP3 file full of audio goodness)

- Upload that file to a web site somewhere (anywhere will work, not just your own server)

- Use Xoops's News module to create a great introduction to your podcast. At the end of that introduction, put a link to the URL of your uploaded podcast file (saying something like "click here to listen").

- The news story should be appearing in the default XOOPS RSS feed -- presuming it is, "burn" that feed over at Feedburner (www.feedburner.com).

- When you set it up, tell Feedburner that your RSS feed is a podcast -- Feedburner will then know to look through your RSS entries and if it finds a link to a media file (MP3, MOV, etc.) it will "enclose" it and present that enclosure to the podcasting software.

- Tell your friends to subscribe to your awesome new podcast using the Feedburner RSS feed rather than the default one from XOOPS (might want to rejigger the XOOPS pages so it points to the Feedburner feed rather than its own)

- Tell the podcast aggregators (Apple, Yahoo, etc) about your awesome new podcast -- again using the Feedburner feed, not the XOOPS one.

That's it. No module required -- just let Feedburner do all the heavy lifting.




TopTop
(1) 2 3 »



Login

Who's Online

117 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 117


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits