SRL Archive - Dear Staff..

Anchor vBCode Tags!


Chris!

2012-12-18 03:22:34

Hello, my suggestion to the administrators of the forums is to add an anchor vBCode tag(s). This would mainly be for long tutorials and so tutorials do not have to have a post each for different sections.

Here's how:

First, you need to create two new bbcodes. Start by going to:
Admin CP -> Custom BB Codes -> Add New BB Code

Then fill in the relevant fields using these settings and parameters:

Title: Anchor link
Tag: jumpto
Replacement: <a href="#{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

Create another bbcode using these settings and parameters:

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


Implementation

Wrap the [jumpto] tag around a link that will take the reader to another place within the post, as follows:

[jumpto="anchor1"]link to somewhere within the post[/jumpto]

Then wrap the [aname] tag around the first word or phrase of the section you want the reader to jump to:

[aname="anchor1"]This is where you end up[/aname]

In the above two examples, change anchor1 to whatever name you choose for the link. (For example: if you are linking to a section called "Theory of Gravity", anchor1 could be called theory). They must both be identical in order to work correctly.

And yes, you can use these same tags for "back to top" links. Wrap the following tags around the first word of the post:

[aname="top"]first word of your post[/aname]

And place this one in the appropriate part of the post where a reader would click it to jump back to the top:

[jumpto="top"]back to top[/jumpto]



Thread which I found this on: https://www.vbulletin.com/forum/showthread.php/224630-Anchors-in-posts-using-vbcode

If there is already a way to anchor via the html wrap tags, then please let me know! But I think adding this would be easier for users that are new-ish to vBulletin.

Thanks!

-Chris!

P1ng

2012-12-18 03:34:10

Sounds like a great idea! Would be really handy for long tutorials and such :)

Justin

2012-12-18 03:50:56

I can see this being used in the future, maybe with vB 4.0 we might see this addon

Chris!

2012-12-18 04:19:24

From: [J]ustin
I can see this being used in the future, maybe with vB 4.0 we might see this addon


vB 4 has been out for awhile now, apart from maybe the loss of important addons with the current forum, I don't see why we aren't currently running >4.0.

Justin

2012-12-18 04:25:14

From: Chris!
vB 4 has been out for awhile now, apart from maybe the loss of important addons with the current forum, I don't see why we aren't currently running >4.0.


I know 4 has been out awhile. Wizzup? is in the process of upgrading the forums. I don't believe its a simple task because of the customizations we currently have. IIRC over Christmas we should have 4 up and running.

Chris!

2012-12-18 05:22:00

From: [J]ustin
I know 4 has been out awhile. Wizzup? is in the process of upgrading the forums. I don't believe its a simple task because of the customizations we currently have. IIRC over Christmas we should have 4 up and running.


Mhm, that was the only thing that came to mind about why it hasn't been updated yet. Just all the addons that are currently installed and in use.

Let's hope vB 4+ is installed as a nice Christmas gift from SRL. :D

NKN

2012-12-18 06:47:53

Christmas forums. :D

Hobbit

2012-12-18 15:02:18

From: [J]ustin
I know 4 has been out awhile. Wizzup? is in the process of upgrading the forums. I don't believe its a simple task because of the customizations we currently have. IIRC over Christmas we should have 4 up and running.


Hobbit is upgrading the forums :(

Right now I am just waiting on the databases from Wizzup to start trying imports. It is coming.

Also, anchors was already on my list, and I know how to add BBcodes ;)

BraK

2012-12-18 15:03:50

oh oh Countdowns :D

Hobbit

2012-12-18 15:08:23

From: BraK
oh oh Countdowns :D


That will have to wait until I find a safer alternative to the one we had before.
(Bottom of the list, sorry BraK)

Chris!

2012-12-18 16:27:24

From: Hobbit
Hobbit is upgrading the forums :(

Right now I am just waiting on the databases from Wizzup to start trying imports. It is coming.

Also, anchors was already on my list, and I know how to add BBcodes ;)


It never hurts to put what you have to do to add a vBCode. :D

Well, I'm really looking forward to the forum upgrade and hope all the addons can be ported.

P1ng

2012-12-19 01:02:03

Do we have an ETA Hobbit? :)

Justin

2012-12-19 01:10:25

Oh best of luck Hobbit.

Enjoy migrating the database ;)

Chris!

2012-12-19 01:34:43

Indeed, good luck sir.

Dgby714

2012-12-19 01:35:39

From: P1ng
Do we have an ETA Hobbit? :)


No, he is doing it in his free time. It will be done when it's done.

P1ng

2012-12-20 00:30:31

From: Dgby714
No, he is doing it in his free time. It will be done when it's done.


That's fair enough, was just curious if he had a time frame in which he thought it may be completed. I have no major issues with the forum at present anyway :)

Chris!

2013-01-14 00:26:25

Has this been implemented in the recent forum upgrade? If yes, please close the thread. ;)

Gu3st...

2013-01-14 04:01:09

Yes, this is now added

[jumpto="test"]testme[/jumpto] ([jumpto="test"]testme[/jumpto])

[anchor="test"]test[/anchor] ([anchor="test"]test[/anchor])