Page 1 of 1

API event hook AJAX question

Posted: Tue Sep 18, 2007 8:25 pm
by viperjason
Does the current system allow for using AJAX with event plugins?

My main issue seems that every call to my code seems to also combine in other plugins that I dont want.

I dont seem to be explaining what I want, so let me try again.

I would like an event based off of a 'GET' where it will only output the plugin results and not the entire page.

Something like
?serendipity[Module]=clean_display&serendipity[Action]=myPlugin

so when I hook into that event and I do
echo 'Hello';

Only hello appears on the page.

If this doesnt exist then I will add it to my site but I would like to know first if it does exist before I make changes to the base code of s9y

Posted: Tue Sep 18, 2007 10:18 pm
by viperjason
Never mind, I found it....using the event external_plugin.

www.site.com/plugin/?serendipity[myplugin]=blah

Posted: Wed Sep 19, 2007 1:42 pm
by garvinhicking
Hi!

Yes, exactly like that. Tell me if you have issues with it.

Regards,
Garvin

Re: API event hook AJAX question

Posted: Thu Oct 29, 2009 7:07 am
by louenlax
How would I check a mySQL database for new entires and display the results using AJAX? I'm making a website code, and I need to use a code that would check the database, and display the results. However, it needs to be as close to real time as possible. So as soon as new information is entered into the database, I need to display the results.

Re: API event hook AJAX question

Posted: Thu Oct 29, 2009 10:08 am
by garvinhicking
Hi!

Write up a simple PHP script that you can call using mysql_query() and execute a query on the serendipity_entries table. If you need it as fast as possible, don't use the s9y plugin framework for that, but a plain PHP script.

Regards,
Garvin

Re: API event hook AJAX question

Posted: Wed Nov 04, 2009 9:01 am
by mathew
Hello all
I am Mathew martin,currently I am working on mysql but i have problem of ajax cause i don't know the ajax so anyone can help me to learn it and give me some link..
Thanks

Re: API event hook AJAX question

Posted: Wed Nov 04, 2009 10:36 am
by garvinhicking
Hi Mathew!
mathew wrote:Hello all
I am Mathew martin,currently I am working on mysql but i have problem of ajax cause i don't know the ajax so anyone can help me to learn it and give me some link..
Thanks
This is a wrong forum for questions like these, you should look on php.net for general PHP forums, or simply google for "ajax tutorials".

Regards,
GArvin