PDA

View Full Version : Anchor vBCode Tags!



Chris!
12-18-2012, 08:22 AM
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: This takes you to a new location within a post
Description: The 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 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
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

Then wrap the 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

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:


first word of your post

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


back to top



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
12-18-2012, 08:34 AM
Sounds like a great idea! Would be really handy for long tutorials and such :)

Justin
12-18-2012, 08:50 AM
I can see this being used in the future, maybe with vB 4.0 we might see this addon

Chris!
12-18-2012, 09:19 AM
ustin;1144225']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
12-18-2012, 09:25 AM
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!
12-18-2012, 10:22 AM
ustin;1144237']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
12-18-2012, 11:47 AM
Christmas forums. :D

Hobbit
12-18-2012, 08:02 PM
ustin;1144237']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
12-18-2012, 08:03 PM
oh oh Countdowns :D

Hobbit
12-18-2012, 08:08 PM
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!
12-18-2012, 09:27 PM
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
12-19-2012, 06:02 AM
Do we have an ETA Hobbit? :)

Justin
12-19-2012, 06:10 AM
Oh best of luck Hobbit.

Enjoy migrating the database ;)

Chris!
12-19-2012, 06:34 AM
Indeed, good luck sir.

Dgby714
12-19-2012, 06:35 AM
Do we have an ETA Hobbit? :)

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

P1ng
12-20-2012, 05:30 AM
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!
01-14-2013, 05:26 AM
Has this been implemented in the recent forum upgrade? If yes, please close the thread. ;)

Zyt3x
01-14-2013, 09:01 AM
Yes, this is now added

testme (testme)

test (test)