Add as MyBB Url Shortener

Add as MyBB Url Shortener

MyBB is an open source forum software and is very popular. Today I’m sharing a way to use as a URL shortener for MyBB. is a website providing services for shortening Urls on site and through Api. As we know normal Urls could be so long that they cannot be shared on twitter or chats etc. So, we need to use a Url shortener. Today I’m writing about a way to use and place a button on your MyBB forum header menu. Every time a user clicks that button, a popup will appear containing the shortern Url for that page. This url can be then shared with ease. A big advantage of using is that they provide easy stats for your shorten links. So, let me teach you how to use as MyBB Url Shortener.

Demo of as Mybb Url Shortener – Live Demo as MyBB Url Shortener as MyBB Url Shortener Popup as MyBB Url Shortener Setup

1. Go to and register for an account.
2. After registration, go to this page and get your Api key.
3. Edit the file “Global.php” using Dreamweaver or Notepad. And Paste this code right after the first <?php
4. After pasting above code right after the first <?php tag, now edit the “Setup the account info” portion of above code and enter your Username and Api key, which you got from website, in Step 2. After completion, save“Global.php”.
5. Now, in Admin CP of MyBB, go to Templates & Styles –> Templates –> Default Template –>Header Templates –>Header.
6. With in the <ul> tag of <div class=”menu”>, we need to add another <li> which will contain code for the shortening current page url. Now, Paste this code before all <li> tags with <ul> tag of <div class=”menu”>.
7. Now save the header and preview your Forum, you will see another link name “Shortern Url” in the header menu. Click that and a popup will appear containing shorten url of that current page and this was what we exactly want.
8. The actual piece of code which displays the current page Url is below, and you can paste it any where in the template to display current page Url.
So, guys this was all about using as Url Shortener for Mybb, you may use this method with other platform as WordPress but you will need little modifications, I will surely write about that too. Bye!
Share on Google Plus

About Chathura

    Blogger Comment
    Facebook Comment