Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

URL Truncation

Options

Comments

  • Registered Users Posts: 6,762 ✭✭✭WizZard


    Would you be happy with an external service (e.g. short.ie) as that would be relatively easy to add with a vB plugin (I think)?


  • Moderators, Music Moderators Posts: 23,361 Mod ✭✭✭✭feylya


    As long as it's the Boards.ie domain, I don't mind. Reason for the request is it's easier to tweet the address, easier to copy and paste on a phone and because it has the boards.ie domain, you know it's a Boards post.


  • Registered Users Posts: 6,762 ✭✭✭WizZard


    Ah ok. Then it's (a bit) harder.


  • Subscribers Posts: 4,076 ✭✭✭IRLConor


    How about:

    "http://" linkType ".boards.ie/" id

    where:

    linkType is "t" for a thread link and "p" for a post link
    and
    id is the base 36 encoded version of the thread or post ID.

    For example, this thread would be http://t.boards.ie/xztas0 and the first post would be http://p.boards.ie/zlvjo.

    It's simple and it's cheap to create the URLs since there's no need to hit a database or do complex calculations.

    Anyone have a better idea?


  • Closed Accounts Posts: 124 ✭✭BertrandMeyer


    The only reason boards.ie would need such a service is because it has terrible URLs to begin with.

    The URL for this thread:
    http://boards.ie/vbulletin/showthread.php?t=2055537360

    could very easily be changed to something like:
    http://boards.ie/t2055537360


  • Advertisement
  • Registered Users Posts: 5,297 ✭✭✭Ron DMC


    The only reason boards.ie would need such a service is because it has terrible URLs to begin with.

    The URL for this thread:
    http://m.boards.ie/vbulletin/showthread.php?t=2055537360

    could very easily be changed to something like:
    http://m.boards.ie/t2055537360

    That's the nature of vbulletin and how it's structured.
    But yeah, the shorter urls would be well handier. Whether to go with http://t.boards.ie/hfdkgd or http://boards.ie/t?=hfdkgd


  • Closed Accounts Posts: 124 ✭✭BertrandMeyer


    You changed boards.ie to m.boards.ie in that quote. That isn't necessary.
    (Edit: Disregard that; m.boards.ie probably changed those links automatically. Whoops.)

    Something like http://boards.ie/t2055537360 could be done with a few simple .htaccess rules. New URLs like this would not require any extra database lookups, and the current URLs like /vbulletin/showthread.php?t=2055537360 would still work.


  • Registered Users Posts: 5,297 ✭✭✭Ron DMC


    Something like http://m.boards.ie/t2055537360 could be done with a few simple .htaccess rules. New URLs like this would not require any extra database lookups, and the current URLs like /vbulletin/showthread.php?t=2055537360 would still work.

    Sounds like a perfect solution then, let's hope Ross can find some time at some point in the future to implement it.

    I'd still like to see some personalisation to the shortened urls if possible. e.g. http://www.boards.ie/shorturls for this thread maybe.


  • Subscribers Posts: 4,076 ✭✭✭IRLConor


    Something like http://boards.ie/t2055537360 could be done with a few simple .htaccess rules. New URLs like this would not require any extra database lookups, and the current URLs like /vbulletin/showthread.php?t=2055537360 would still work.

    That's pretty much the process I was thinking of. The only reason for the base36 encoding of the id was to make it a bit shorter.


  • Subscribers Posts: 4,076 ✭✭✭IRLConor


    I'd still like to see some personalisation to the shortened urls if possible. e.g. http://www.boards.ie/shorturls for this thread maybe.

    Personalised shortened URLs would be nice. The downside to that is that there would need to be some lookup against a persistent store of shortcodes which would increase the implementation costs.


  • Advertisement
  • Closed Accounts Posts: 124 ✭✭BertrandMeyer


    IRLConor wrote: »
    That's pretty much the process I was thinking of. The only reason for the base36 encoding of the id was to make it a bit shorter.

    Encoding the id is a good idea. Base64 might work even better.


  • Subscribers Posts: 4,076 ✭✭✭IRLConor


    Encoding the id is a good idea. Base64 might work even better.

    It would. Probably modified Base64 though, since + and / are valid in Base64 but are special in URLs.

    I only picked base 36 since that's the highest that the base_convert PHP function will go to and I was trying to figure the lowest-friction method of getting this feature into vBulletin.


  • Closed Accounts Posts: 124 ✭✭BertrandMeyer


    IRLConor wrote: »
    It would. Probably modified Base64 though, since + and / are valid in Base64 but are special in URLs.

    I only picked base 36 since that's the highest that the base_convert PHP function will go to and I was trying to figure the lowest-friction method of getting this feature into vBulletin.

    There are URL-friendly base 64 algorithms out there, but you've got a point about low friction changes. Base 36 may be better after all.


Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.

Advertisement