Activity Stream
48,167 MEMBERS
61027 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 3 of 3
  1.     
    #1
    Member

    Default HELP wordpress,make dash in the middle of the hotlink...

    Hey KWWH,
    wan to ask,what wp plugin must be use to make hotlink shorter by inserting dash in the middle of the hotlink.
    before:
    Code: 
    http://www.wupload.com/file/86559491/moviez.part3.rar
    after:
    and when click into the link, it will redirect first into ad, then go to the original site
    Any help or hints are much appreciated.
    Thanks!
    jozawa Reviewed by jozawa on . HELP wordpress,make dash in the middle of the hotlink... Hey KWWH, wan to ask,what wp plugin must be use to make hotlink shorter by inserting dash in the middle of the hotlink. before: http://www.wupload.com/file/86559491/moviez.part3.rar after: http://www.wupload.com....9491/moviez.part3.rar and when click into the link, it will redirect first into ad, then go to the original site Any help or hints are much appreciated. Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    It could probably be achieved with some simple html / css coding.
    I dont have time to look into it properly right now though.

    In the meantime, try searching for plugins with this keyword - "Truncate"

    ---- edit ----

    Ok, I had a spare second to take a look for you.
    It seems like it's a PHP function that will sort this out for you.

    What your trying to do it "truncate" so, I done a search for "truncate links"... and came up with these results.

    Code: 
    http://www.google.co.uk/search?q=truncate+links&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
    The top link gives you more or less what you want - "I think". I'm not a PHP expert, but it looks like it will do the trick.

    Code: 
    http://psoug.org/snippet/Truncate-Links-Over-X-Chars-long_230.htm
    Code: 
    <?PHP
     
    FUNCTION handle_url_tag($url, $link = ''){
         GLOBAL $FORUM_user;
     
         // maximum link length
         $MAXLEN = 50;
     
         // if too long, clip it to how many chars?
         $CLIPTO = 45;
     
         $full_url = STR_REPLACE(ARRAY(' ', '\'', '`', '"'), array('%20', '', '', ''), $url);
         if (strpos($url, 'www.') === 0)               // If it starts with www, we add http://
              $full_url = 'http://'.$full_url;
         else if (strpos($url, 'ftp.') === 0)     // Else if it starts with ftp, we add ftp://
              $full_url = 'ftp://'.$full_url;
         else if (!preg_match('#^([a-z0-9]{3,6})://#', $url, $bah))      // Else if it doesn't start with abcdef://, we add http://
              $full_url = 'http://'.$full_url;
     
         // Ok, not very pretty :-)
         $link = ($link == '' || $link == $url) ? ((strlen($url) > $MAXLEN) ? substr($url, 0 , $CLIPTO).' … '.substr($url, -10) : $url) : stripslashes($link);
     
         return '<a href="'.$full_url.'">'.$link.'</a>';
    }
     
    ?>
    But how to implement this, I don't exactly know. Hopefully others will drop by and help you out.
    Anyway, I hope this helps you out at some degree :-)

    UltraIMG - Free Image Hosting
    Want to ask me anything to do with UltraIMG?? Send me a PM.
    Chances are that if you leave a message on the forum I might not see it. :)

  4.     
    #3
    Member
    Quote Originally Posted by Ashleyuk1984 View Post
    It could probably be achieved with some simple html / css coding.
    I dont have time to look into it properly right now though.

    In the meantime, try searching for plugins with this keyword - "Truncate"

    ---- edit ----

    Ok, I had a spare second to take a look for you.
    It seems like it's a PHP function that will sort this out for you.

    What your trying to do it "truncate" so, I done a search for "truncate links"... and came up with these results.

    Code: 
    http://www.google.co.uk/search?q=truncate+links&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
    The top link gives you more or less what you want - "I think". I'm not a PHP expert, but it looks like it will do the trick.

    Code: 
    http://psoug.org/snippet/Truncate-Links-Over-X-Chars-long_230.htm
    Code: 
    <?PHP
     
    FUNCTION handle_url_tag($url, $link = ''){
         GLOBAL $FORUM_user;
     
         // maximum link length
         $MAXLEN = 50;
     
         // if too long, clip it to how many chars?
         $CLIPTO = 45;
     
         $full_url = STR_REPLACE(ARRAY(' ', '\'', '`', '"'), array('%20', '', '', ''), $url);
         if (strpos($url, 'www.') === 0)               // If it starts with www, we add http://
              $full_url = 'http://'.$full_url;
         else if (strpos($url, 'ftp.') === 0)     // Else if it starts with ftp, we add ftp://
              $full_url = 'ftp://'.$full_url;
         else if (!preg_match('#^([a-z0-9]{3,6})://#', $url, $bah))      // Else if it doesn't start with abcdef://, we add http://
              $full_url = 'http://'.$full_url;
     
         // Ok, not very pretty :-)
         $link = ($link == '' || $link == $url) ? ((strlen($url) > $MAXLEN) ? substr($url, 0 , $CLIPTO).' ? '.substr($url, -10) : $url) : stripslashes($link);
     
         return '<a href="'.$full_url.'">'.$link.'</a>';
    }
     
    ?>
    But how to implement this, I don't exactly know. Hopefully others will drop by and help you out.
    Anyway, I hope this helps you out at some degree :-)
    thanks Ashleyuk1984 , i will try that one

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Megaupload rocks, middle finger to all haters:D
    By pasa in forum Webmaster Discussion
    Replies: 14
    Last Post: 12th Dec 2011, 07:11 AM
  2. Wordpress, want to make font smaller? and make width bigger
    By jcberry526 in forum Technical Help Desk Support
    Replies: 9
    Last Post: 2nd Nov 2011, 05:54 AM
  3. Takes 6 pull-ups with the middle finger!
    By Daniel in forum General Discussion
    Replies: 1
    Last Post: 23rd Oct 2011, 07:18 PM
  4. Make a site like Flippa or make wordpress like it?
    By MasterDKR in forum Technical Help Desk Support
    Replies: 8
    Last Post: 25th Aug 2011, 04:58 AM

Tags for this Thread

BE SOCIAL