| View previous topic :: View next topic |
| Author |
Message |
useeliger Pivot Groupie In Training


Joined: 23 Jun 2005 Posts: 5
|
Posted: Wed Jul 12, 2006 9:14 am Post subject: metaweblog.php |
|
|
| Where can I get metaweblog.php? The mentioned URL is no longer valid. |
|
| Back to top |
|
 |
useeliger Pivot Groupie In Training


Joined: 23 Jun 2005 Posts: 5
|
Posted: Wed Jul 12, 2006 9:47 am Post subject: Re: Post to Pivot from a Desktop App |
|
|
| I have found it - sorry |
|
| Back to top |
|
 |
b83s Pivot Groupie In Training


Joined: 26 Jul 2006 Posts: 2
|
Posted: Thu Jul 27, 2006 4:37 am Post subject: cannot post with metaweblog |
|
|
Hello,
I am trying to use the metaweblog functionality but it is not working for me. I did see somebody got it working with the performancing (i am using that).
I can add the weblog and select the default weblog but i can't post. The posts are not even showing in the entrie overview.
i downloaded pivot 3 day ago, so its version 1.30.
Does somebody has an idea?
Thanks |
|
| Back to top |
|
 |
hansfn Pivot Team


Joined: 15 May 2004 Posts: 5286 Location: Molde, Norway
|
|
| Back to top |
|
 |
Mickey98 Sub Minion of Pivot Groupie-Ness


Joined: 28 Sep 2005 Posts: 12 Location: NL
|
Posted: Tue Aug 15, 2006 1:08 pm Post subject: Ecto problems |
|
|
I can setup Ecto according to the posts, the console even retreives the categories but when I try to refresh these categories the following error-message:
Could it be a problem related to this post:
http://forum.pivotlog.net/viewtopic.php?t=10352&highlight= |
|
| Back to top |
|
 |
hansfn Pivot Team


Joined: 15 May 2004 Posts: 5286 Location: Molde, Norway
|
|
| Back to top |
|
 |
hansfn Pivot Team


Joined: 15 May 2004 Posts: 5286 Location: Molde, Norway
|
Posted: Fri Aug 18, 2006 7:58 pm Post subject: Re: Post to Pivot from a Desktop App |
|
|
Unrelated to Mickey's problems above, I have created a new much, much improved version of metaweblog.php - get it from http://home.himolde.no/~nordhaug/development/pivot/metaweblog-19082006.zip
Highlights:- Reported categories in your blog app is correct - you can now post to multiple categories.
- Reported weblogs in your blog app is correct - no longer misusing it for categories.
- If your blog app doesn't send category info, the first allowed category (if any) in the weblog will be used.
- Dates are correct (for example in the list of recent posts if your blog app supports that)
- Username/password check is now always correct.
- Proper documented source code (but normal users don't care much about this).
I have fixed most of the Notes/Known Issues on http://pivotlog.net/docs/doku.php?id=metaweblog_functionality When you have tested the new version and we have fixed any issues, I'll fix
| Quote: |
| Administrative “superusers” can only edit their own posts. |
and support for image upload (!) through the newMediaObject function in the MetaWeblog API.
I have tested some myself:
1) Ecto - everything works.
2) Performancing - everything works
3) Windows Live Writer - everything works, except get ting the categories. (There are many error messages, but things seems to work.)
NB! To use the new metaweblog.php, you must add
| Code: |
/**
* Finds which cats are published by a certain blog.
*
* @param string $weblog
* @return array
*/
function find_cats_in_weblog($weblog) {
global $Weblogs;
$cats = array();
foreach ($Weblogs[$weblog]['sub_weblog'] as $subweblog) {
foreach ($subweblog['categories'] as $subweblogcat) {
if (in_array($subweblogcat,$cats)) continue;
$cats[] = $subweblogcat;
}
}
return $cats;
} |
in pvlib.php for example right after the find_weblogs_with_cat function.
Please test so I can commit the work - to be included in Pivot 1.31 |
|
| Back to top |
|
 |
John Platinum Sponsor


Joined: 29 Jul 2003 Posts: 26 Location: Scotland
|
|
| Back to top |
|
 |
hansfn Pivot Team


Joined: 15 May 2004 Posts: 5286 Location: Molde, Norway
|
Posted: Mon Aug 21, 2006 8:27 am Post subject: Re: Post to Pivot from a Desktop App |
|
|
I'm glad it worked better for you, John.
I'm happy to announce that Pivot's metaweblog API now supports image upload - I have implemented metaWeblog.newMediaObject. Get the new version from http://home.himolde.no/~nordhaug/development/pivot/metaweblog-21082006.zip
In addition to the additions to pvlib.php I mentioned above, you must do two one-line changes:
| Code: |
-function write_file($filename, $output) {
+function write_file($filename, $output, $mode='w') {
- if ($fh = @fopen( $filename, 'w' )) {
+ if ($fh = @fopen( $filename, $mode)) { |
in the function write_file - read the code above as: Replace line "-" with line "+". Easy?
I have tested with Ecto and Windows Live Writer and image upload/inserting in posts works flawlessly. Please test with any other blog clients that might support newMediaObject. |
|
| Back to top |
|
 |
neezee Platinum Sponsor


Joined: 27 Sep 2003 Posts: 973 Location: Marcipan-City (Lübeck), Germany
|
Posted: Mon Aug 21, 2006 2:12 pm Post subject: Re: Post to Pivot from a Desktop App |
|
|
very very VERY cool.
Pivots lack of being able to be used by these tools really drove me nuts for a long time and now even being able to possible load up images with it - wonderful.
Thanks you very much for this. I really did not want to go away from Pivot but this had become an issue for me while at the same time I do lack the knowledge of making it work myself.
Going updating the software now ))) _________________ englisch blog | german blog| geschenkideen zu weihnachten |
|
| Back to top |
|
 |
John Platinum Sponsor


Joined: 29 Jul 2003 Posts: 26 Location: Scotland
|
|
| Back to top |
|
 |
hansfn Pivot Team


Joined: 15 May 2004 Posts: 5286 Location: Molde, Norway
|
Posted: Mon Aug 21, 2006 7:10 pm Post subject: Re: Post to Pivot from a Desktop App |
|
|
So you are creating your own blog "app" written in appleScript? Nice. However, I don't know appleScript - never had a Mac - so i can't help. It for sure looks as you are sending the filename instead of the contents of the file named filename...
As you understand, I haven't been able to test TextMate because it's a Mac app. What data is stored in TextMate's blog accounts (or whatever they call it) - I'm thinking about blog ID in particular. Did TextMate use this data - http://www.sandaigprimary.co.uk/pivot/rsd-johnjohnston.xml? The interesting part is why TextMate reports blog "0" - when the correct blog id is "john_johnston" ... _________________ My Pivot bookmarks, snippets and scripts| Pivot Documentation Project: Template tags |
|
| Back to top |
|
 |
John Platinum Sponsor


Joined: 29 Jul 2003 Posts: 26 Location: Scotland
|
Posted: Tue Aug 22, 2006 1:41 am Post subject: Re: Post to Pivot from a Desktop App |
|
|
Hi hansfn,
Thanks for the ideas, I'll dig around and try to work it out.
long term I am thinking of automating various posts with appleScript, just playing at the moment. I'll post some basic scripts for others to use sometime.
textMate does not seem to send a blog id. I can't see where to enter it.
FWIW the blogging bundle is the creation of Brad Choate and at the moment does not handle blog id
I guess the TextMate blog is the place to ask questions.
Thanks again _________________ ----------
My pivot: http://www.sandaigprimary.co.uk/pivot/johnjohnston.php
school pivot: http://www.sandaigprimary.co.uk/pivot/index.php |
|
| Back to top |
|
 |
hansfn Pivot Team


Joined: 15 May 2004 Posts: 5286 Location: Molde, Norway
|
|
| Back to top |
|
 |
John Platinum Sponsor


Joined: 29 Jul 2003 Posts: 26 Location: Scotland
|
Posted: Tue Aug 22, 2006 6:09 pm Post subject: Re: Post to Pivot from a Desktop App |
|
|
Hi hansfn,
I've commented on the TextMate blog, hopefully I get some info.
The images I am uploading with appleScript now seem to stay encoded.
If I download them and decode them I get the image.
EG downloading this in the terminal with curl:
http://www.sandaigprimary.co.uk/pivot/images/testimage.jpeg
and then:
openssl base64 -d -in testimage.jpg > decode.jpg
I get my image.
Is there some sorts of encoded files that php doesn't encode, or is there a version of php that doesn't decode? Or does anyone know of a better waty to encode than:
openssl base64 -in pathoffile
On a mac.
(I am kind of way over my head now)  _________________ ----------
My pivot: http://www.sandaigprimary.co.uk/pivot/johnjohnston.php
school pivot: http://www.sandaigprimary.co.uk/pivot/index.php |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|