Page 1 of 1

BBCode Anchor

Posted: Tue Sep 30, 2008 4:14 pm
by Peresnik
Hello,

In this thread, Raimon made a Table of Contents, leading to certain parts of his post.

I was unsure if this is the right place, as I doubt that that's a mod, but what would be the BBCode to use the similar function as he did? I mean to link in one post to another part in the same post. When quoting his entry, he used the marks [goto=][goto], however, how would I be able to make up a similar code?

I thank you in advance, sincerely Peresnik

[EDIT: Big apology, already found the solution. Thank you anyways!]

Re: BBCode Anchor

Posted: Fri Oct 24, 2008 2:09 pm
by ferra1980
Try add this 2 bbcode in your acp...

Anchor bbcode:
BBCode:

Code: Select all

[anchor]{TEXT}[/anchor]
HTML:

Code: Select all

<a name="{TEXT}"></a>
Helpline:

Code: Select all

Anchor: [anchor]Name of the anchor[/anchor]
Goto bbcode:

BBCode:

Code: Select all

[goto={TEXT1}]{TEXT2}[/goto]
HTML:

Code: Select all

<a href="#{TEXT1}">{TEXT2}</a>
Helpline:

Code: Select all

Goto: [goto=Anchor Name]Link tekst[/goto]
Then use like this:

Code: Select all

    [anchor]Start[/anchor]
    Lorem Ipsum is simply dummy
    text of the printing and typesetting industry.
    Lorem Ipsum has been the industry's standard
    dummy text ever since the 1500s, when an unknown
    printer took a galley of type and scrambled it to
    make a type specimen book. It has survived not only
    five centuries, but also the leap into electronic typesetting,
    remaining essentially unchanged. It was popularised in the
    1960s with the release of Letraset sheets containing Lore
    Ipsum passages, and more recently with desktop publishing
    software like Aldus PageMaker including
    versions of Lorem Ipsum.
    [goto=Start]Start[/goto]

Re: BBCode Anchor

Posted: Sat Mar 21, 2009 6:36 pm
by Sylwia
Thanks for the codes, Ferra1980! That's exactly what I've been looking for.

Re: BBCode Anchor

Posted: Wed Aug 12, 2009 3:02 am
by Gene Laratonda
Gotta love a good search engine. I was looking for this too.

I used exactly what you posted, but when I did this the anchor text no longer was visible. Even if I click and drag over where it was it does not show up, but it will link to it from the goto bbcode. This is my workaround unless someone has a good answer. The first line acts as the anchor and for whatever isn't visible. The second line is the visible heading.

Code: Select all

[anchor]NAME OF ORGANIZATION[/anchor]  
[b]NAME OF ORGANIZATION[/b]
UPDATE:
Found a better fix...

Just change his HTML Replacement code for the anchor tag to be:

Code: Select all

<a name="{TEXT}">{TEXT}</a>