how to use W.bloggar

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

how to use W.bloggar

Post by abdussamad »

Hello

I have done my homework before posting this. I searched the forums and tried everything I could think of but I still can't get w.bloggar to work with serendipity. I installed the xmlrpc plugin. Then I directly accessed serendipity_xmlrpc.php using FF. I get an error message:

faultCode 105 faultString XML error: Invalid document end at line 1

which may or may not mean anything. Setting $debug_xmlrpc to true in /plugins/serendipity_xmlrpc/serendipity_xmlrpc.inc.php did not yield a log file in /tmp .

Using w.bloggar version 4.0 I tried setting up a new account like this:

1. blog tool - I tried various options including custom and movable type.
3. In any case the urls I tried was "http://abdussamad.5gigs.com/" for the host and "/serendipity_xmlrpc.php " for the path
2. With custom I am given three list boxes to choose my posts api (blogger or metaweblog), categories type (metaweblog -single, metaweblog -multi or no categories) and templates (blogger api or no templates). I must have tried every combination of these.

The error messages I get vary from "http send request failed" if I select https and port 443 as the port or "type mismatch" when using http and port 80. So would someone please tell me how to use w.bloggar with serendipity?

Thanks[/img][/url]
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

A few other vital stats

Post by abdussamad »

I forgot to include these before so here they are:

Serendipity version 0.9
Apache Version : 1.3.34 (Unix)
PHP Version : 5.0.5
DB is sqlite
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: A few other vital stats

Post by garvinhicking »

Hi!

Sadly I only got german messages, so I'll try to re-translate them to english. They might not exactly match, but you'll surely understand it. :)

(Please disregard most of this tutorial; you basically did everything right but there was a bug in version 1.21 of the plugin. Skip to the bottom of this to see more)

After having installed a recent version of the XMLRPC serendipity plugin (current: 1.22) you can start w.bloggar 4.00.

When the w.blogger wizard pops up, choose "Yes, I want to use an existing blog". Click next.

On the next screen, choose "Custom" (last item on the list) for your blog system. Enter "Serendipity" as the name of your blog, or anything else you'd like to call it. Do not check the "Ping" option underneath it. If your internet connection requires you to choose a Proxy server, enable that option. Usually you leave it empty. Then click next.

On the next screen choose these values for the dropdowns:

Entries: metaWeblog API
Categories: metaWeblog API Single
Templates: Not supported
Title Tags: <title> </title>
Category Tags: <category> </category>
More-Tags: <mt_text_more> </more_text>

Click next.

As the hostname, you need to enter the hostname of your serendipity blog. It explicitly tells you to NOT prefix http:// and NOT use an ending slash. In your example you would need to enter "abdussamad.5gigs.com" there. For the URL, you enter the path to the serendipity_xmlrpc.php file. In your example this would be "/serendipity_xmlrpc.php".

If your server where serendipity runs on supports HTTPS, you can check it. Usually you do not check the HTTP option and stay with Port 80.

Click next.

On the next screen enter the username and password of your Serendipity account.

Click Finish.

Now you can post to your blog.

NOTE for users of 1.21 plugin: This plugin had a bug. In line 87 of th eserendipity_xmlrpc.inc.php plugin file, this line was contained:

Code: Select all

$blogs = $blog1;
This needs to be removed, or else the output of the getUsersBlogs command cannot be evaluated by w.bloggar.

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/
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

Post by abdussamad »

Thanks for your reply. Commenting out the line of code you specified allows me to post using w.bloggar. However when posting instead of category names in the category list box I get category descriptions. This wouldn't be a problem if selecting a category description resulted in a post to that category but it doesn't. For ex: instead of the general category I get the description "anything goes". Selecting this does not result in a post to the general category. I also tried posting using the performancing extension to firefox but here again I cannot post to a category. Is there a fix for this?

I must say that I like serendipity. I especially like its fast loading pages and the ease with which I can add images to my posts. I have tried WP and joomla but I think serendipity is the best. I think it is because I used to live in the island of serendipity-Sri Lanka :D
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: A few other vital stats

Post by stm999999999 »

garvinhicking wrote:Hi!
On the next screen, choose "Custom" (last item on the list) for your blog system.
It would be nice, if the developers here could speak with the developer(s) to add s9y-direct-Support in w.bloggar. The preconfigured configs would make it mutch easyer for s9y-users.

And it would be a nice advertising to stand in http://wbloggar.com/faq.php#243 - and with a logo on http://www.wbloggar.com/images/wb-tools.png
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: A few other vital stats

Post by garvinhicking »

Hi Stephan!

We have contacted w.bloggar developers a year ago, and once again 6 months ago. They do not reply to us. Wonder why that is. Bad karma, I figure. Much less known blog applications are listed in their interface. Maybe if more users write to them, they will listen?

Abdussamad: Great you like Serendipity! And even greater to here we have a user from Sri Lanka. :-)

What you found there was yet another bug, so thanks a lot for that. I personally don'T use XML-RPC editing, so I'm always in need of people reporting me such issues. The fix for your code was:

Code: Select all

--- serendipity_xmlrpc.inc.php  22 Apr 2006 19:52:06 -0000      1.11
+++ serendipity_xmlrpc.inc.php  23 Apr 2006 17:55:03 -0000
@@ -170,7 +170,7 @@
     foreach ((array) $cats as $cat ) {
         if ($cat['categoryid']) $xml_entries_vals[] = new XML_RPC_Value(
             array(
-              'description'   => new XML_RPC_Value($cat['category_description'], 'string'),
+              'description'   => new XML_RPC_Value($cat['category_name'], 'string'),
               'htmlUrl'       => new XML_RPC_Value(serendipity_categoryURL($cat, 'serendipityHTTPPath'), 'string'),
               'rssUrl'        => new XML_RPC_Value(serendipity_feedCategoryURL($cat, 'serendipityHTTPPath'), 'string')
             ),
So you just need to replace "category_description" with "category_name" inside the serendipity_xmlrpc.inc.php file at around line 170. :-) I also committed this to CVS!

Thanks a lot and have fun with serendipity,
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/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: A few other vital stats

Post by stm999999999 »

garvinhicking wrote:Hi Stephan!

We have contacted w.bloggar developers a year ago, and once again 6 months ago. They do not reply to us. Wonder why that is. Bad karma, I figure. Much less known blog applications are listed in their interface. Maybe if more users write to them, they will listen?
Bad to hear this :-( but thanks for the fast answer :-)
Ciao, Stephan
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

Post by abdussamad »

hello Gavin

After making the change you specified I can now post using w.bloggar to single categories. But there are a few more bugs.

For one, I can't post extended entries. Text entered in the more text field is either lost or does not form part of the extended text.

Secondly, when posting using performancing I can post to multiple categories. Now I know you specified that I use the metawblog- single category api but with w.bloggar I set metaweblog- multi as the category api. But it always posts to the "assorted utilities" category in addition to the categories that I select. Now the "assorted utilities" category is the first category if you place the categories in alphabetic order. It has an id of 6 and is a sub category of the "freeware" category.

I think once these bugs are ironed out serendipity may be included on the w.bloggar site :D.

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

Post by garvinhicking »

Hi!

About the extended entries: Did you read my HowTo about the "mt_text_more" setup instead of "more_text"?

I just tested with my w.blogger - it does not seem to work; w.bloggar is not submitting the "mt_text_more" field to Serendipity. So it's a bug with w.bloggar, I must assume. What is not sent to s9y cannot be interpreted :-D

About multi categories: This was not supported, as you saw from my tutorial posting. I just added real support for it. w.bloggar was sending one additional empty category (d'oh!) which caused the first category to be assigned for that. This was fixed with this:

Code: Select all

Index: serendipity_xmlrpc.inc.php
===================================================================
RCS file: /cvsroot/php-blog/additional_plugins/serendipity_event_xmlrpc/serendip
ity_xmlrpc.inc.php,v
retrieving revision 1.12
diff -u -r1.12 serendipity_xmlrpc.inc.php
--- serendipity_xmlrpc.inc.php  23 Apr 2006 17:56:59 -0000      1.12
+++ serendipity_xmlrpc.inc.php  24 Apr 2006 14:34:57 -0000
@@ -360,13 +360,17 @@
         foreach($post_categories AS $cat_id => $cat_obj) {
             if (is_object($cat_obj)) {
                 $cat_name = $cat_obj->getval();
-                $cat = serendipity_fetchCategories(null, $cat_name);
-                if (isset($cat[0]['categoryid'])) {
-                    $categories[$cat[0]['categoryid']] = $cat[0]['categoryid'];
+                if (!empty($cat_name)) {
+                    $cat = serendipity_fetchCategories(null, $cat_name);
+                    if (isset($cat[0]['categoryid'])) {
+                        $categories[$cat[0]['categoryid']] = $cat[0]['categoryi
d'];
+                    }
                 }
             } elseif (is_array($cat_obj) && isset($cat_obj['categoryId'])) {
                 $cat_id = $cat_obj['categoryId']->getval();
-                $categories[$cat_id] = $cat_id;
+                if (!empty($cat_id)) {
+                    $categories[$cat_id] = $cat_id;
+                }
             }
         }
     }

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/
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

Post by abdussamad »

I don't why but now I can't post at all. I may have made a mistake in copying the new code but for the life of me I can't see where. Here is the relevant snippet

Code: Select all

        foreach($post_categories AS $cat_id => $cat_obj) {
            if (is_object($cat_obj)) 
	    {
                $cat_name = $cat_obj->getval();
               // $cat = serendipity_fetchCategories(null, $cat_name);
                //if (isset($cat[0]['categoryid'])) {
                 //   $categories[$cat[0]['categoryid']] = $cat[0]['categoryid'];
	      if (!empty($cat_name)) 
	      {
                    $cat = serendipity_fetchCategories(null, $cat_name);
                    if (isset($cat[0]['categoryid'])) 
		    						{
                        $categories[$cat[0]['categoryid']] = $cat[0]['categoryid'];
                    }
		
	      }
       } elseif (is_array($cat_obj) && isset($cat_obj['categoryId'])) {
                $cat_id = $cat_obj['categoryId']->getval();
								if (!empty($cat_id)){ 
                    $categories[$cat_id] = $cat_id;
                
         //       $categories[$cat_id] = $cat_id;
				 					}
            }
        }
    }
You can also view the entire code as a text file
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You might want to just download the full new file:

http://netmirror.org/serendipity/additi ... pc.inc.php

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/
abdussamad
Regular
Posts: 117
Joined: Fri Apr 21, 2006 10:11 pm
Location: Karachi, Pakistan
Contact:

Post by abdussamad »

Everything seems to be okay now. Thanks for all your help
Post Reply