Announcement

Collapse
No announcement yet.

How do I link to and put in an named anchor inside a posting?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I link to and put in an named anchor inside a posting?

    Hi,

    I am curious how it works when I want to link to a named anchor inside a posting.

    I will give you an example:

    -----------------------------------------------------
    Thread 'Marsupilami FAQ'
    ----------------------
    Posting 1


    Hi, welcome to the 'Marsupilami' FAQ!


    Click through the following chapters to learn more about the Marsupilami:


    Chapter 1 : Who or what is the Marsupilami?
    Chapter 2 : What does he eat?
    Chapter 3 : How does he eat it?
    Chapter 4 : Why does he eat it?
    Chapter 5 : Why does he not throw it away then?

    ----------------------
    Posting 2

    Chapter 1 : Who or what is the Marsupilami?


    Hi, welcome to Chapter 1 : Who or what is the Marsupilami?

    Yes... you always wondered about the Marsupilami. Well... he's the story....blah-blah-blah.....



    Chapter 2 : What does he eat?


    Yes.... you tell me about it!


    Blah-blah-blah....
    ----------------------

    I want to achieve this : clicking on Chapter 1 : Who or what is the Marsupilami? in Posting 1 will transfer the user to this Chapter inside Posting 2. Yes... I know how to link to an individual posting but I do not want that... I want to link to different anchors in the same posting.

    I guess this is fairly simple to achieve, but I could not find out how to do it in VB3...

    Anyone?
    Last edited by Grover; Tue 30 Mar '04, 4:48am.
    How much do you love XenForo?

  • #2
    You would need to enable HTML for this and by default each link will still open a new window unless you edit the code.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      Originally posted by Wayne Luke
      You would need to enable HTML for this and by default each link will still open a new window unless you edit the code.
      Are you serious??!! The amazing thing is that seconds ago I found the solution by MYSELF! Yesssss.... learning day by day!

      I just thought.... what about 'Custom BBCode'? So knowing a little bit of basic HTML I tried to create 2 new BBCodes. This is what I came up with:

      Link to anchor
      -------------------------------------------------------------------
      Title : Link to anchor
      Tag : link_to_anchor
      Replacement : <a href="#{option}">{param}</a>
      Example : [link_to_anchor=Chapter1]Link to Chapter1[/link_to_anchor]

      And......

      Set anchor
      -------------------------------------------------------------------
      Title : Set anchor
      Tag : Set_anchor
      Replacement : <a name="{option}">{param}</a>
      Example : [set_anchor=Chapter1]This IS Chapter1[/set_anchor]

      And......

      IT WORKS!!!!! YAHOOOO!!!! I AM SO HAPPY!!!
      How much do you love XenForo?

      Comment


      • #4
        I love it!

        FANTASTIC. I feel so happy.... I am amazed to have achieved it by myself!

        The thing is....I need a supporting website for my forums. I need a website that integrates with the forums. I need a CMS for that task. Since the VB CMS hasn't been released yet I have to find alternative ways to present my members with structured information. So I decided to use my existing forums as a 'CMS'. :

        In all the 'main' forums I put a sticky thread in and called it '<main forumtopic> FAQ'. So all the main forums got a FAQ in it. I just wanted to find a way to make this FAQ thread more structered and useable for my members.

        Introducing those ANCHOR-tags makes it all much more userfriendly, because now I can make my FAQ TOC (table of contents / index) linkable!!! YEAH!
        How much do you love XenForo?

        Comment


        • #5
          Great

          Being the newbie that I am I have to ask you how and where to install that code...

          Thanks,

          Rich


          www.speakoutonline.net

          Comment


          • #6
            Originally posted by RichieBoy67
            Being the newbie that I am I have to ask you how and where to install that code...

            Thanks,

            Rich


            www.speakoutonline.net
            I would like to know this as well please. Thanks.

            Comment


            • #7
              Originally posted by Hussain
              Thanks Grover. Would you be able to guide as to how one would be able to come up from a post down below instead of scrolling up or down?? Thanks.
              Well... you could achieve it with the same procedure I described above. That's the beauty of it!

              You just have to set a new anchor inside the first posting (TOC). For example... you might want to use it this way:

              First Posting (TOC)
              HTML Code:
               -------------------------------------------------------------
              [set_anchor=toc]FAQ TOC with Anchors[/set_anchor]
              Idea/implementation © 2004 by Limelight Studios
              -------------------------------------------------------------
              Then.... ofcourse you have to put a link to this anchor in all the postings below the TOC.
              And by now... you know for yourselve how to achieve that:

              All postings below the TOC
              HTML Code:
              [link_to_anchor=toc]Go to Toc[/link_to_anchor]
              That's all!

              Alternative
              (And.... you don't even have to set an anchor inside the first posting actually. You could also use '[link_to_anchor=top]Go to Toc[/link_to_anchor]' in your postings. 'top' (p instead of c) is standard HTML as far as I know (please experts correct me if I am wrong) and that statement always brings you to the top of the page)

              Good luck with it... I find this idea of myself to be a BIG improvement on the efficiency of my forums, if I may say so myself!
              Last edited by Grover; Sat 3 Apr '04, 6:11am.
              How much do you love XenForo?

              Comment


              • #8
                Originally posted by Hussain
                Hi Grover,

                Thanks for that. Would you allow us access with the username and password over the weekend that is actually tomorrow as well also??? Would need to work on my site as well also. Thanks.
                Yes ofcourse... I have setup this Testusers Forum especially for myself and you guys, so I will keep the 'Testuser'-account active for a long time! Please feel free to visit my Testusers Forum.
                Last edited by Grover; Wed 14 Apr '04, 1:30am.
                How much do you love XenForo?

                Comment


                • #9
                  ------------------------------------------------
                  HOW TO - Use anchor-links inside your Forum
                  by Grover
                  ------------------------------------------------

                  Ok guys,

                  You need to do the following:

                  Step : Creation | First create 2 new Custom BB Codes:

                  - Go to the ACP
                  - Go to Custom BB Codes
                  - Add New BB Code

                  In the Add New BB Code-screen you put in the following fields:

                  LINK TO ANCHOR
                  --------------------------------------
                  Title
                  Link to anchor
                  Tag
                  link_to_anchor
                  Replacement
                  <a href="#{option}">{param}</a>
                  Example
                  [link_to_anchor=Chapter1]Link to Chapter1[/link_to_anchor]
                  Description
                  blah-blah-blah (you fill in your own description as you like)
                  Use {option}
                  Yes
                  Button Image (Optional)
                  (it's up to you)
                  --------------------------------------

                  SET ANCHOR
                  --------------------------------------
                  Title
                  Set anchor
                  Tag
                  set_anchor
                  Replacement
                  <a name="{option}">{param}</a>
                  Example
                  [set_anchor=Chapter1]This IS Chapter1[/set_anchor]
                  Description
                  blah-blah-blah (you fill in your own description as you like)
                  Use {option}
                  Yes
                  Button Image (Optional)
                  (it's up to you)
                  --------------------------------------

                  You have now created 2 new Custom BB Codes. Now you are capable of using them in your postings!

                  Step : Usage | Here's an example on how to implement them in your postings.

                  Your TOC (Table of Contents) -usually the first posting in your thread- should look something like this:

                  HTML Code:
                  ------------------------------------------------------------- 
                  FAQ TOC with Anchors
                  Idea/implementation © 2004 by Limelight Studios
                  -------------------------------------------------------------
                   
                  [link_to_anchor=chapter1]1. What is The Marsupilami?[/link_to_anchor]
                  [link_to_anchor=chapter1.1]1.1. What does he eat[/link_to_anchor]
                  [link_to_anchor=chapter1.1.1]1.1.1. Apple(s)™[/link_to_anchor]
                  [link_to_anchor=chapter1.1.2]1.1.2. Bananas[/link_to_anchor]
                  [link_to_anchor=chapter1.1.3]1.1.3. Pears[/link_to_anchor]
                  [link_to_anchor=chapter1.2]1.2 How does he eat it?[/link_to_anchor]
                  [link_to_anchor=chapter1.3]1.3 Why does he eat it?[/link_to_anchor]
                  [link_to_anchor=chapter1.4]1.4 Why doesn't he throw it away then?[/link_to_anchor]
                  [link_to_anchor=chapter2]2. Who is Grover?[/link_to_anchor]
                  [link_to_anchor=chapter2.1]2.1 The story about the cape[/link_to_anchor]
                  [link_to_anchor=chapter2.2]2.2 Facts about your little monster[/link_to_anchor]
                  [link_to_anchor=chapter2.3]2.3 Ernies' best friend[/link_to_anchor]
                   
                   
                  -------------------------------------------------------------
                  FAQ TOC with Anchors
                  Idea/implementation © 2004 by Limelight Studios
                  -------------------------------------------------------------
                  -
                  ... and after the first posting (TOC) you add some more postings which contain the actual Chapters.
                  Should look something like this:

                  HTML Code:
                  ------------------------------------------------------------- 
                  Additional postings (Chapters)
                  Idea/implementation © 2004 by Limelight Studios
                  -------------------------------------------------------------
                   
                  [set_anchor=chapter1]1. What is The Marsupilami?[/set_anchor]
                   
                  [set_anchor=chapter1.1]1.1. What does he eat[/set_anchor]
                  Based on the Belgian comic strip by Andre Franquin, Marsupilami came to television as part of Disney's Raw Toonage. What that program left the air, Marsupilami gained its own half-hour series, sharing air time with other shorts Sebastian the Crab and Shnookums and Meat. 
                  Marsupilami ("Mars" to his friends) was a yellow marsupial with black spots and a twenty-five-foot prehensile tail he could use to climb, fight, swing, or any number of things. Mars was the fast talker; his gorilla friend Maurice was the strong, silent, stupid type. The two wreaked wacky havoc in the jungle, while avoiding jut-jawed, torso-heavy human Norman. 
                   
                  [set_anchor=chapter1.1.1]1.1.1. Apple(s)™[/set_anchor]
                  Hobbyists did not take the Apple I very seriously, and Apple did not begin to take off until 1977, when the Apple II debuted at a local computer trade show. The first personal computer to come in a plastic case and include color graphics, the Apple II was an impressive machine. Orders for Apple machines were multiplied by several times after its introduction. And with the introduction in early '78 of the Apple Disk II, the most inexpensive, easy to use floppy drive ever (at the time), Apple sales further increased. 
                  [set_anchor=chapter1.1.2]1.1.2. Bananas[/set_anchor]
                  Hobbyists did not take the Apple I very seriously, and Apple did not begin to take off until 1977, when the Apple II debuted at a local computer trade show. The first personal computer to come in a plastic case and include color graphics, the Apple II was an impressive machine. Orders for Apple machines were multiplied by several times after its introduction. And with the introduction in early '78 of the Apple Disk II, the most inexpensive, easy to use floppy drive ever (at the time), Apple sales further increased. 
                  [set_anchor=chapter1.1.3]1.1.3. Pears[/set_anchor]
                  Hobbyists did not take the Apple I very seriously, and Apple did not begin to take off until 1977, when the Apple II debuted at a local computer trade show. The first personal computer to come in a plastic case and include color graphics, the Apple II was an impressive machine. Orders for Apple machines were multiplied by several times after its introduction. And with the introduction in early '78 of the Apple Disk II, the most inexpensive, easy to use floppy drive ever (at the time), Apple sales further increased. 
                   
                  [set_anchor=chapter1.2]1.2 How does he eat it?[/set_anchor]
                  Based on the Belgian comic strip by Andre Franquin, Marsupilami came to television as part of Disney's Raw Toonage. What that program left the air, Marsupilami gained its own half-hour series, sharing air time with other shorts Sebastian the Crab and Shnookums and Meat. 
                  Marsupilami ("Mars" to his friends) was a yellow marsupial with black spots and a twenty-five-foot prehensile tail he could use to climb, fight, swing, or any number of things. Mars was the fast talker; his gorilla friend Maurice was the strong, silent, stupid type. The two wreaked wacky havoc in the jungle, while avoiding jut-jawed, torso-heavy human Norman. 
                   
                  [set_anchor=chapter1.3]1.3 Why does he eat it?[/set_anchor]
                  Based on the Belgian comic strip by Andre Franquin, Marsupilami came to television as part of Disney's Raw Toonage. What that program left the air, Marsupilami gained its own half-hour series, sharing air time with other shorts Sebastian the Crab and Shnookums and Meat. 
                  Marsupilami ("Mars" to his friends) was a yellow marsupial with black spots and a twenty-five-foot prehensile tail he could use to climb, fight, swing, or any number of things. Mars was the fast talker; his gorilla friend Maurice was the strong, silent, stupid type. The two wreaked wacky havoc in the jungle, while avoiding jut-jawed, torso-heavy human Norman. 
                   
                  Etc... you get the point. 
                  For a LIVE demo on my own forum see: http://www.vbulletin.com/forum/showp...58&postcount=9
                  -
                  Last edited by Grover; Thu 26 Aug '04, 6:40am.
                  How much do you love XenForo?

                  Comment


                  • #10
                    Do you think you could point us to a page you have set up on your forums please? Thanks.

                    Comment


                    • #11
                      Glad to provide you this...

                      Originally posted by Hussain
                      Do you think you could point us to a page you have set up on your forums please? Thanks.
                      Ofcourse I can....
                      (it is unbelievable, but I was just finishing setting up this testforum/user on my site so I could provide you all with a demo!)

                      - Go to www.xxx.nl
                      - Log in with username xxx' and password xxxx'
                      - Go to 'Testusers Forum'
                      - Click on the one and only 'FAQ TOC : implemented with anchors!'-thread.

                      I hope this is helpfull to you guys,
                      Last edited by Grover; Wed 6 Jul '05, 3:47am.
                      How much do you love XenForo?

                      Comment


                      • #12
                        I also have extended my 'HOWTO' in posting#7 above. Take a look if you like.

                        ... and if anybody has any improvements/suggestions etc then please let me know. Because -if it's okay with the moderators- at some point I would like to make a copy of this thread, delete all the clutter in it, so I can publish a proper 'HowTo' and copy it to the 'Hints and Tips'-forum someday.

                        Thanks for any feedback,
                        Last edited by Grover; Sat 3 Apr '04, 12:43am.
                        How much do you love XenForo?

                        Comment


                        • #13
                          Hi Grover,

                          Thanks for that. Would you allow us access with the username and password over the weekend that is actually tomorrow as well also??? Would need to work on my site as well also. Thanks.
                          Last edited by Hussain; Fri 27 Aug '04, 6:03am.

                          Comment


                          • #14
                            Originally posted by Grover
                            I also have extended my 'HOWTO' in posting#7 above. Take a look if you like.

                            ... and if anybody has any improvements/suggestions etc then please let me know. Because -if it's okay with the moderators- at some point I would like to make a copy of this thread, delete all the clutter in it, so I can publish a proper 'HowTo' and copy it to the 'Hints and Tips'-forum someday.

                            Thanks for any feedback,
                            Thanks Grover. Would you be able to guide as to how one would be able to come up from a post down below instead of scrolling up or down?? Thanks.

                            Comment


                            • #15
                              Combining 2 great tips together!

                              Hmmm, what's going on? The postings above are suddenly in the wrong 'order'. I guess it has something to do with the servermove? ---

                              Anyway... Just to let you know that I have another great tip for you. When you combine this HOW TO - Use anchor-links inside your Forum with my LIST CSS Restyling then you can achieve some really AMAZING results. See http://www.vbulletin.com/forum/showthread.php?t=99808 for more information on this subject.

                              I have also provided a Live Demo. Just,

                              - Go to www.xxx.nl
                              - Login with username xxxx and password xxxx
                              - Go to 'Testusers Forum'
                              - Click on 'FAQ TOC : implemented with anchors and CSS restyling!'.......

                              ....and be VERY amazed! I can't believe I have achieved it myself!

                              Oh... and just compare the 'FAQ TOC : implemented with anchors and CSS restyling!' with 'FAQ TOC : implemented with anchors!' (to be found in the same forum). One with CSS styling and one without it. Amazing isn't it?
                              Yes it is.... and I becomes even more userfriendly when you combine this CSS 'List'-Restyling with my Custom BBCodes found in this thread. That gives you the best of both worlds!!, IMnot-so-HO. Using these both together it becomes possible to create extensive 'Documents/Manuals/FAQs' inside your forum.
                              -
                              Last edited by Grover; Wed 6 Jul '05, 3:48am.
                              How much do you love XenForo?

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X