bShortLinks

bShortLinks

What is it?

Ever wrote a website link as a chat message but the link hasn't worked because it went over two lines? Want to make some money from your MineCraft server?

Well, this plugin will use the adf.ly service to shrink urls so they are more likely to fit on one line, as well as giving your server a little more income!

How ever, if you don't need any extra income then you can set the plugin to use tinyurl.com instead.

Features

  • Shorten links via adf.ly
  • Shorten links via tinyurl.com
  • Colour links in chat
  • Black list of words a website metadata can't contain (Good for blocking links to 'sensitive or adult' material)
  • Mask adf.ly with tinyurl.com shortlinks

Configuration

Once you have run the plugin once, a configuration file will appear in 'plugins/bShortLinks'. There are currently six configuration options.

shorten_api: 'adfly'
-- shorten_api can currently be adfly or tinyurl.
-- This is the service use to shorten the urls.

adfly_api_key: '6b1ba8a856219ded5dcb4e3930ef35ed'
-- This is your adfly api key, only needed if you have shorten_api set to adfly.
-- This can be found on your adfly account page, please see the setup instructions for more information.

adfly_api_uid: '2034504'
-- This is your adfly uid, only needed if you have shorten_api set to adfly.
-- This can be found on your adfly account page, please see the setup instructions for more information.

mask_with_tinyurl: true
-- If you have the shortening set to adfly, this will then shorten the adfly link to a tinyurl link
-- As some people think that the tinyurl links look nicer than the adfly links.

url_colour: '3'
-- The colour code of the url in chat, to make it standout more. the default is dark aqua

debug: false
-- Outputs extra messages into console to help with debugging

Permissions

* shortlinks.url
-- Allows the users links to automatically be shortened

* shortlinks.excludeblacklist
-- Excludes users form the black list testing

Setting up adf.ly

First you will need an adf.ly account. Create one by using the following link. Once you have created your account and validated it, you will then need to get your api key and uid. To get these visit the 'Tools -> Api page' or use this link API Tools On that page there will be a url, which contains your api key and uid.

http://api.adf.ly/api.php?key=6b1ba8a856219ded5dcb4e3930ef35ed&uid=2034504&advert_type=int&domain=adf.ly&url=http://somewebsite.com

So in the above case my adlfy_api_key would be set to 6b1ba8a856219ded5dcb4e3930ef35ed

So in the above case my adlfy_api_uid would be set to 2034504

Requirements

This plugin has a soft dependency on Vault for its permissions. However, it also uses bukkit permissions and will fall back to op permissions.

Source Code

http://subversion.assembla.com/svn/bshortlinks/

Got a problem or suggestion?

Let me know and I'll get straight on it!


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files