Thread: Miscellaneous Hacks - Shorten Bottom [Bit.ly]
View Single Post
  #7  
Old 02-28-2011, 06:27 AM
Kingdombuilder's Avatar
Kingdombuilder Kingdombuilder is offline
 
Join Date: Oct 2009
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is an awesome mod thank you for your contribution. I have my own url shortener and i would like to use it instead of bit.ly. The shortener is http://www.bfx.me

I tried substituting the URL of bit.ly with bfx.me - it comes up but the url does not automatically go into the field provided. Can anyone help me to get this to work?


Edit:

Well i got it to work a little bit. I found this on the http://bfx.me site:

Code:
Shortening a URL with the bfx.me API is very simple, all you need to do is send a get request to the API passing through the URL you wish to shorten.

To shorten http://www.neowin.net/news/windows-7-piracy-check-update-goes-live request:

http://bfx.me/api.php?u=http://www.neowin.net/news/windows-7-piracy-check-update-goes-live

The API will return the shortened URL http://bfx.me/jZ2qi


To retrieve the original URL from the API, all you need to do is send a get request to the API passing through the shortened URL (or the last 5 characters).

To expand http://bfx.me/jZ2qi request:

http://bfx.me/api.php?r=http://bfx.me/jZ2qi
or http://bfx.me/api.php?r=jZ2qi

The API will return the original URL http://www.neowin.net/news/windows-7-piracy-check-update-goes-live


So I use this:
Code:
http://bfx.me/api.php?u

Instead of this:
Code:
http://bit.ly/?url
It will return the shortened url but will not function the site properly. What I mean by that is if you go to the bfx.me and shorten a url it eill return the shortened url and a barcode as well and will also alow you to tweet the url. From what I did it just comes up as a white screen with the shortened url in the upper left corner. The shortened url is right but I would like it to return to the bfx.me page where it will display the bardcode and the tweet option.

Any help would be appreciated...
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01162 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete