Prevent empty body & extended body in entrycheck_plugin

Creating and modifying plugins.
Post Reply
gregman
Regular
Posts: 91
Joined: Wed Aug 15, 2007 9:32 pm

Prevent empty body & extended body in entrycheck_plugin

Post by gregman »

Hi there,

as mentioned in the subject, I added two new options to the entry_check plugin; one for preventing empty entry bodies, one for preventing empty extended bodies. German, english and frensh language files updated as well. Maybe someone's gonna need these features too. Shall I upload it anywhere?

Regards
Greg
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Prevent empty body & extended body in entrycheck_plugin

Post by yellowled »

gregman wrote:as mentioned in the subject, I added two new options to the entry_check plugin; one for preventing empty entry bodies, one for preventing empty extended bodies. German, english and frensh language files updated as well. Maybe someone's gonna need these features too. Shall I upload it anywhere?
Sounds promising. Usually, Garvin and the coder guys prefer a diff (a file compaing the changes made compared to the current version). Can you provide a diff file? (I think it has to be a unified diff, but I'm not 100% sure.)

YL
gregman
Regular
Posts: 91
Joined: Wed Aug 15, 2007 9:32 pm

Re: Prevent empty body & extended body in entrycheck_plugin

Post by gregman »

Is there an app for this? ;-)
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Prevent empty body & extended body in entrycheck_plugin

Post by yellowled »

gregman wrote:Is there an app for this? ;-)
Depends on your OS. :)

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Prevent empty body & extended body in entrycheck_plugin

Post by garvinhicking »

Hi!

The complete ZIP file would also do. Preferably linked on a public URL so I can wget it, which makes updating it much more easy instead of needing to first extract a ZIP from an email, save it to disk, upload it to my server, and extract it there :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gregman
Regular
Posts: 91
Joined: Wed Aug 15, 2007 9:32 pm

Re: Prevent empty body & extended body in entrycheck_plugin

Post by gregman »

Hi Garvin,

here it is: http://www.studium-auskunft.de/uploads/ ... ycheck.zip

As I experienced some weired behavior I had to fix some bugs too. Hope everything is working now.

Regards
Greg
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Prevent empty body & extended body in entrycheck_plugin

Post by garvinhicking »

Hi!

Great. I saw you changed the boolean logic of the checks? That's odd, somebody should have noticed that, if the logic were inverted? Anyhow, I trust you to have checked that and got it working for you, so I committed your patch. Thanks a lot!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gregman
Regular
Posts: 91
Joined: Wed Aug 15, 2007 9:32 pm

Re: Prevent empty body & extended body in entrycheck_plugin

Post by gregman »

Yes, this was IMHO a bug. In the language files it says e.g.

Code: Select all

@define('PLUGIN_EVENT_ENTRYCHECK_EMPTYTITLE', 'Do not allow empty titles');
@define('PLUGIN_EVENT_ENTRYCHECK_EMPTYTITLE_DESC', 'If set to "true", an entry must not have an empty title.');
So you have to prevent saving the entry, if the config variables are set to true.

Regards,
Greg

EDIT: P.S.: I'm done with the ajax enhancement of the karma_plugin, http://board.s9y.org/viewtopic.php?f=11 ... #p10429061
Post Reply