XMLRPC errors, again

I’ve had issues with uploading images from ecto to Blogsome, but I wasn’t sure if it was an ecto or a Blogsome issue. It appears to be a Blogsome issue, which the following result from an attempted upload via MarsEdit tells me:

RPC message sent: 2007-06-06 16:25:32 +0930
URL: http://schinckel.net/xmlrpc.php
Method name: metaWeblog.newMediaObject
RPC reply received: 2007-06-06 16:25:58 +0930
URL: http://schinckel.net/xmlrpc.php
Method name: metaWeblog.newMediaObject
Status code: 200
Succeeded: NO
–Fault Error–
Fault code: -32601
Fault string: server error. requested method metaWeblog.newMediaObject does not exist.
Request text:

    metaWeblog.newMediaObject                           schinckel                                   schinckel                                   [password]                                                                          bits                                                    name             /kahll.jpg                                       type             image/jpeg                                                                  

Response text:

                                  faultCode           -32601                             faultString           server error. requested method metaWeblog.newMediaObject does not exist.                        

Oh, and I can’t figure out how to retrieve categories via MarsEdit. Not that I’m unhappy with ecto, anyway.

Non-attribution

I’ve commented before on how people use my template conversion, and remove the attribution to myself, and more importantly to Patricia, the original person who did all of the work on the template for vanilla wordpress. What is quite funny is that they remove the tags that attribute me, but usually leave in the AdSense code. Which means anyone clicking on ads on their blog will be doing me a favour. Not that I’ve ever got anything from AdSense. I can’t even log in, since there is a clash between my original AdSense login and my new hosted domain google account. Which they haven’t fixed, last time I checked. Perhaps I should write into the code that attribution needs to be left in. I must check…

Make IE/Blogsome URLs work better

Internet Explorer has some interesting foibles. And by interesting, I mean annoying. For instance, if I’ve visited a page on my site, such as: http://schinckel.net/wp-admin/ Internet Explorer seems to remember it as http://schinckel.net/wp-admin Notice that the trailing slash is missing. Blogsome will report that “Page Does Not Exist”, or if it looks like a Post page, “No posts made”. With access to the HTTP server, this would be easy to fix (just create a rule in the relevant place that allows for URLs of this form), but on Blogsome this is a bit harder. You need to be able to check the last character of the URL string, and if it isn’t a /, append one. This should work fairly well in all cases, since every reader visible URL ends in a /. So how to do this? Getting the URL is easy: {$smarty.server.REQUEST_URI}. However, getting the last character is a bit more difficult. Or so it appears. But Smarty allows for accessing strings as an array, so {$smarty.server.REQUEST_URI[0]} will get the first character. To get the last is a therefore possible. {$smarty.server.REQUEST_URI[-1]} fails, so I’ll need to get the length of the string. {$smarty.server.REQUEST_URI[$smarty.server.REQUEST_URI|count_characters ]} also fails, but {$smarty.server.REQUEST_URI[smarty.server.REQUEST_URI|count_characters ]} works. Now, we just need to test if this value is “/”, and if it isn’t, then reload the page with that added. Which I can’t seem to figure out how to do with Smarty… • Of course, doing the same with JavaScript is a piece of cake: if (document.URL[document.URL.length-1] != "/")     document.location = document.URL + '/'

Custom Error Pages

Thanks to some simple Smarty capture and comparisons, it’s possible to have custom error pages in Blogsome. Read about how to do it at : About How to customize a 404 error page in your free Wordpress blog November 2006 - WebTips See it in action at /404/

Looking for mail friends?

This post was in the Blogsome Forums tonight: No, you aren’t looking for “mail friends” - you are looking for people to click on your silly little links, and get you some linkage lovin’ - which probably somehow results in you getting money. And what’s worse? You aren’t even on Blogsome, the forums where you have posted this. Maybe, just maybe, I would have had some thoughts about the validity of this post if you had at least some relationship to Blogsome. Well, I ain’t standing for none of it. Your Spam post is gone, and if you put any more up, well, gosh darn it I’ll just delete them too. And your little dog, too.

Blogmailr

There has been some discussion about how Blogsome doesn’t allow Email posting, and now a new service has stepped in to fill the gap.

Blogmailr is a free service that allows you to send an email to a predetermined address (like r7873hud@blogmailr.com ), and it will automagically appear as an entry on your blog.

You’ll need to visit Blogmailr first, and register.  I created a new user in my blog (be sure to promote it to a level that can post, ie > 0), so that if things go bad, I can easily remove posts, and it can’t remove anything I have posted from my proper account.

You can also add categories, and styling to the post.  Like I have to this one.

Thanks to Micah for this find.

Update: I’ve not used Blogmailr since this date, and have removed the user to which it was attached…

Interesting Templating Functions

Every now and then, I have cause to go through the Blogsome source code, and each time I come across what seem like interesting functions. Today, I noticed:

  • get_category_parents
  • get_category_children
  • get_linksbyname
  • get_autotoggle
  • get_lastpostdate, get_lastpostmodified
  • get_currentuserinfo
  • query_posts
  • get_cat_ID

Some of these I don’t yet know what they do, but at least three are very interesting for doing stuff I’ve been working on for a while.

Category Dreaming...

…on such a Winter’s Day.

California Dreamin’ • “Room Service” • José Feliciano ★★★

Okay, that’s just a silly lead-in to what I’m going to post about. For some time, I’ve been trying to get Category Pages to handle a bit nicer in Blogsome. I needed to be able to get a Category ID from a Category name, and I hadn’t figured out how to. I’d basically given up. Then I found my new best friend, {get_cat_ID cat_name='Cat_Name'}. He allows me to do this. And much easier than I thought it would be, too.

1     {if $smarty.server.REQUEST_URI|truncate:10:'':1 == '/category/'}
2         {capture name=cat}
3             {single_cat_title}
4         {/capture}     
5         {capture name=catID}
6             {get_cat_ID cat_name=$smarty.capture.cat}
7         {/capture}
8     {/if}

Now, how do we use this to get child categories?

1     {list_cats optionall='0' list='false' child_of='$smarty.capture.catID'}

This appears to not work, as it continues to get all of the categories. I think there is an issue with child_of, at least on Blogsome.

1     {get_category_children id=$smarty.capture.catID}

Only generates the IDs of the child categories. Useful, but not excellent for my uses. However, there exists also a function called {wp_list_cats}, which allows for arguments in the for &arg=value.

1     {wp_list_cats args=&child_of=`$smarty.capture.catID`”} 

Notably, you must use double quotes when trying to embed a variable inside an argument. Final code (not counting CSS, that’s up to you - or look in my StyleSheet):

 1 {if $smarty.server.REQUEST_URI|truncate:10:'':1 == '/category/'} 
 2     {*Category Index Page*}
 3     <div class=“catNav”>
 4         {capture name=cat}{single_cat_title}{/capture}
 5         {capture name=catID}
 6             {get_cat_ID cat_name=$smarty.capture.cat}
 7         {/capture}
 8         Currently browsing 
 9         {get_category_parents category="`$smarty.capture.catID`" link="1" separator="&raquo;"}, which has sub-categories 
10         <ul class=“inlineCatList”>
11             {wp_list_cats args=&&list=0&children=0&child_of=`$smarty.capture.catID`”}
12         </ul>
13     </div>
14 {/if}

And, thanks to minimalnet, since because of the post in the forums: How can i show the Dashboard Blog Stats in my blog?, I began scouring the source code again.

Summer The First TimeBobby GoldsboroRoom Service

Show more of first post

I’ve had a good idea for a way to simplify the front page of a blog: have the newest post displayed in it’s full glory, but have other posts only have an excerpt. Actually, what I might do is make it so that is uses JavaScript, and only the post headers of other posts are shown, but clicking on the title displays the whole text…

Let Your Soul Be Your PilotSting & The PoliceThe Very Best Of Sting & The Police

Credit where it's due, not everywhere.

I converted this theme, Connections, to the Blogsome format. I also put a credit to myself (and another to the original theme author) into the template file. I noticed today a whole heap of new links to me via technorati. It turns out that lots of people have put this theme into their blogs, and left the credit as it is down the bottom:

Blogsome conversion and all content © Matt Schinckel, unless otherwise indicated.

I’ve changed that, so it now says:

Blogsome conversion © Matt Schinckel, content © {authors} unless otherwise indicated.

I’d love people to update their template - it makes me feel bad, taking all that credit for the content. In my template it has a bit more code, that automatically puts all of the blog’s authors in as links. The more automation the better, I always say. Also, if you use Connections, you don’t need to keep the chinese characters, they say “Tiger Paint” (or something similar). You can put whatever you want in there.