Re: comments plugin

Dieter Plaetinck <dieter-7FYLOmueu/[email protected]> Mon, 27 Dec 2010 17:07:10 +0100
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <[email protected]>
On Fri, 24 Dec 2010 12:02:11 -0500
will kahn-greene <[email protected]> wrote:

> On 12/24/2010 07:19 AM, Dieter Plaetinck wrote:
> > Guys, I'm fighting with the comments plugin and have some questions:
> > 
> > * who still has a copy of magicwords.py? the reference to it has
> > been removed from git 2 years ago, and i can't find the plugin
> > anywhere online.
> >   http://gitorious.org/pyblosxom/pyblosxom-web/commit/20c41ad28f2c42b5cdb3ad34eb46fbb386bbd507
> >   preferrably a recent version, i'm running (trying to) PB 1.5
> 
> I don't think I've ever heard of that plugin.

Nathan, the original author, has sent it to me.  I tested it and it
still works great, it doesn't have a home, so I suggest to merge
it in the official repo.
http://gitorious.org/pyblosxom/pyblosxom/merge_requests/8


> > * can I prohibit users from using the nickname 'Dieter_be', my full
> >   name, a hostname on my domain, etc in the name/url/e-mail fields?
> 
> I don't know what you mean by "prohibit".  You can probably write a
> rejection plugin that does this.  There are examples out there.

perfect.  I wrote a plugin to do this.
https://github.com/Dieterbe/dieterblog/commit/8c0295b9159b1b9765d345e1f2c612b3027d94ae
If you think such a plugin is material to be included in the repo, I
don't mind putting it in my pb repo and doing a merge request.  just
let me know.

> > * is it possible to show "validition warnings" when a comment is not
> >   accepted?  when i try to make comments and i "forget" a field like
> >   'Name', the comment will be silently dropped, forcing me to fill
> > in everything again, and hoping it's better the n+1th try.
> >   i would expect the new page contains all my text but error
> > messages for the appropriate fields.  Also, fieldnames in bold for
> > mandatory stuff would be useful. (although i can easily just hack
> > that in the template)
> 
> Now that I know of.

Well, from working with the rejection plugins, i now know the
validation part can be done easily.  just too bad the error message is a
simple "Comment rejected", I would like per-field error messages which
I could populate like "This is not a valid email address".

Noted on my todo list.. something I could fix once I understand PB
well enough.. in two years or so ;)

It's also interesting, that when my nopose plugin, or the magicword one
rejects a comment, you get the form back with the entered data intact.
however, when the comments plugin itself rejects a comment (because the
author or comment field is empty), you "loose" your entered data. 

Dieter

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl