LiveJournal AutoUpdate for WordPress 1.2

May 21st, 2004
WordPress Hack

For everyone having problems with this hack, I have found a solution thanks to testing from Kitten and Cytoplas (from #Wordpress). Please download the following file:

rename it to class-xmlrpc.php and replace the original found in the wp-includes folder of your blog. This file has a bug from WordPress.

You can download the new instructions from here:




  1. fullofsecrets (1 comments.) says:

    It’s not working for me, either, and I did download the new class-xmlrpc.php file. It’s such a great idea for those of us who want to keep our LJ readership while migrating to a blog. Are there any plans to make this a full-fledged plugin for the Mingus release?

  2. Mark (58 comments.) says:

    What is the error that you are getting? There *are* plans to make it into a real plugin.

  3. Ben (3 comments.) says:

    First off, I wanted to thank you for making the hack. I installed it for my older brother, and it seemed to work pretty much straight off.

    Except, unfortunately, it hasn’t. His livejournal page is here, and his wordpress page is here.

    The post gets sent to livejournal just fine, but it keeps turning every ‘ into a “â”

    For example, words like “it’s” and “don’t” come up as itâs and donât. Would you know what’s causing that? His wordpress posts don’t insert the strange character. Could this be an encoding issue? The wordpress blog is set to UTF-8. If livejournal is on ISO-8859 (or whatever it is), would that cause a problem?

    Anyway, thanks for any help you could give.

  4. Ben (3 comments.) says:

    Oh, the livejournal page also has four <br /> after each paragraph, and it doesn’t classify them as paragraphs, only seperating them with the break. The end result is that there’s too much space between paragraphs. Anyone else getting this?

  5. Ben (3 comments.) says:

    This bug fix was found on the forum, courtesy of savetheclocktower. It will remove the extra line breaks and apostrophes won’t show up as â


    $content = convert_chars($content, ‘html’);

    and add after it:

    $content = wpautop($content);
    $content = ““.$content.”“;

  6. Danny (3 comments.) says:

    when i choose a catagory it errors hen i hit publish? is this wellknown or did i something wrong? it does work when i just take the general one

  7. Danny (3 comments.) says:

    as extra i got this error when i look at the wordpress powered site:

    Warning: Invalid argument supplied for foreach() in /home/dslavick/public_html/slavick/wp-includes/template-functions-category.php on line 65

    at Livejournal nothing is posted

  8. Danny (3 comments.) says:

    I got it to work now :D The failure was that my ftp were still uploading the file. my ftp server had problems.
    Now i got a small request. I want to add a signature below every posted entry at livejournal. “orignal at” for example. Because i wanna make sure that the traffic comes from livejournal. I can ofcourse add below every post a signature but i dont want it to show up in the post at my wp-driven site. Can someone help me with that?


  9. Ed Yuban (1 comments.) says:

    You are quite possibly the smartest person alive. Imagine, finding a use for LiveJournal.

    Is it possible to post to multiple LiveJournal-powered thingies? I have a personal LiveJournal and am a member of a community dedicated to my web site while it was down, yet continuing for the sole purpose of being silly. It would make a lot more sense to post to the community but I think they work a bit differently than just posting through a username and password. This may be a bit more than you’d care to take on but the benefits to me would be awesome. I would then buy you donuts.

  10. Yowza says:

    Is it possible to change this hack so that instead of posting the entire post to LiveJournal it instead posts the excerpt, with a link back to the original article?

  11. TsuKata/JCS (1 comments.) says:

    Thanks for posting this! I was having this issue. :)

  12. Sandra (1 comments.) says:

    I saw on one of the first WordPress announcements about this hack someone mentioning the time not being correct in the LiveJournal post. I’m using this update of the hack for 1.2 with and it is working, but my LJ post had a time difference of 2 hours, i.e. in WordPress is shows correct time of 9:50 pm, but it showed up in LJ as 7:50pm. How can I change that?

  13. Mark says:

    Find this line in your my-hacks.php:
    $time_difference = get_settings(“time_difference”);

    and add the following after it:
    $time_difference = $timedifference + 2;

  14. Erin (1 comments.) says:

    Hi Mark, first of all thanks for making this hack. Secondly, I’m getting the same error as #8 (convert_bbcode() ), but I didn’t quite catch what the fix was you guys came up with. ^_^;; Could you please advise? Thanks so much.

  15. Sherri (10 comments.) says:

    Hi Mark, I hope you’re feeling better.

    Since I’m using your WooWoo, I made the edits in template-functions.php, along with the changes to the edit-form.php, post.php, and edit-form-advanced.php

    When I did a test post, I entered my text, then clicked on advanced editor (which is my preferred way of posting since it 1. gives a preview at the bottom of the post page, and 2. advanced editor gives the excerpt box).

    But it still posts to LJ when I click on Advanced Editor. I’d much rather have it wait until I click on PUBLISH

    So I took out the checked=”checked” from the edit-form.php, hoping it would stop it from posting when I clicked on Advanced Editor; it didn’t.

    Would changing value=’1′ help to stop it from updating to LJ until I’ve pressed on PUBLISH?

  16. Bryan (8 comments.) says:

    Unfortunately, I still get an error when I try to use this:

    Fatal error: Call to undefined function: xmlrpc_encode() in /homepages/35/d101663902/htdocs/ on line 31

    Sorry to keep bothering you :(

  17. Tjgriff (1 comments.) says:

    Say, that is way cool! Do you know if there is a way to have it work the other way around – to import LJ into and existing WP blog?

  18. Bryan (8 comments.) says:

    Now I am getting a differnt error:

    Fatal error: Cannot redeclare xmlrpc_entity_decode() (previously declared in /homepages/35/d101663902/htdocs/ in /homepages/35/d101663902/htdocs/ on line 146

    I’m getting a bit confused. I may try starting from scratch here.

  19. Bryan (8 comments.) says:

    Okay, one more piece of info Mark.

    On a brnad-new install with no other hacks, I’m still getting this:

    Fatal error: Call to undefined function: xmlrpc_encode() in /homepages/35/d101663902/htdocs/ on line 31

    Thanks, I promise I’ll quit posting now ;)

  20. Mike (1 comments.) says:

    I’ve been trying this out in my WordPress testbed ( and been getting this error whenever I try to post;
    Fatal error: Call to a member function on a non-object in /home/tripleb/public_html/wordpress/wp-includes/class-xmlrpc.php on line 637

  21. Mark (58 comments.) says:

    Sherri, changing the publish should stop it from going to your livejournal. This update is really for 1.2 and does not affect anything else, just a change in the way the code is used. It also does not work in advanced editing, it gets published first.

    If you are still confused or need some more customization, please email me and I will try to work it out for you.

  22. Mark (58 comments.) says:

    No plans for it to work the other way around. Sorry.

  23. Mark (58 comments.) says:

    The fix has been committed on the same update tutorial. In your case, please re-download the file and recopy the functions. Sorry for this error.

  24. Bryan (8 comments.) says:

    No problem, Mark. I appreciate all the effort you’re putting in on this.

    Unfortunately, after changing the function I’m now getting this again whe I try to post:

    Fatal error: Cannot redeclare xmlrpc_entity_decode() (previously declared in /homepages/35/d101663902/htdocs/ in /homepages/35/d101663902/htdocs/ on line 146

  25. Mark (58 comments.) says:

    Try downloading this one more time. (might need changes again, but try it again please)

    I am dumb ;)

  26. Penny (2 comments.) says:

    I clearly need an idiots guide to this hack, I’m doing something wrong – here’s what I’m getting when I try to post

    xmlrpcval: not a scalar type ()
    xmlrpcval: not a scalar type ()
    xmlrpcval: not a scalar type ()
    xmlrpcval: not a scalar type ()
    xmlrpcval: not a scalar type ()
    xmlrpcval: not a scalar type ()
    xmlrpcval: not a scalar type ()
    xmlrpcval: not a scalar type ()
    xmlrpcval: not a scalar type ()
    xmlrpcval: not a scalar type ()
    Couldn't process request: Client error: Missing required argument(s)
    Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-includes/class-xmlrpc.php:830) in /var/www/html/wp-admin/post.php on line 147

    Yikes! What’s the problem?

  27. Mark (58 comments.) says:

    This version is only for WordPress 1.2
    I am not sure where this is getting stuck. The only thing I can suggest is to try and install it again. I have tried it myself on my own test blog, and it works ok.
    Please email me if you are still having problems. :-)

  28. Jamie (1 comments.) says:

    I’m actually having the same problem with 1.2 and the scalar call. Any advice you might be able to give? I’m running the latest 4.x version of PHP, with WordPress 1.2 final. The errors are identical to those that Penny recieved.

  29. Troy says:

    Hi, I’m getting the following error running your 1.2 version (this occured with the older 1.01 version as well):

    Fatal error: Call to undefined function: convert_bbcode() in my-hacks.php on line 11

    Can you help?

  30. Mark (58 comments.) says:

    That is impossible because that function is not in this version at all. Please make sure you have removed the old one.

  31. Bryan (8 comments.) says:

    On a fresh install I got the same error. Still tinkering. Anything you guys come up with would be appreciated; I’m really trying to get this to work. Thanks everybody.

  32. Troy says:

    Mark, I found the mistake.

    On your new 1.2 release, the Friends-only version of the script still uses the bbcode() function, even though the Public one does not.

    Sorry about the confusion– can you update it?

  33. Mark (58 comments.) says:

    Sure! hehe, and I am sorry because I was wrong! :mrgreen:

  34. Troy says:

    Just noticed another difference: the Friends-only version doesn’t have the following line:

    require_once (“wp-includes/class-xmlrpc.php”);

  35. Mark Miller (2 comments.) says:

    Same Error that I’m getting.

  36. Troy says:

    One more…

    The line: $params = array( xmlrpc_encode( $x_params_r ) );

    should read: $params = array( phpxmlrpc_encode( $x_params_r ) );

    With these changes, however, I am getting the scalar errors mentioned above. Still unable to crosspost :cry:

  37. Mark (58 comments.) says:

    For everyone getting the “xmlrpcval: not a scalar type ()” error, please download this file from the CVS and replace the current one in your wp-includes directory and please let me know if that helped. All previously mentioned bugs have been fixed, except this one.

  38. Troy says:

    :neutral: It didn’t work for me, Mark. Looking more at the phpxmlrpc_encode() function, it looks like the AddScalar() function isn’t being applied to the array. Actually, it looks like the switch for the array code is empty?

    I wish I could help you out more, but I’m hampered by my lack of advanced PHP skills at the moment.

  39. Mark (58 comments.) says:

    I am sorry for all of this. Let us try again. Download this file, rename it to class-xmlrpc.php and put it in your wp-includes folder and try one more time please.

  40. Penny (2 comments.) says:

    I’m getting this error – any ideas?

    Parse error: parse error in /var/www/html/wp-includes/class-xmlrpc.php on line 8

    Fatal error: Cannot instantiate non-existent class: xmlrpc_client in /var/www/html/my-hacks.php on line 43

  41. Mark (58 comments.) says:

    Sounds like the class-xmlrpc.php file has not copied over right.


  1. […] DA and get a totally text version of it. I don’t know if anybody does, but they can. LiveJournal AutoUpdate – all entries from here on o […]

  2. […] ware, but it’s a beast to mess with. Today, I stumbled upon a WordPress hack called LJ AutoUpdate. Same basic principle as LivePress, b […]

  3. […] January 10, 2005″); todayIs(laterdate); I’ve installed the script from the Weblog Tools Collection which should automagically […]

  4. […] d to be a more fully functioned method of posting from Word Press to Live Journal than the hacks I’d been using. But it wouldn’t […]

  5. […] h dedication to fiddle with it, so I looked for another one. And I came up with this hack. Here’s the homepage for the hack. […]

  6. […] 7;ve got it customized to where most things are about tolerable. I’m not going to be updating LiveJournal with these entries though, so […]

Obviously Powered by WordPress. © 2003-2013

page counter