[COREblog-en] how to disable trackback?

Atsushi Shibata shibata at webcore.co.jp
Sat Jun 3 17:37:47 CEST 2006


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.)
shibata at webcore.co.jp
http://www.webcore.co.jp/
----------------------------------------



More information about the COREblog-en mailing list