News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Bitly Branded URLs on pages?

Started by Jade Elizabeth, January 02, 2016, 08:13:31 AM

Previous topic - Next topic

Jade Elizabeth

So I have set up a branded bit.ly url (vanity url) and I need some help. What I want to do is just provide a link at the top or bottom of the page. I am thinking inside a text box with a little link icon next to it...maybe when they click it will auto copy. Problem is I need this to use the canonical URL (or what ever pretty URLS generates without the message anchors etc) to make a link and I also need it to use the vanity URL in the finished link. I don't have even the slightest clue how to do this.

My website is:  http://www.colormeforum.com/
Branded url is: http://colrme.club/

Bit.ly is apparently getting rid of its API or something, I am unsure. Can anyone assist? :)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Jade Elizabeth

I misread it's the authorisation thing that's being canned not the whole API ha ha. Anyone have any ideas?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

margarett

If you had bought a second domain the redirect would be easy peasy. Branded url, I don't even know what it is...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Jade Elizabeth

Sort of, I just want a random string of characters like Bit.ly does, unless the URL exists..

For example this url:
http://www.colormeforum.com/other-relaxation/anyone-else-love-bubble-baths/

is this on bit.ly:
http://colrme.club/bubbaths


And this one exists too but it's nothing special:
http://www.colormeforum.com/color-me-announcements/our-brand-new-coloring-pages-store!/
http://colrme.club/1OJwWak

So I guess I don't want it to create a new one each time, more make one for each topic if there isn't one, OR use the premade one that exists (hence why I think I will need to use the API). Also note I can edit the links in my bitly screen so if it were to cache them somewhere I would need a way to purge them.

I've attached a screenshot of what I am thinking. Just a little colored curved rectangle with a circle "link" icon and then a bit of text.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

nend

I have a script on a old site of mine that does it without a external service. Back then when I didn't want guest to see external URLs on pages. I knew what it was good for back then, it seems like that reasoning got lost with older me. Really what is this good for? Younger me was either a genius or...

margarett

Quote from: Jade Elizabeth on January 12, 2016, 10:32:42 PM
For example this url:
http://www.colormeforum.com/other-relaxation/anyone-else-love-bubble-baths/

is this on bit.ly:
http://colrme.club/bubbaths
Yes I love bubble baths ;D ;D ;D

I have no experience whatsoever in dealing with APIs but the concept here seems easy enough (for anyone knowing what they're doing :P ) :
https://github.com/Falicon/BitlyPHP

Besides the "direct" implementation of the API, I would suggest some sort of caching of the results. If you get 1000 page views of the same topic, you would get 1000 connections to bit.ly for the same output, which might be undesirable. A bit like vbgamer45 did for his tweet embed MOD (IIRC). But this would be an extra.

Quote from: nend on January 12, 2016, 11:44:57 PM
Really what is this good for?
URL shortener. Especially useful for tweets ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

nend

Yes that is true, forgot about Twitter limits.

May just have to copy some old code from that site.

Jade Elizabeth

Quote from: nend on January 13, 2016, 07:50:29 AM
Yes that is true, forgot about Twitter limits.

May just have to copy some old code from that site.

It's not just twitter, all sorts of things have limits. Texting. Profile signitures. Profile "url" fields. Hell lots of places :D. Also providing a short link makes people more likely to share it on social media (it's not huge and messy) and it also gives us further branding and url confidence.

Quote from: margarett on January 13, 2016, 04:51:56 AM
Quote from: Jade Elizabeth on January 12, 2016, 10:32:42 PM
For example this url:
http://www.colormeforum.com/other-relaxation/anyone-else-love-bubble-baths/

is this on bit.ly:
http://colrme.club/bubbaths
Yes I love bubble baths ;D ;D ;D

I have no experience whatsoever in dealing with APIs but the concept here seems easy enough (for anyone knowing what they're doing :P ) :
https://github.com/Falicon/BitlyPHP

Besides the "direct" implementation of the API, I would suggest some sort of caching of the results. If you get 1000 page views of the same topic, you would get 1000 connections to bit.ly for the same output, which might be undesirable. A bit like vbgamer45 did for his tweet embed MOD (IIRC). But this would be an extra.

Quote from: nend on January 12, 2016, 11:44:57 PM
Really what is this good for?
URL shortener. Especially useful for tweets ;)

Bubble baths are awesome :D :D :D

I don't have any experience with API's either which worries me a bit. I know VB is extremely busy right now so I won't bother him with my questions. Maybe I should shoot bit.ly an email? That said last time i did and I said to them I had trouble setting up the domain but figured it out and wanted to know if I could allow the world to use it when shortening from my domain, and they replied with information on how to set up the domain. SO FRUSTRATING. I hate when people do that!
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Suki

Perhaps: https://github.com/MissAllSunday/SMF-YOURLS-Integration  if you don't like yourls or doesn't meet your needs you can still take that mod as a guide to make your own.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: