Jump to content

NEW BBCODES!


Firon

Recommended Posts

I've added some extra bbcodes to the forum.

[noparse] for font face

[hr /] and


= <hr /> (Horizontal Line)

for strikethrough (<del> </del>)

[pre] [/pre] for fixed-width formatting

and for superscripting and subscripting, respectively

for changing text size (in em)

for highlighting text

[align= ALIGNMENT ] [/align] for text alignment

[ul] [/ul], [ol] [/ol], and [li] [/li] for lists

[/noparse]

List bbcodes are sane now. They work like the HTML equivalents.

[noparse][ul][li]list item 1[/li]

[li]list item 2[/li]

[li]list item 3[/li]

[/ul]

[/noparse]

will display

[ul][li]list item 1[/li]

[li]list item 2[/li]

[li]list item 3[/li]

[/ul]

I also added [noparse][noparse][/noparse][/noparse] so you can avoid bbcode parsing for whatever reason.

Now mods and admins can move posts out of a thread, so hijacked threads should no longer need to be locked.

It also detects if there's bots crawling the site and displays 'em in the online user list.

It should also mark a topic as read once you've read it, instead of when you mark all posts as read. However, after an hour of not browsing the forums, it will "forget" which ones you have and haven't read and just mark 'em all as read up to that last time you viewed it.

Double posts are no longer allowed (except for mods and admins). It will not let you do it.

Link to comment
Share on other sites

EXACTLY! lol there have been so many times that I needed to use strikethroughs, but they weren't available (I ended up having to use the quote thing to show what "This post originally" wrote :o)... Which reminds me, I need to start using lists in the Speed sticky :P

Link to comment
Share on other sites

  • 1 month later...

Added the size tag (uses pixels) and fixed some of the other bbcodes.

list bbcodes are sane now. They work like the HTML equivalents.

[noparse][ul][li]list item 1[/li]

[li]list item 2[/li]

[li]list item 3[/li]

[/ul]

[/noparse]

will yield

[ul][li]list item 1[/li]

[li]list item 2[/li]

[li]list item 3[/li]

[/ul]

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Hmm...

[ul][li]This[/li][li]should[/li][li]be[/li][li]unbroken[/li][/ul]

(by the extra BR's)

I think the parser might be doing a simple nl2br($input) and automatically adding "BR"'s whereever a line break is in the input. By removing the line breaks... you remove the BR's in the LIs =)

Link to comment
Share on other sites

Just don't put line breaks when you're writing a list, like I did above.

If you really want to overcomplicate things, you might want to maybe do some preprocessing on "ul" items to remove line breaks before it hits the nl2br() function...

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
  • 5 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...