Re: how to disable trackback?
Atsushi Shibata <[email protected]> Sun, 4 Jun 2006 00:37:47 +0900
| Newsgroups | gmane.comp.python.zope.coreblog.english |
|---|---|
| Organization | Webcore |
| Message-ID | <[email protected]> |
Hi :-).
On Sat, 3 Jun 2006 15:29:00 +0000 (UTC), wrote:
> Hi, thanks for your answer.
>
> I have check that tbping file, but i really dont understand what you mean.
>
> I see this code inside:
>
> ------
>
> excerpt = ''
> if form.has_key('excerpt'):
> excerpt = form['excerpt']
>
> -----
>
> What do you suggest me to do to make this work as a filter?
Put floowing code after if block, so you can avoid trackback including
"buzz words" string.
if excerpt.lower().find("buzz words") == -1:
return
If you use Python 2.3, you can also write like this.
if "buzz words" in excerpt.lower():
return
I think you should learn more about Python ;-).
Have fun :-)
----------------------------------------
Atsushi Shibata (Webcore Corp.)
[email protected]
http://www.webcore.co.jp/
----------------------------------------
_______________________________________________
COREblog-en mailing list
COREblog-en-/9qXvnWia/9Wk0Htik3J/[email protected]
http://postaria.com/mailman/listinfo/coreblog-en
Unsubscription writing to coreblog-en-leave-/9qXvnWia/9Wk0Htik3J/[email protected]