Re: Magic Word / trackback plugin
Nathaniel Gray <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi guys,
I'm no longer using pyblosxom so the magic word plugin is basically
unmaintained. If you need me to apply a patch or something I'll be
happy to do it, but the best thing would be for somebody else to take
over maintainership.
Cheers,
-n8
Ryan Barrett wrote:
> hi! sorry for the delay. i'm cc'ing steven armstrong, who wrote nospam,
> and nathan gray, who wrote magic word. steven, nathan, the full original
> email is at the bottom.
>
> On Mon, 11 Dec 2006, shunuhs wrote:
>
>> Then, I confirmed other comment spam plugin , "nospam" plugin.
>> The "nospam" plugin included the following code to not reject trackback
>> in cb_comment_reject().
>>
>> > comment = args['comment']
>> > if comment['author'].count("Trackback") > 0:
>> > return False
>>
>> Is the "Magic Word" plugin needed such a code?
>
> hmm. i haven't spent much time with nospam or magic word, since they're
> not included in the pyblosxom contrib package. having said that, if
> nospam specifically detects trackbacks, and magic word doesn't, and it's
> currently rejecting trackbacks...then yes, it's a good bet that adding
> the above code would fix that.
>
>
>> The "no spam" plugin check which comment['author'] include "Trackback"
>> string.
>> If comment author field include "Trackback" in comment spam,
>> dose the comment spam pass through a reject filter?
>
> hmm, maybe. i'll defer to steven on that one. steven, shunuhs has
> included a patch to nospam.py in the original email, below.
>
> -Ryan
>
> --
> http://snarfed.org/
>
>
> ---------- Forwarded message ----------
> Date: Mon, 11 Dec 2006 11:16:00 +0900
> From: shunuhs <[email protected]>
> To: pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: [Pyblosxom-devel] Magic Word / trackback plugin
>
> Hi,
>
> I'm using Magic Word plugin to prevent comment spam,
> I like it for easy to use and very useful.
>
> But I have a problem.
>
> I'm using trackback plugin, too.
> When I use "Magic Word" and "trackback" both plugins,
> "Magic Word" plugin reject all trackback!
>
> Then, I confirmed other comment spam plugin , "nospam" plugin.
> The "nospam" plugin included the following code to not reject trackback
> in cb_comment_reject().
>
> > comment = args['comment']
> > if comment['author'].count("Trackback") > 0:
> > return False
>
> Is the "Magic Word" plugin needed such a code?
>
>
> Next, I have a question.
>
> The "no spam" plugin check which comment['author'] include "Trackback"
> string.
> If comment author field include "Trackback" in comment spam,
> dose the comment spam pass through a reject filter?
>
> I think, in trackback plugin, when cdict dictionary have the data
> indicate trackback, other plugin can check which comment or trackback
> data safely, such a following code.
>
> --- trackback_org.py 2006-12-11 10:41:16.953916800 +0900
> +++ trackback.py 2006-12-11 10:50:59.271248000 +0900
> @@ -95,7 +95,8 @@
> 'pubDate' : str(time.time()), \
> 'link' : form['url'].value, \
> 'source' : form.getvalue('blog_name', ''), \
> - 'description' : form.getvalue('excerpt', '') }
> + 'description' : form.getvalue('excerpt', ''), \
> + 'comment_type' : 'trackback' }
> from Pyblosxom.entries.fileentry import FileEntry
> from Pyblosxom.pyblosxom import Request
> from Pyblosxom.pyblosxom import PyBlosxom
>
> In this case, magic_word can modify the following to not reject trackback.
>
> --- magicword_org.py 2006-12-09 11:47:30.678048000 +0900
> +++ magicword.py 2006-12-11 10:54:46.628171200 +0900
> @@ -89,6 +89,10 @@
> @return: True if the comment should be rejected, False otherwise
> @rtype: C{bool}
> """
> + comment = args['comment']
> + if comment.get('comment_type') == 'trackback':
> + return False
> +
> request = args['request']
> form = request.getForm()
> data = request.getData()
>
> If the above modification, for trackback, magic_word plugin, has no
> problem,
> please apply these next release.
>
>
--
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV