Viewing 4 replies - 1 through 4 (of 4 total)
  • Thank you very much for your kind words ??

    By the way, I just released a new version adding support for direct Twitter notification and https://tr.im shortener.

    Where is it meant to save the settings (bit.ly account API key, ping.fm key, etc)?

    I am unable to get any changes I make to stick. Should it be saving in the wp_options table, or should it be writing it into the shorten2ping.php file directly, or …?

    Thanks,

    PS – Once I get this working I am going to add hashtags for the ping (they don’t mean much in Facebook, MySpace, etc, but can be important in Twitter)

    Adding these is simple –

    $post_url = get_permalink($post_id);
        $post_title = get_the_title($post_id);
        // --- add some tag bits here ------ //
        $tags = wp_get_post_tags($post_id);
        $my_tag_list = '';
        if ($tags) {
        foreach ($tags as $j=>$tag) {
            $my_tag_list .= '#'.$tag->slug.' ';
        }
        // --- back to regular processing ----- //
        // --- cut for brevity ----- //
                //get message from settings and process title and link
                $message = $s2p_options['message'];
                $message = str_replace('[title]', $post_title, $message);
                $message = str_replace('[link]', $short_url, $message);
                // --- add the tags ----- //
                // --- ToDo: determine length and truncate Title(?) or Tags in order to fit in Twitter post //
                $message = str_replace('[tags]', $my_tag_list, $message);

    i am trying to do something similar to evardsson’s code above, in a dedicated plugin for adding tags to post titles in the RSS feed as hashtags, please see thread:

    https://www.ads-software.com/support/topic/302741?replies=1

    any assistance much appreciated.

    what would be even better is if we could use our own shortened urls. like what the plugin ‘Twitter Friendly Links’ does…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Shorten2Ping] Great plugin!’ is closed to new replies.