ℹ️
Welcome to the archive of the old FlatPress support forum. Browse more than a decade of FlatPress wisdom! Login is disabled.

The current FlatPress support forum is available here: forum.flatpress.org
[BBCode] more text formatting options
  • Hi,

    year is almost gone, a new one is coming. I was wondering about text formatting using BBCode, standard feature of Flatpress. According to the official list of the BBCode Plugin, some important tags are missing, such as align tags.

    edit:
    Having a look to the plugin, we can find this:
    /**
     * Function to align elements.
     *
     * @param string $action
     * @param array $attributes
     * @param string $content
     * @param mixed $params Not used
     * @param mixed $node_object Not used
     * @return string
     */
    function do_bbcode_align($action, $attr, $content, $params, $node_object) {
    	return '<div style="text-align:'. $attr['default'] .'">'. $content .'</div>';
    }
    So, we can align text using [align:align]aligned text[/align]. Now, my question must be revisited: should we include short align BBCode tags, such as [right][/right]?

    // end of edit.

    Will new features of Flatpress include them? Any hint about? :)
    If answer is no, I think I might spend a few hours on the plugin to add missing tags, if nobody else already did, of course! :)
    I wasn't able to find anything on the forum about it. :(

    Thanks in advance, and Happy New Year to all accounts :D
  • Personally speaking I've never needed to specially align anything other than to centre it, which I do using the regular HTML center tag, from time to time. Aligning text left/right/justified in particular places on my blog is something which I control using the style sheet except when I want to wrap text around an image (left or right) in which case I use the extended image plugin (available from the wiki).

    http://wiki.flatpress.org/res:plugins:nowhereman:extendedimg

  • A good point. May I suggest to improve wiki documentation page adding the [align] tag to the list (missing, if my sight's good yet) and a link to this plugin? I bet it can be useful for new users to improve FlatPress experience.
  • I've added this - it does require you to add some CSS to your theme's style sheet but this is all explained in the source code link shown in my earlier post.
  • That was graceful! FlatPress is the way I'm sure of that.
    Have an happy new year! :D
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion