Anchor links on vBulletin 5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zonaw
    New Member
    • May 2013
    • 26
    • 5.0.0

    Anchor links on vBulletin 5

    I using anchor links with custom bbcode:

    Code:
    - example: www.cerberuz.com/forum/descargas/20-descargar-encarta-2016-gratis-para-windows
    - anchors look like this: www.cerberuz.com/forum/descargas/20-descargar-encarta-2016-gratis-para-windows#redes (working fine)
    - vb version 5.0.5
    But im unable to make it work on my othe site with a diferent vbulletin version:

    Code:
    - example: www.forosecuador.ec/forum/ecuador/viajes-y-turismo/2930-fiestas-de-portoviejo-2013
    - anchors look like this: http://www.forosecuador.ec/[COLOR=#B22222][ relpath ] [ / relpath ][/COLOR]#redes (not working)
    - anchors should look like this: www.forosecuador.ec/forum/ecuador/viajes-y-turismo/2930-fiestas-de-portoviejo-2013#redes
    - vb version 5.2.0
    The problem is that {relpath} its not working on vb 5.2.0

    Here is the instructions that i implemented:
    Custom bbcode




    Title: Anchor link
    Tag: jumpto
    Replacement: <a href="{relpath}#{option}">{param}</a>
    Example: [jumpto=aname]This takes you to a new location within a post[/jumpto]
    Description: The [jumpto] tag allows you to jump to another location within a post, usually used for long posts with headings and/or sections of interest. This tag <b>must</b> be used in conjunction with the [aname] tag. One is not functional without the other.
    Use {option}: Yes
    Click Save

    Title: Named anchor link
    Tag: aname
    Replacement: <a name="{option}">{param}</a>
    Example: [aname=aname]This is where you jump to[/aname]
    Description: The [aname] tag is used in conjunction with the <a href="#jumpto">[jumpto]</a> tag. One is not functional without the other.
    Use {option}: Yes
    Click Save

    How can i get the relative path? or the thread url on vbulletin 5.2.0?

    Thanks for your comments.
    Last edited by zonaw; Fri 15 Apr '16, 12:02pm.
  • zonaw
    New Member
    • May 2013
    • 26
    • 5.0.0

    #2
    Or how can i delete target=_blank on internal links?? so i could use anchor links with html, no custom bbcode

    Thanks

    Comment

    • glennrocksvb
      Former vBulletin Developer
      • Mar 2011
      • 4021
      • 5.7.X

      #3
      You can include a < script > tag in the Replacement and have it programmatically get the current thread base URL and dynamically set the link's href.

      Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

      Comment

      Related Topics

      Collapse

      Working...