Front End validation in New Entry Creation

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
manoj
Regular
Posts: 49
Joined: Tue Sep 05, 2006 12:20 pm

Front End validation in New Entry Creation

Post by manoj »

HI,

While creation of new entry i want to add a front end validation that atleast 1 category be selected. If a category is not selected then on click of save button a dialog box should appear with message " Please select a category". I want to use java script function on click event of save button.
But there is already checkSave() function called on onclick event. should i write my logic in the same function? or if i write a separate function how to use it on onclick event?
Is this difficult task?
pls help me in the logic of this validation.
It would be grateful if u can provide the code for validation.
thanks and regards.
manoj
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Front End validation in New Entry Creation

Post by garvinhicking »

Hi!

Use the plugin serendipity_event_entrycheck / "Rules for publishing". :)

Best 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/
manoj
Regular
Posts: 49
Joined: Tue Sep 05, 2006 12:20 pm

Post by manoj »

thanks a lot ,once again!
Where should i look for that
I click on configure plugins then on Click here to install a new event plugin then what shud i do.
I am a naive user please tell me in detail.
really sorry for the trouble.
thanks.
manoj
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

It'S in spartacus / spartacus.s9y.org. Either download it from the URL or fetch it through the plugin. Look at www.s9y.org or spartacus.s9y.org for some more instructions, but it's pretty easy once the "spartacus" event plugin is installed. And your server may not be firewalled so that it can connect to the repository.

HTH,
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/
manoj
Regular
Posts: 49
Joined: Tue Sep 05, 2006 12:20 pm

Post by manoj »

What should i do after i download that plugin.
I downloaded serendipity_event_entrycheck.zip file unzipped it.
I got serendipity_event_entrycheck.php, some lang_xx.inc.php files and 2 folders.
now what shud i do to these files to make my validation work.
should i add serendipity_event_entrycheck.php file to plugins folder?
pls help me out.
i am stuck here.
thanks.
manoj
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You must create a directory "serendipity_event_entrycheck" inside your "plugins" directory. Put the files in that directory - just like all other plugins are layouted. Then go to the s9y admin panel, click on the link to install event plugins and then choose the new plugin "Rules for publishing".

HTH,
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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

That'll get you to a configuration screen, where you'll need to select what the plugin should do. I don't have it enabled myself, but it should be pretty self-explanatory. If you do have any problems with it, come back and we'll try to explain in more detail.
Judebert
---
Website | Wishlist | PayPal
manoj
Regular
Posts: 49
Joined: Tue Sep 05, 2006 12:20 pm

HI

Post by manoj »

Hi,

Instead of installing Serendipity_event_entrycheck plugin(Rules for publishing) from front end , through configure plugins link. can i install by running the insert sql statements on plugins,pluginlist,plugincategories and config table from back end?

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

Re: HI

Post by garvinhicking »

Hi!

Why would you want to do this manually? Of ocurse if you insert all the propery SQL commands it will work, but this is really complicated. :-)

Why not simply use the serendipity configure plugin panel? That's what it's there for. :)

Best 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/
Post Reply