http://www.phpbb.com/community/viewtopi ... &t=1218005
Enter the admin CP, click the Posting tab, then Add a new BBCode.
Under BBCode usage:
Code: Select all
[anchor={IDENTIFIER}]{TEXT}[/anchor]
Code: Select all
<a name="{IDENTIFIER}" href="#{IDENTIFIER}">{TEXT}</a>
Code: Select all
Anchor: [anchor=anchor_name]any text[/anchor]
Then click submit.
Repeat these steps for the goto tag:
BBCode usage:
Code: Select all
[goto={IDENTIFIER}]{TEXT}[/goto]
Code: Select all
<a href="#{IDENTIFIER}">{TEXT}</a>
Code: Select all
Goto: [goto=anchor_name]Link Text[/goto]
The Anchor tag creates the named anchor with (optional) visible text acting as a self-referencing link. It generates a fully qualified URL pointing to that anchor, which can be linked to from other threads or even other sites.
In both cases, using the IDENTIFIER token should prevent anyone from entering something more complicated than a simple name; e.g., an external URL or random HTML tag. Nothing I tried to put in there succeeded in doing anything but cleanly breaking the BBCode tag.
If you quote or edit a post containing these tags they are copied into the editing window intact. When you preview or post the quoted content, the links still work. If an anchor is duplicated elsewhere in the post or the thread, quoted or not, a goto will default to the first occurrence of the anchor on that page of the thread. Certainly you can screw up the organization of your own post if you work at it, but it doesn't break the forum software.
The result is we can create the following kind of post, where the blue text items are live links that do what you'd expect them to:
The BBCode would look like this:Lorem ipsum dolor...
by mdevour on Wed Dec 09, 2009 7:18 am
Introductory text goes here... Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut id orci magna. Nulla facilisi. Integer aliquet ligula vel lacus viverra ullamcorper. Etiam venenatis, ante ac imperdiet condimentum, mauris mauris ultrices dui, nec facilisis magna odio eu quam.
Contents
- Section 1
Section 2
Section 3
Heading for section 1...
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut id orci magna. Nulla facilisi. Integer aliquet ligula vel lacus viverra ullamcorper. Etiam venenatis, ante ac imperdiet condimentum, mauris mauris ultrices dui, nec facilisis magna odio eu quam. Duis accumsan commodo mauris id varius. In quis ipsum felis. In hac habitasse platea dictumst. Etiam vel mattis sapien.
Return to Contents
Heading for section 2...
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut id orci magna. Nulla facilisi. Integer aliquet ligula vel lacus viverra ullamcorper. Etiam venenatis, ante ac imperdiet condimentum, mauris mauris ultrices dui, nec facilisis magna odio eu quam. Duis accumsan commodo mauris id varius. In quis ipsum felis. In hac habitasse platea dictumst. Etiam vel mattis sapien.
Return to Contents
Heading for section 3...
Etcetera...
Code: Select all
Introductory text goes here... Lorem ipsum ... etcetera ...
[size=150][b][anchor=tocanchor]Contents[/anchor][/b][/size]
[list]
[goto=testanchor1]Section 1[/goto]
[goto=testanchor2]Section 2[/goto]
[goto=testanchor3]Section 3[/goto]
[/list]
[size=150][b][anchor=testanchor1]Heading for section 1...[/anchor][/b][/size]
Lorem ipsum ... etcetera ...
[size=85][goto=tocanchor]Return to Contents[/goto][/size]
[size=150][b][anchor=testanchor2]Heading for section 2...[/anchor][/b][/size]
Lorem ipsum ... etcetera ...
[size=85][goto=tocanchor]Return to Contents[/goto][/size]
[size=150][b][anchor=testanchor3]Heading for section 3[/anchor][/b][/size]
Etcetera...
http://www.phpbb.com/community/viewtopi ... 4&t=926045
http://www.phpbb.com/community/viewtopi ... 6&t=579376
I ask the admin team to seriously consider setting this up. I think I've streamlined the instructions and bullet-proofed things to where it should be quick to implement and safe for the forum. We've discussed it some already in a previous thread and by PM, but I wanted to eliminate whatever obstacles I could and make one last attempt. I'll abide by your decision, but I would appreciate knowing the nature of your concerns should you choose not to go with it. Post or PM me as you prefer.
Thank you very much.
Mike D.