« Project home page
my little forum
Log in
Register
Search:
Back to the entry by Micha
Post reply
Reply to the message by
Micha
Name:
E-mail:
(optional, won't be displayed directly)
Leave this field empty:
Homepage:
(optional)
Leave this field empty:
Location:
(optional)
Remember me (cookie)
Category:
General
Project organisation
Technics
Design/Themes
Features
Development
Todo
Bugs
German / Deutsch
Spanish / Español
French / Français
Accessibility/UX
Subject:
Formatting help
skip to input
format text bold
[b]bold text[/b]
format text italic
[i]italic text[/i]
insert hyperlink
[link=http://example.com/]link text[/link] / [link]http://example.com/[/link]
set text color
[color=#rgb]colored text[/color]
font size
[size=small]small text[/size]
[size=large]large text[/size]
insert list
[list][*]list item[/list]
insert image
[img]http://example.com/image.jpg[/img]
left: [img=left]http://example.com/image.jpg[/img]
right: [img=right]http://example.com/image.jpg[/img]
thumbnail: [img=thumbnail]http://example.com/image.jpg[/img]
thumbnail left: [img=thumbnail-left]http://example.com/image.jpg[/img]
thumbnail right: [img=thumbnail-right]http://example.com/image.jpg[/img]
upload image
upload image ...
insert TeX code
[tex]TeX code[/tex]
insert code
[inlinecode]code[/inlinecode]
[code]code[/code]
[code=css]code[/code]
[code=html]code[/code]
[code=javascript]code[/code]
[code=perl]code[/code]
[code=php]code[/code]
[code=sql]code[/code]
[code=xml]code[/code]
:-)
;-)
:-P
:-D
:-|
:-(
:yes:
:no:
:ok:
:lol:
:lol2:
:lol3:
:cool:
:surprised:
:angry:
:crying:
:waving:
:confused:
:lookaround:
:clap:
:love:
:tick:
Message:
> Hi, > > > [b]1) If the forum is in LTR direction and one wants to insert RTL text, we need:[/b] > > > > [code=html]<p dir="rtl"> ... </p>[/code] > > > > [b]2) If the forum is in RTL direction and one wants to insert LTR text, we need:[/b] > > > > [code=html]<p dir="ltr"> ... </p>[/code] > > > > This way we cover all scenarios. > > I changed the [link=https://github.com/ilosuna/mylittleforum/blob/master/includes/functions.inc.php#L901]functions.inc.php[/link] and just added > > [code=php] $bbcode->addCode ('rtl', 'simple_replace', null, array ('start_tag' => '<div dir="rtl">', 'end_tag' => '</div>'), 'rtl', array ('block','rtl'), array ()); > $bbcode->setCodeFlag ('rtl', 'paragraphs', true); > $bbcode->setCodeFlag ('rtl', 'paragraph_type', BBCODE_PARAGRAPH_BLOCK_ELEMENT); > $bbcode->setCodeFlag ('rtl', 'closetag.after.newline', BBCODE_NEWLINE_IGNORE); > $bbcode->setCodeFlag ('rtl', 'opentag.before.newline', BBCODE_NEWLINE_DROP); > $bbcode->setCodeFlag ('rtl', 'closetag.before.newline', BBCODE_NEWLINE_DROP);[/code] > > Now, it is possible to use the new BB code [pre][rtl]Some Text[/rtl][/pre] as a block element (<div>-Element). You can try this modification in [link=https://software.applied-geodesy.org/forum/?mode=posting]my forum[/link] - please use the preview option only ;-) > > Does it works as expected? > > /Micha
E-mail notification on reply of this posting
OK - Submit
Preview