Hello,
I want to post articles to s9y from an external script, but
also want to use the plugins (like google sitemap and rss ping).
Is this somehow possible?
Regards, neueruser.
ps. sorry for x posting (german-forum)
Post from external Skript
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Post from external Skript
If you use the Serendipity API functions, then this is no problem as the google sitemap plugin is called as well.
How does your script look like? Just call it something like this:
This inserts an entry and also updates the sitemap.gz.
HTH and Regards,
Garvin
How does your script look like? Just call it something like this:
Code: Select all
<?php
chdir('/path/to/s9y');
include 'serendipity_config.inc.php';
$entry = array(
'title' => 'Test',
'body' => 'Test'
);
serendipity_updertEntry($entry);
?>
HTH and 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/
# 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/
API-Documentation?
Hi,
at the moment i have got the same problem.
The code above inserts the new entry as draft.
How can i publish this entry and how can i check login/password with the Serendipity API functions?
Is there a documentation for this functions?
On s9y i only found a documentation about the Plugin API.
Regards,
Patrick
at the moment i have got the same problem.
The code above inserts the new entry as draft.
How can i publish this entry and how can i check login/password with the Serendipity API functions?
Is there a documentation for this functions?
On s9y i only found a documentation about the Plugin API.
Regards,
Patrick
http://blog.pd-digital.de (german)
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: API-Documentation?
Sadly this functionality has not yet been documented, thus you'll need to learn it by looking at the function.
You must set a "isdraft" => false attribute in your array to publish non-drafts.
Look at the mail2s9y additional plugin or the popfetcher plugin, both use the serendipity_updertEntry function to make new posts and both set appropriate things.
If you want to do full user authentication it is suggested you use XML-RPC blogger/MT API instead, which is implemented by s9y if you use the XMLRPC posting plugin.
Regards,
Garvin
You must set a "isdraft" => false attribute in your array to publish non-drafts.
Look at the mail2s9y additional plugin or the popfetcher plugin, both use the serendipity_updertEntry function to make new posts and both set appropriate things.
If you want to do full user authentication it is suggested you use XML-RPC blogger/MT API instead, which is implemented by s9y if you use the XMLRPC posting plugin.
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/
# 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/
Thanks for the fast answer.
Setting isdraft to false has got no effect because serendipity_updertEntry() checks the publishrights. So i need user authentication.
I will have a look at the popfetcher plugin - i think then everything becomes clear.
Regards,
Patrick
Setting isdraft to false has got no effect because serendipity_updertEntry() checks the publishrights. So i need user authentication.
I will have a look at the popfetcher plugin - i think then everything becomes clear.
Regards,
Patrick
http://blog.pd-digital.de (german)