Not logged in. · Lost password · Register
Forum: General Help and Support Plugins Plugin Wishlist RSS
Extending bbcode plugin for paragraph alignments [Solved]
Avatar
Ashtagon #1
Member since Jan 2010 · 128 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
Subject: Extending bbcode plugin for paragraph alignments [Solved]
http://www.dokuwiki.org/plugin:alignment
http://www.dokuwiki.org/plugin:wrap
http://www.dokuwiki.org/plugin:bbcode

Both of the above plugins (alignment and wrap) allow for aligned paragraphs. However, in one case, the code is not really human-readable -- it's non-intuitive to someone unfamiliar with the plugin. In the second case, the amount of text is quite long for something that I want to be able to use very often.

Ideally, I would extend the bbcode plugin with [r]...[/r] (for right-aligned paragraphs) and [c]...[/c] (for centre-aligned paragraph).

Unfortunately, I'm not enough of a programmer to be able to do this. Can anyone fix this for me?

(Yes, I am aware that the [c] tag has been provisionally chosen for small caps text formatting with the bbcode plugin. I plan on redesignating that to [sc] for my installation).
This post was edited 3 times, last on 2012-04-05, 07:58 by Ashtagon.
Avatar
ryan.chappelle #2
User title: Chilean DW Fan
Member since May 2008 · 210 posts · Location: Temuco, Chile
Group memberships: Local Moderators, Members, Newsletter Team
Show profile · Link to this post
Did you try the divalign2 plugin? It uses a very simple and mnemonic syntax. As for extending bbcode, since I am maintaining it I plan to enable paragraph alignment with the same tags used in most forums: [left], [center] and [right]. As for how: via using divalign2 when it is available (no sense in reinventing the wheel); as for when: when I have the time.

Feel free to contribute code changes.
Chilean DW Fan!
my plugins for DokuWiki
GULIX, my area's LUG
Surviving earthquakes since Feb 2010!
Avatar
Ashtagon #3
Member since Jan 2010 · 128 posts · Location: London, UK
Group memberships: Members
Show profile · Link to this post
Essentially, I took the divalign plugin, and modified the entry and exit tags to bbcode style syntax. Everything seems to work.

I prefer bbcode style syntax to full words ([l] instead of [left]) because it leaves the code more human-readable, as the markup doesn't get in the way of the content so much.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20120620-dev, © 2003-2011 by Yves Goergen
Current time: 2014-04-17, 11:53:06 (UTC +02:00)