Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2008-08-02 09:55:41

elbekko
Former Developer
From: Leuven, Belgium
Registered: 2008-04-30
Posts: 1,131
Website

Add an ID to h tags in BBCode

It would be nice if you could link to a heading tag by giving each heading a unique ID.
Something like #post-<postnum>-<headingnum> would be nice.

And yeah, I realise this could be fairly tricky.

Last edited by elbekko (2008-08-02 09:56:01)


Ben
SVN repository for my extensions - The thread
Quickmarks 0.5
“Question: How does a large software project get to be one year late? Answer: One day at a time!” - Fred Brooks

Offline

#2 2008-08-02 13:52:15

Connor
Former Developer
Registered: 2008-04-27
Posts: 1,127

Re: Add an ID to h tags in BBCode

You know whats coming tongue

Extension.

Offline

#3 2008-08-02 18:32:29

orlandu63
Member
From: New Jersey, USA
Registered: 2008-05-17
Posts: 187
Website

Re: Add an ID to h tags in BBCode

elbekko wrote:

It would be nice if you could link to a heading tag by giving each heading a unique ID.
Something like #post-<postnum>-<headingnum> would be nice.

And yeah, I realise this could be fairly tricky.

What about {h="id"}{/id}?

Last edited by orlandu63 (2008-08-02 18:32:59)

Offline

#4 2008-08-02 18:38:08

Paul
Developer
From: Wales, UK
Registered: 2008-04-27
Posts: 1,623

Re: Add an ID to h tags in BBCode

1. Can you guarentee nobody will use the same id more than once on the same page. The only way to do it would be using a counter in a similar way to how its done for form fields.

2. How do you cope with quoted headings which are certain to result in duplicated id's.

3. I don't actaully like page anchors very much in part because some more advanced css techniques fall apart if they are used.

Not only isn't this a good idea for the core, I think its a bad idea for an extension as I can't think of any benefit arising from it.


The only thing worse than finding a bug is knowing I created it in the first place.

Offline

#5 2008-08-02 18:57:22

elbekko
Former Developer
From: Leuven, Belgium
Registered: 2008-04-30
Posts: 1,131
Website

Re: Add an ID to h tags in BBCode

So it's bad being able to link to a certain heading in, say, a huge rules post?

Very well. Guess I'll just make the extension then.


Ben
SVN repository for my extensions - The thread
Quickmarks 0.5
“Question: How does a large software project get to be one year late? Answer: One day at a time!” - Fred Brooks

Offline

#6 2008-08-02 21:52:26

Connor
Former Developer
Registered: 2008-04-27
Posts: 1,127

Re: Add an ID to h tags in BBCode

Well, I think its unlikely to be used much, and it makes heading a totally non-standard bbcode, the fact it is simple to add is the reason we added it

Offline

Board footer

Powered by FluxBB 1.4.8