Adding anhor functionality as bbcode?

Post here doubts, ideas, suggestions and support requests about the website and the forums.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
HorridoJoho
L2j Senior Developer
L2j Senior Developer
Posts: 795
Joined: Sun Aug 14, 2005 11:27 am

Adding anhor functionality as bbcode?

Post 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> 
Last edited by HorridoJoho on Sun Oct 09, 2011 1:54 pm, edited 4 times in total.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Adding anhor functionality as bbcode?

Post 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

Code: Select all

<a id="someid"></a>
tag. To link it, just URL#someid
However, this feature would be practically unused.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
Stake
Posts: 383
Joined: Sun Mar 23, 2008 9:33 pm
Location: Hungary
Contact:

Re: Adding anhor functionality as bbcode?

Post 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

Code: Select all

<a id="someid"></a>
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.
Image
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Adding anhor functionality as bbcode?

Post by jurchiks »

And who will actually use these anchors?
How often have you observed people linking to some forum tutorials/long, detailed posts?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
ThePhoenixBird
L2j Inner Circle
L2j Inner Circle
Posts: 1857
Joined: Fri May 27, 2005 5:11 pm

Re: Adding anhor functionality as bbcode?

Post by ThePhoenixBird »

Interesting...
Post Reply