Freelancer's Playground! Learn Programming, The Freelancer's Way

31Mar/0962

WordPress Plugin: CR-Post2Pingfm

UPDATE 1: Right now, no one can use this plugin. Because, my developer key is suspended by ping.fm. I've already been contacting then for assistance. Please, be patience.

UPDATE 2: Plaese help me by asking support @askseesmic. Please use this template:

@askseesmic: Can you please check @ariefbayu's issue regarding Cr-Post2PingFM problem?

UPDATE 3: This post has a temporary solution for current problem.

UPDATE 4: Updated! Now you can use the official KEY!.

UPDATE 5: I've created feedback forum at UserEcho. You should see that and submit question, feature request, etc to that place.

Hi there, this is my second attemp at creating wordpress plugin. In this one, I create a plugin that will automatically send a short update to ping.fm for each time you hit the Publish button. To use it, you will need a ping.fm Application Key. This little plugin utilize PHPingFM API by Dmitri Gaskin.

To use it, first download the plugin and upload it to your /wp-content/plugins/. Enable it from your wordpress administration panel. Then, enter the Application Key in Settings » CR Post2Pingfm

That's it, now, everytime you hit Publish, this little plugin will automatically post an update to ping.fm. But do remember, that once the post is published, it will never submit to ping.fm again and again. Because, you don't want to annoy your follower right?


UPDATE:

  • 2009-04-09 01:23:59: Download now handled by wordpress plugin repository
  • 2009-06-11 15:27:30: Version 0.7 released with main feature is the ability to republish and setting another republish template
  • JustBill
    This plugin sucks - Plugin could not be activated because it triggered a fatal error.
    no documentation on how to solve this issue. After hours of trying to solve this issue I'm moving on to a plug in that actually works out of the box.
  • Hi Bill,

    Thanks for being constructive. You do realize that the other person is able to download and install the very same plugin from that page. Just look at the other comment coming here from last week and look at stats on my plugin page at wordpress.

    So, you can be a jerk if you want or maybe you can share whats your error message so that I can help you to pin-point what goes wrong.

    FYI: Most people complaining over stuff that actually the hosting server itself is broken ;).
  • Cool
    Suggestion: Can you consider adding posting body of post also using ping.fm blogging method
  • Ray
    Can we get an option to have a category ping template? This would be useful if we want to setup different templates for categories.
  • I can work on that, but, it will require some overhaul on the script.
  • Good luck at unblocking your key!... I wonder if that's why I can't get it working under WP 3.0 Beta 2. Everything seems to be saving properly, I get no errors, the modified page for "new post" looks fine, but... nothing gets posted.

    I hope that the Ping.fm people are nice and fast :)
  • Guys, please help me by asking @askseesmic to check my issue.
    Please use this template:
    @askseesmic: Can you please check @ariefbayu's issue regarding Cr-Post2PingFM problem?
  • Vit
    Thank you, who is "@askseesmic" and how to contact them please? Why not generate new application key when yours banner and let the people download plugin upgrade?
  • Hi, @askseesmic is Seesmic's support channel on twitter (FYI: seesmic is the company who own ping.fm). I've been in contact with them ever since my plugin broken.
    I've also tried your suggestion, but no result :(.
  • Vit
    I have sent them a message regarding Your plugin. 2 weeks, no reply. Looks like its something like contacting Google regarding unapproved AdSense application.
  • Just got reply from them, few minutes ago *finally, after a couple weeks* just to tell me to be patience :((
  • This guy has temporary solution! Check it out: http://iwanmadan.com/fixing-cr-post-to-ping-fm-...
  • i really hope this gets fixed soon! please! :)
  • Max
    UPDATE: Right now, no one can use this plugin. Because, my developer key is suspended by ping.fm. I’ve already been contacting then for assistance. Please, be patience.

    Thanks for this update. Any idea when and if you will be back in business?
  • Sorry, I'm at the mercy of ping.fm. I still don't get message from then :(
  • Vit
    Thank you, i was currious why it dont works for me.. so im happy i found the answer here. Please update us and contact them frequently and tell them this plugin promotes their service etc.

    The will allow you.

    Best wishes,
    Vit
  • For some reason this has stopped working for me. I have latest version and API key in, but it's not posting to Ping.fm anymore. Did something happen or change that I am not aware of?
  • Ed
    Note: API keys are meant for application developers. If you are using a Ping.fm app that someone has created, it shouldn't require you submit an API key. Since we've recently changed this process, some of the apps might not have been updated to meet new requirements.

    If you are using an app that requires an API key, contact the developer, or visit the app's website for an up-to-date version.
  • whoa, I wasn't aware of that. I'll have a look at it.
  • What do we do now? Because the plugin has stopped working for me and I'd love to get it working again since it's so awesome :)
  • Ed
    according to Ping, the app key is no longer needed. As such my functioning ping.fm for wp is now broken.
  • Babe
    If you can believe it, I am still waiting to hear back from ping to get my api key. Does anyone know a way to contact them other than their website>
  • Babe
    Does anyone know how to get pingfm to send my api key? I have sent 2 emails and gotten no reply. I really like this plugin and am setting it up on clients blog.
  • Just got message from @pingfm: Ping.fm update: For those of you needing access to the application keys, the keys page is back up - thanks for your patience
  • Wow, I don't know that they now change how you get API key. I'm sorry, I guess all you have to do is, wait :(
  • Thanks for the plugin, however I keep getting the following error whenever I hit "update" on a previously published post:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/beaupedi/public_html/wp-content/plugins/cr-post2pingfm/PHPingFM.php on line 20
  • My plugin doesn't support PHP4[1].


    [1]http://www.gophp5.org/
  • Thanks, got everything on PHP5 and it's working great. Appreciate the help!
  • Babe
    I love this plugin. I have a client that has a blogger site and wants me to manage it. Is there a plugin like this for blogger?
  • Blogger doesn't support plugin. However, there is another way to achieve this. You can try this page: http://getsatisfaction.com/pingfm/topics/how_do...
  • Babe Mooney
    I installed the CRPost2Pingfm on my wordpress.org blog and it was working great for weeks. But today it just stopped. I did nothing different. My blog post is not showing in the pingfm list of recent post and it has been 2 hours since I published. My api key is still there, ping is still set up. Can you hep me?
  • Phil
    I'm having the same problem on my blog... Any updates?
  • You can see ping.fm's twitter update: http://twitter.com/pingfm
    There are some problem going on at ping.fm
  • Hi,

    I just installed this on wp 2.9.2 and it doesn't seem to be working. If it was working I should be seeing my new submission in the "Recent Posts" in Ping.fm, right?

    I can't find one script that works for Ping.fm. Can it be my theme or a conflict with another plugin?
  • Hi Gwyneth,

    Is it working on WP MU 2.9.2?
  • No :( Sorry for the late update. I'm going to see if I can apply the same changes I made last time and will get back to you...
  • I'm testing cr-post2pingfm 0.9 on WP MU 2.9.2 — and I surely hope you're right, Arief, and that with WP 3.0 or so there is no further differences between WP and WP MU! The differences are already very small. The major one is that WP MU doesn't care much about "legacy access" to plugin options — you have to use the new functions for that (which actually make more sense!). It's possible that WP 3.0 drops the support for legacy access to the options. I have no idea, and I haven't checked :)
  • Sorry to say this, but I think your plug-in stopped working after the upgrade.

    I use this on several sites and upgraded each one and they stopped working.
  • Are you sure?
    Because, I too used it on several sites and there's no problem after upgrading.
  • Is this working with the latest version of wordpress ? (2.91)
  • Confirmed. My plugin worked on wp 2.9.1.
    I just test it on this blog.
  • Hi,

    I'll try to test in tonight on my 2.9.1 installation. I'll report it back soon.
  • Hey I got your plugin working on Wordpress MU 2.8.4 by modifying how options are used, following this guide: http://planetozh.com/blog/2009/05/handling-plug...

    You should update it! (took me all of 10 minutes)
  • It would be nice if you could post your code, Stefan :)
  • Well, here goes the changed cr-post-2-pingfm.php — for me, it works fine under WordPress MU 2.8.4, using these guidelines:


    cat_ID;
    $categories[] = $cats->category_nicename;
    }
    $continue = isCategoriesAllowedToPing($postId, $categories);
    }

    if($continue)
    {
    update_option('cr_post_2_pingfm_submit_post_submitted_'.$postId, true);
    submitPingFM($postId, $republish);
    }
    }
    }


    function cr_post_2_pingfm_submit_config_admin()
    {
    add_options_page('CR Post2Pingfm', 'CR Post2Pingfm', 8, __FILE__, 'cr_post_2_pingfm_submit_config_form');
    }

    function cr_post_2_pingfm_submit_config_form() {
    ?>
    CR Post2Pingfm








    Ping.fm Application Key
    <input type="text" size="45" name="cr_post_2_pingfm_options[cl_post_pingfm_api_key]" value="" />



    Ping Template
    <input type="text" size="45" name="cr_post_2_pingfm_options[cl_post_pingfm_message_template]" value="" />
    Template Tags: {title} for Post Title and {url} for Permalink URL
    eg: I just post {title} on {url}



    Ping mode

    Allow submit new post to ping.fm:
    <input type="radio" name="cr_post_2_pingfm_options[cl_post_pingfm_ping_mode]" value="all" />For all categories (all)
    <input type="radio" name="cr_post_2_pingfm_options[cl_post_pingfm_ping_mode]" value="allow" />For this categories (allow)
    <input type="radio" name="cr_post_2_pingfm_options[cl_post_pingfm_ping_mode]" value="deny" />For categories except this one (deny)
    Category list (category ID and slug is supported)<input type="text" name="cr_post_2_pingfm_options[cl_post_pingfm_ping_mode_category]" value="" />(comma separated, eg: 1,23,random-caregory,10,rants)
    Category list is ignored if mode all is selected.




    Publish mode

    Allow submit to ping.fm on the following condition:
    <input type="radio" name="cr_post_2_pingfm_options[cl_post_pingfm_publish_mode]" value="once" />Only submit for the first time(once)
    <input type="radio" name="cr_post_2_pingfm_options[cl_post_pingfm_publish_mode]" value="all" />For everytime you push publish button(all)




    Re-Publish template

    This option only used if you choose all in publish mode.
    <input type="radio" name="cr_post_2_pingfm_options[cl_post_pingfm_republish_template]" value="above" />Use Ping Template above
    <input type="radio" name="cr_post_2_pingfm_options[cl_post_pingfm_republish_template]" value="this" />Use this template
    <input type="text" size="45" name="cr_post_2_pingfm_options[cl_post_pingfm_ping_republish_template_text]" value="" />
    The above template tags, apply.








    <input type="submit" class="button-primary" value="" />



    $post->post_title,
    '{url}' => get_permalink($postId),
    );

    foreach($arrTemplate as $template => $template_data)
    {
    $ping_template = str_replace($template, $template_data, $ping_template);
    }
    $result = $pfm->post("status", $ping_template);
    }

    function isCategoriesAllowedToPing($postId, $categories)
    {
    $pingMode = get_option('cl_post_pingfm_ping_mode');
    $pingCats = get_option('cl_post_pingfm_ping_mode_category');
    $pingCats = array_map("trim", explode(",", $pingCats));
    if(!is_array($pingCats)) $pingCats = array();

    if("allow" == $pingMode)
    {
    foreach($categories as $cats)
    {
    if(in_array($cats, $pingCats))
    {
    return true;
    }
    }
    }
    else if("deny" == $pingMode)
    {
    foreach($categories as $cats)
    {
    if(in_array($cats, $pingCats))
    {
    return false;
    }
    }
    return true;
    }
    else
    {
    return true;
    }
    }
  • Marcus Cudd noticed that this tweak of mine wasn't working properly. Since I have problems posting code here, I've added it to my own blog. The fix was in the way options are read on WordPress MU.

    Here is the tweaked code for the plugin. Please test it and see if it works well for you :)
  • Awesome work! But, sorry, I can't confirm it, I don't have wp-mu installed.
    For now, whenever people need it to work on wp-mu, I'll direct it to your post. Because, based on recent blog post on wordpress.org, they intended to integrate wp & wp-mu on single source.
  • It's true! WP 3.0 ought to "include" WP MU. However, I believe they will unify on the WP MU way of saving options (because it does indeed support saving separate options for multiple blogs). This means that it's highly likely that your plugin will require some tweaking to be compatible with WP 3.0...
  • How can I post an excerpt of blogpost when submitting to Ping? I'd like to still use {title} on {url} in addition. Any help would be appreciated.
  • Can you be more specific?
    Some example maybe? so that I can get your idea.
  • The plugin completely stopped working for me since yesterday morning.

    I changed hosting last week and at first it worked like a charm, much better than my previous host (I used to have to click 'update' 3 times before it'd get propagated). Now it completely stopped working and I'm not really sure why. I've done a test updating the post after enabling debugging but it's not showing anything anywhere that I can see :/
  • This plugin has stopped working for me in the last few days.
  • Hmm... is it because of the downtime twitter suffered few days ago? I should do some test.
  • Yea i am getting blank posts as well...
    <div>silent:</div>

    Please, when you have problem, mail me your server status (php_info() output) so that I can investigate what goes wrong.

  • I'm getting absolutely nothing. Nothing is posting to my ping.fm account at all. with basically the same specs as the guy above.
    <div>silent:</div>

    For you and the guy above. Can you provide me with the php_info() output on your server? just mail me the result at ariefbayu@gmail.com be sure to remove or mask any identifiable information (IP or domain name)

  • Hi,

    I have installed the plugin without any errors. I publish a post and nothing happens--not even an error.

    I waited 24 hours and still nothing has gone to ping.fm.

    Any thoughts?

    1. My Ping.fm API key is correct (double-checked)
    2. PHP version: 5.2.9
    3. Server: IIS 6.0

    <div>silent:</div>

    Maybe, enabling the debug mode in PHPingFm will help. Go, test it, and tell me the result.

  • Love the update, thanks so much!! :)
    <div>silent:</div>

    Your welcome, Nicki

  • Great Plugin! Thank you.

    Issue:
    I'm looking into an issue where it seems that about 80% of the posts are making it to ping.fm .
    I'm testing to see if this is happening due to publish scheduling and/or publishing from 'press this' although the 'publish_post' add_action should be hearing all of these events shouldn't they?
    <div>silent:</div>

    Yeah, publish_post should be hearing all of these events.
    Tell me what you find out after testing. I'll test it too by my self.
    so, 3 parameter right. Post from normal post page, press this, and schedule.

    BTW, I'm in the middle on rolling out the new version. It will add re-publish feature. Incase you have changed the content and want to annouce it again.
    Should be up in an hour.

  • After complaining to my host, they told me that I *could* have PHP5 and switched me to a new server. YAY! :)

    Although now I have a feature request. Could you please add an option to choose when to have it ping Ping.fm? (as in when posting new posts only, or just updates, or both?)

    Thanks! :)
    <div>silent:</div>

    ah, great idea!

  • ARGH! Having same problem as Kate. Seems all Ping.fm apps require PHP5 (my host currently has PHP4, I cannot change this!).

    It would have been really helpful to have known this ~before~ installing. :(

    <div>silent:</div>

    Aw, I'm sorry. I'll try to rewrite it to be compatible with PHP4. But, I didn't promise it to be finished within this week.

  • This is a great little plugin and I was so excited! However, I have installed this but when I publish the post, I get this error =(

    Any ideas? Many thanks =)

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /nfs/c04/h03/mnt/66134/domains/blog.spudaroo.com/html/wp-content/plugins/cr-post2pingfm/PHPingFM.php on line 20
    <div>silent:</div>

    Sorry, PHPingFM class required you to use PHP5

  • Works great, thank you
    <div>silent:</div>

    your welcome

blog comments powered by Disqus