WordPress.org

Ready to get started?Download WordPress

Forums

Ping Blogrolling.com Hack - very simple (14 posts)

  1. Laughinglizard
    Member
    Posted 10 years ago #

    I knew that Blogrolling.com gets its "recently updated blogs" information from both blo.gs and weblogs.com, but I was recently having some problems with my site showing up on the updated list, but not updated on Blogrolls. I took a closer look at the problem (the links matched exactly) and found nothing of suspicion. So I decided to fix the problem by pinging Blogrolling.com directly through b2/Wordpress. Here is what I did:
    1) In your b2-include folder, find b2function.php and add this code somewhere within the php tags, preferably after the weblogs.com ping. (Yes, the code is very similar to the other pingers with just a few changes)

    // pings Blogrolling.com
    function pingBlogRolling($blog_ID = 1) {
    // original function by Dries Buytaert for Drupal
    global $use_weblogsping, $blogname,$siteurl,$blogfilename;
    if ((!(($blogname=="my weblog") && ($siteurl=="http://example.com") && ($blogfilename=="b2.php"))) && (!preg_match("/localhost\//",$siteurl)) && ($use_weblogsping)) {
    $client = new xmlrpc_client("/pinger/", "rpc.blogrolling.com", 80);
    $message = new xmlrpcmsg("weblogUpdates.ping", array(new xmlrpcval($blogname), new xmlrpcval($siteurl."/".$blogfilename)));
    $result = $client->send($message);
    if (!$result || $result->faultCode()) {
    return(false);
    }
    return(true);
    } else {
    return(false);
    }
    }

    2) Now find b2edit.php in the main b2 folder and find the line
    pingBlogs($blog_ID);
    Add the following line right after that:
    pingBlogRolling($blog_ID);
    And...voila! you are done and pinging Blogrolling.com :-)
    The above hack is explained for b2. b2edit.php resides in the wp-admin directory in WordPress; everything else remains the same. Hope this helps someone!

  2. Dominik
    Member
    Posted 10 years ago #

    Hey, thanks, that's almost the answer to the question I had before.. I'll try that one.. :-)

  3. Trinity22
    Member
    Posted 10 years ago #

    I tried it and got
    Warning: Unknown modifier '/' in /home2/trinity/public_html/b2-include/b2functions.php on line 757
    Warning: Cannot modify header information - headers already sent by (output started at /home2/trinity/public_html/b2-include/b2functions.php:757) in /home2/trinity/public_html/wp-admin/b2edit.php on line 167
    trying to extricate it now :)
    trinity

  4. Laughinglizard
    Member
    Posted 10 years ago #

    Remember to change the \ to a backslash...

  5. Anonymous
    Unregistered
    Posted 10 years ago #

    Doesn't seem to work with WP 1.0+ the only place I have found pingBlogs($blog_ID); is in post.php in the wp-admin folder.
    Any help here?

  6. Orbit Juice
    Member
    Posted 10 years ago #

    I also tried this to the letter. Very similar.
    I placed the step 1 code in the functions.php file and placed the step 2 code in the post.php file in the same places as pingBlogs($blog_ID); is.
    weblogs and blo.gs are updating fine. Blogrolling does not update at all.
    I currently use MoveableType which handles this fawlessly - However... I''m about ready to jump over to WP. But, this is a very make or break issue with me as my blog is on many blogsrolls.
    Does anyone have code for this that works with WP?

  7. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    I use the built-in weblogs.com pinger and it works just fine.

  8. Laughinglizard
    Member
    Posted 10 years ago #

    Use this function instead of the one on top of this thread as the function for pinging blogrolling.com (for WordPress 1.0+). You could put it in functions.php or in your my-hacks.php :
    function pingBlogrolling($blog_ID = 1) {
    global $blogname,$siteurl,$blogfilename;
    if ((!(($blogname=="my weblog") && ($siteurl=="http://example.com") && ($blogfilename=="wp.php"))) && (!preg_match("/localhost\//",$siteurl))) {
    $client = new xmlrpc_client("/pinger/", "rpc.blogrolling.com", 80);
    $message = new xmlrpcmsg("weblogUpdates.ping", array(new xmlrpcval($blogname), new xmlrpcval($siteurl."/".$blogfilename)));
    $result = $client->send($message);
    if (!$result || $result->faultCode()) {
    return false;
    }
    return true;
    } else {
    return false;
    }
    }
    Place pingBlorolling($blog_ID); after pingBlogs($blog_ID); in your post.php (inside your wp-admin folder)
    Just as a side note, this is really perfunctory because Blogrolling.com gets its recently updated list from blo.gs and from weblogs.com and does not need to be pinged seperately. Only if your WordPress blog does not show up in that list when updated should you try to add this function.

  9. Orbit Juice
    Member
    Posted 10 years ago #

    It's still not working.
    Is there something missing?
    I'm following these directions word for word.

  10. Laughinglizard
    Member
    Posted 10 years ago #

    How do you know that it is not working?

  11. Orbit Juice
    Member
    Posted 10 years ago #

    Because when I check my blogroll through blogrolling, i'm not shown as updated.
    It shows the last entry I made being from saturday. which is one I made with MT.

  12. Laughinglizard
    Member
    Posted 10 years ago #

    Thats what I thought was happening. Please make sure that your URL and the name for your WordPress blog are exactly the same as the one that you are blogrolling. In other words, when you signed up for BlogRolling you provided a name for your blog and the URL, these have to match the WP ones, exactly. Even the last backslash matters in some cases.

  13. Orbit Juice
    Member
    Posted 10 years ago #

    Tried it.. still to no avail...

  14. Laughinglizard
    Member
    Posted 10 years ago #

    what is your blog url? Could you create a temporary account for me to test from and email me the username/password? Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.