The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Plugins Prevent empty body & extended body in entrycheck_plugin

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

Postby gregman » Tue Jan 31, 2012 6:26 pm

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

User avatar
yellowled
Regular
 
Posts: 4885
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Tue Jan 31, 2012 7:55 pm

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: 92
Joined: Wed Aug 15, 2007 9:32 pm

Postby gregman » Wed Feb 01, 2012 10:48 am

Is there an app for this? ;-)

User avatar
yellowled
Regular
 
Posts: 4885
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Wed Feb 01, 2012 12:45 pm

gregman wrote:Is there an app for this? ;-)

Depends on your OS. :)

YL

User avatar
garvinhicking
Core Developer
 
Posts: 28954
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Wed Feb 01, 2012 2:49 pm

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: 92
Joined: Wed Aug 15, 2007 9:32 pm

Postby gregman » Thu Feb 02, 2012 11:51 am

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

User avatar
garvinhicking
Core Developer
 
Posts: 28954
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Thu Feb 02, 2012 8:56 pm

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: 92
Joined: Wed Aug 15, 2007 9:32 pm

Postby gregman » Thu Feb 02, 2012 11:41 pm

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&t=17539&p=10429061#p10429061



Return to Plugins

Who is online

Users browsing this forum: No registered users and 2 guests