WordPress.org

Ready to get started?Download WordPress

Forums

NextScripts: Social Networks Auto-Poster
custom URL Shorthener? (6 posts)

  1. christopheran
    Member
    Posted 1 year ago #

    Is there a way to set up a custom short url?

    I don't mind digging in to the php script if it's not too difficult.

    I use this plugin:

    http://wordpress.org/extend/plugins/shortlink-domain/

    so that I have my own short url. Can I get NextScripts auto poster to use it?

    Thanks,

    Chris

    http://wordpress.org/extend/plugins/social-networks-auto-poster-facebook-twitter-g/

  2. stitchkingdom
    Member
    Posted 1 year ago #

    I have suggested this many times and have been ignored. But I use the YOURLS plugin for WordPress and then have modified the SNAP script so that if the extended field has a YOURLS URL value, it will use that for %SURL instead

    In NextScripts_SNAP.php, around line 605, my code looks like:

    if (preg_match('%SURL%', $msg)) {
         $url=get_post_meta( $postID, '_yourls_url', true );
    	 if($url=='') {
    	    $url = get_permalink($postID);   $response  = wp_remote_get('http://gd.is/gtq/'.$url);
            if ((is_array($response) && ($response['response']['code']=='200'))) $url = $response['body'];
    	 }
    	  $msg = str_ireplace("%SURL%", $url, $msg);
      }

    Just note I'm a few versions behind since I have to make these and other changes repeatedly each time I update

  3. NextScripts
    Member
    Plugin Author

    Posted 1 year ago #

    Since version 2.4 SNAP supports bit.ly and built-in WordPress URL shorthener in addition to gd.is.

    Built-in WordPress URL shorthener allows third party plugin to replace it, so all varieties of URL shortheners could be used, for example wp.me from Jetpack.

    We don't see any reasons to include support for anything else there.

  4. NextScripts
    Member
    Plugin Author

    Posted 1 year ago #

    BTW mentioned above "shortlink-domain" plugin is using built-in WordPress URL shorthener, so it could be perfectly used with SNAP

    Ludwig.

  5. christopheran
    Member
    Posted 1 year ago #

    I don't see an option for using the built-in WordPress URL shorthener though.

    The only options that appear on the settings are gd.is and bit.ly. Or am I overlooking something?

  6. NextScripts
    Member
    Plugin Author

    Posted 1 year ago #

    Please get the latest 2.4.3 version.

    Plugin Settings->Other Settings->URL Shorthener
    http://snag.gy/yLH6w.jpg

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.