Retrieving Links in Posts with BB Codes [thread] and [post]

Discussion in 'Forum Announcements and Feedback' started by Junglekeeper, Nov 1, 2015.

  1. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,989
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    Posts made using the previous forum software sometimes incorporated BB codes [thread] and [post] to reference other posted material. The links they created are no longer there as these codes are not recognized by the new software. However the information they referenced can be retrieved manually with a little effort via the thread/post number. The following shows how this can be done.

    For threads:
    • [thread]threadNo[/thread]
    • [thread=threadNo]some text[/thread]
    Enter the following url:
    forums.botanicalgarden.ubc.ca/threads/threadNo

    For posts:
    • [post]postNo[/post]
    • [post=postNo]some text[/post]
    Enter the following url:
    forums.botanicalgarden.ubc.ca/posts/postNo
     
    Last edited: Nov 1, 2015
  2. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,907
    Likes Received:
    2,306
    Location:
    Vancouver, BC Canada
    I don't understand this, @Junglekeeper. Do you have an example?
     
  3. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,989
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    The following are posts I made in the past using [thread] and [post] codes.

     
  4. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,989
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    It turns out a thread can be retrieved much the same way as for a post. I've edited my original instructions accordingly.
     
  5. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,907
    Likes Received:
    2,306
    Location:
    Vancouver, BC Canada
    That's an easy way to deal with my problem with the Permalinks when viewing last post first, as the VCBF forums used to be set, since it's what's happening today that's of interest in the multi-page topical threads. In the Hastings-Sunrise cherry thread, I see posting #80 right now on my first page. I have all my threads set to last-first. If I pick up the permalink for that posting, it looks like this (I'm making it not work so you can see the link).:
    ht tp://forums.botanicalgarden.ubc.ca/threads/hastings-sunrise.37271/page-4#post-343742​
    Post-343742 is not on my page-4, it's on my page-1, so the link goes to the top of page-4, not finding the bookmark on my page-4. When the link just has the post number, it goes to the thread positioned at the posting
    ht tp:// forums.botanicalgarden.ubc.ca/posts/343742 - here it is linked:
    Hastings-Sunrise | Page 4 | UBC Botanical Garden Forums

    That's really funny - when it converts the URL to a display link, it puts the page number back in, but leaves it out of the URL.

    Why does the system need all that other stuff in the Permalink? I thought "permalink" was supposed to mean a link that would always work. Even for people who are using the normal thread viewing sequence, if a few postings are deleted, a posting could easily move to a new page, and then the Permalink would not work. I haven't tested this, but I think that's what would happen.

    Anyway, thanks for this. It's easy to do, and almost easy to remember.
     
    Last edited: Nov 1, 2015
  6. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,989
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    Perhaps a conversion routine can be written, as time permits, to change all such occurrences in the database back to proper links.
     
  7. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,907
    Likes Received:
    2,306
    Location:
    Vancouver, BC Canada
    It's sort of ironic that in this system, you don't need to do it that way to show the name of the thread, since the conversion to the thread name is automatic, so you can just paste in the URL.

    It might take you less time to search for [thread= in your posts, get the thread link and replace them. I suppose they're too old for you to edit them. A lot of hits come up that don't have that character string - I don't know what's driving that.

    It would take less time than for me to redo a Resource I had finished but not saved and then clicked something that just closed all my tabs. Firefox would have reopened them, but I'm using stupid Edge, because my typing gets hung up in Firefox. Grr. It was a short one anyway, but still.
     
  8. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,907
    Likes Received:
    2,306
    Location:
    Vancouver, BC Canada
    Sorry to be so off-topic; I was really upset. I had already tried starting a new topic, but just now I did that again and all my stuff was there! I LOVE the Drafts thing in this system. I'm so happy, I'll fix up 10 of your posts (just so this can be less off-topic).
     
  9. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,989
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    Really? I didn't know that. I'll have to try that when I get a chance.

    You're not going to fixed them all manually are you? Do you know how many occurrences of these things there are in the entire database?
     
  10. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,907
    Likes Received:
    2,306
    Location:
    Vancouver, BC Canada
    I did a few of yours. The postings are so old, I don't think it's worth the time. Do you think other people really used that trick?
    As I mentioned, I got a lot of hits when I did a search for the character string that precedes the number, but the threads didn't seem to have that string. Several were my posts - I know I didn't use it.
     
  11. wcutler

    wcutler Paragon of Plants Forums Moderator VCBF Cherry Scout 10 Years

    Messages:
    10,907
    Likes Received:
    2,306
    Location:
    Vancouver, BC Canada
    It's right here, from posting number 5:
    The second line's URL was entered exactly the same as the first line - I put the space in "ht tp" so that it wouldn't translate and you could see what I had entered. And I didn't use the link button on either one. You only need to use that now if you want to put a link on some text.
     
  12. Junglekeeper

    Junglekeeper Esteemed Contributor 10 Years

    Messages:
    5,989
    Likes Received:
    608
    Location:
    Vancouver BC Canada
    That's handy indeed - I tried it in Testbed after we spoke yesterday. I'll certainly be taking advantage of that from now on.
     

Share This Page