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

  1. christopheran
    Posted 3 years 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:


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




  2. stitchkingdom
    Posted 3 years 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
    Plugin Author

    Posted 3 years 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
    Plugin Author

    Posted 3 years ago #

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


  5. christopheran
    Posted 3 years 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
    Plugin Author

    Posted 3 years ago #

    Please get the latest 2.4.3 version.

    Plugin Settings->Other Settings->URL Shorthener

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextScripts: Social Networks Auto-Poster
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.