Page 1 of 1
Adding anhor functionality as bbcode?
Posted: Sun Oct 09, 2011 10:10 am
by HorridoJoho
As title says, it would be nice to have an anchor function with bbcode.
Idea from:
http://www.phpbb.com/community/viewtopic.php?p=7216175
The anchor:
Code: Select all
BB: [anchor={ANCHOR_NAME}]{LINK_TEXT}[/anchor]HTML: <a name="{ANCHOR_NAME}">{LINK_TEXT}</a>
The jumper:
Code: Select all
BB: [goto_anchor={ANCHOR_NAME}]{LINK_TEXT}[/goto_anchor]HTML: <a href="#{ANCHOR_NAME}">{LINK_TEXT}</a>
I'm not familar with phpbb, but maybe it would be possible to use something like the following that anchors of one post does not interfer with another posts anchors:
Code: Select all
<a name="{ANCHOR_NAME}{postrow.POST_ID}">{LINK_TEXT}</a>
Re: Adding anhor functionality as bbcode?
Posted: Sun Oct 09, 2011 11:27 am
by jurchiks
Just a suggestion: html
a tag
name attribute is deprecated, use
id instead.
Basically for this functionality all you need to do is to be able to make an anchor, or
tag. To link it, just URL#someid
However, this feature would be practically unused.
Re: Adding anhor functionality as bbcode?
Posted: Sun Oct 09, 2011 1:16 pm
by Stake
jurchiks wrote:Just a suggestion: html
a tag
name attribute is deprecated, use
id instead.
Basically for this functionality all you need to do is to be able to make an anchor, or
tag. To link it, just URL#someid
However, this feature would be practically unused.
It may be deprecated, but still and will be supported in further HTML versions. So it is recommended to use the name attribute for anchors. You know, it is confusing when an element has id tag, and you only use it as an anchor. Id should be only the identifier in DOM tree to like jQuery and CSS.
And, I think, it would be a useful feature mostly for those contributers who write their entire documentation in one post.
Re: Adding anhor functionality as bbcode?
Posted: Mon Oct 10, 2011 6:18 pm
by jurchiks
And who will actually use these anchors?
How often have you observed people linking to some forum tutorials/long, detailed posts?
Re: Adding anhor functionality as bbcode?
Posted: Tue Oct 11, 2011 6:18 am
by ThePhoenixBird
Interesting...