User Tools

Site Tools


doc:plugins:bbcode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:plugins:bbcode [2021/03/20 21:55] arviddoc:plugins:bbcode [2024/01/06 12:40] (current) – reworked "links" section, added "target" attribute arvid
Line 9: Line 9:
   * [quote]text quotation[/quote]   * [quote]text quotation[/quote]
   * [code]code[/code]   * [code]code[/code]
-  * <code>[list] +  * [list]\\ [*]bulleted list element 1\\ [*]bulleted list element 2\\ [/list] 
-[*]bulleted list element 1 +  * [list=#]\\ [*]Numbered list element 1\\ [*]Numbered list element 2\\ [/list] 
-[*]bulleted list element 2 +  * [html][/htmlliteral htmlAll code between these is not changed.\\ //Alternative: Enable [[doc:plugins:bbcode:tips|inline HTML]].// 
-[/list]</code> + 
-  * <code>[list=#] +==== Text formatting ====
-[*]Numbered list element 1 +
-[*]Numbered list element 2 +
-[/list]</code> +
-  * [more beaks up long post on the main page with the [Read More…that can be click on to see the rest of the post+
-==== Text format ====+
   * [b]bold[/b]   * [b]bold[/b]
   * [i]italic[/i]   * [i]italic[/i]
Line 26: Line 21:
   * [font=FONT]font[/font]\\ //FONT is a valid css font-family value ("sans-serif", "Times" etc.)//   * [font=FONT]font[/font]\\ //FONT is a valid css font-family value ("sans-serif", "Times" etc.)//
   * [color=COLOR]color[/color]\\ //COLOR is a valid css color value (e.g. #cb0600)//   * [color=COLOR]color[/color]\\ //COLOR is a valid css color value (e.g. #cb0600)//
-    * [img=IMAGEPATH (popup=false) (scale=NN%) (width=N) (height=N) (float=left|right) (loading=lazy|eager)] (items in parenthesis are optional). 
-       * if **IMAGEPATH** begins with images/ it will be automatically translated into the appropriate URL for fp-content/images/ 
-       * **float** float the images to the left or to the right 
-       * **scale** creates a thumbnail NN% smaller than the original.  
-           * The generated thumbnail is a real, static thumbnail if //thumb// plugin is enabled; otherwise the image will look small in browser but the browser will be actually downloading the original file  
-           * scale implies popup=true, i.e. FlatPress will act as if you excplictly set popup=true; 
-       * **popup** you can both force a popup to off or on explicitly setting popup=false or popup=true 
-       * **width** and **height** are self explanatory (you can use both of them or only one). If you set only one, the other will be set accordingly (it won't work on remote images, and needs GD2 php extension to be installed; usually it is) 
-       * **loading** images will be loaded not before the user scrolls near them ("lazy" - better performance!) or immediatly on loading the page. If not set explicitly, "lazy" is used.  
-       * Please notice that popup is a **lightbox** (actually namely it is [[http://www.digitalia.be/software/slimbox|Slimbox]]), if the corresponding plugin //lightbox// is enabled;  
-       * Example: [img=images/picture.jpg scale=5%]  
-    * [video=http://youtube.com/MYVIDEO] allows to insert a YouTube, Vimeo or Facebook video in your entry   
-    * %%[url]http://www.page.com[/url]%% or %%[url=http://www.mypage.com]description[/url]%%   
-        url can begin with images/ or attachs/ (images/ will be translated into IMAGES_DIR, attachs/ into ATTACHS_DIR, typically fp-content/attachs/) 
-    * [mail]user@example.org[/mail] or [mail=user@example.org]link text[/url] adds a bot-protected mail link 
-    * LEGACY, use [[doc:plugins:bbcode:tips|INLINE HTML]] instead <del>''[html][/html]'' literal html. All code between these is not changed.</del> BEWARE! It could break validation or page rendering! 
  
 +==== Links ====
 +  * Simple: %%[url]DESTINATION[/url]%%
 +  * Advanced: %%[url=DESTINATION (rel=relationship) (target=target)]Link text[/url]%% \\ //(items in parenthesis are optional)//.
 +    * **DESTINATION** may be:
 +      * an external URL: %%"https://www.example.org"%%
 +      * an uploaded file: %%"attachs/somefile.zip"%%
 +      * an uploaded file: %%"images/someimage.jpg"%%
 +    * **rel** specifies the relationship between the current and the linked document (see [[https://www.w3schools.com/TAGS/att_a_rel.asp|doc on W3Schools]])
 +    * **target** (available as of FlatPress 1.3) specifies where to open the linked document (see [[https://www.w3schools.com/TAGS/att_a_target.asp|doc on W3Schools]])
 +  * Simple email link: %%[mail]user@example.org[/mail]%%
 +  * Advanced email link: [mail=user@example.org]link text[/url]
 +
 +==== Images ====
 +  * [img=IMAGEPATH (alt=alternate text) (title=title text) (popup=false) (scale=NN%) (width=N) (height=N) (float=left|right) (loading=lazy|eager)] \\ //(items in parenthesis are optional)//.
 +     * if **IMAGEPATH** begins with images/ it will be automatically translated into the appropriate URL for fp-content/images/
 +     * **alt** sets the alternate text
 +     * **title** title shown on mouse-over
 +     * **popup** If set to true and the //LightBox2// plug-in is enabled (it is by default) display of the image will driven by the plug-in. (Actually the plug-in is the LightBox work-alike [[http://www.digitalia.be/software/slimbox|Slimbox]]).
 +     * **scale** creates a thumbnail NN% smaller than the original. Example: [img=images/picture.jpg scale=5%]
 +         * If the //thumb// plugin is enabled (it is by default) and the server has the GD2 php extension installed (usually it is) the generated thumbnail is a real, static thumbnail. Otherwise the image will look small in browser but the browser will be actually downloading the original file.
 +         * Setting a scale value automatically invokes popup=true and clicking on the thumbnail will display the image in a "LightBox".
 +         * Scale doesn't work on remote images.
 +     * **width** and **height** set the width or height on the image in pixels. You can use both of them or only one. If you set only one the re-sized image will retain its aspect ratio.
 +       * if the //thumb// plug-in is enabled and the GD2 php extension is installed on the server (usually it is) it will generate a thumbnail image file and popup=true will be invoked, unless specifically set to false.
 +       * Static thumbnail creation does not work on remote images.
 +     * **float** float the images to the left or to the right
 +     * **loading** images will be loaded not before the user scrolls near them ("lazy" - better performance!) or immediately on loading the page. If not set explicitly, "lazy" is used.
 +
 +==== Videos ====
 +  * [video=VIDEOPATH (width=N) (height=N) (float=left|right)] \\ //(items in parenthesis are optional)//.
 +    * **VIDEOPATH** may be:
 +      * an uploaded file: %%"attachs/video.mp4"%%
 +      * a remote file: %%"https//example.org/video.mp4"%%
 +      * a YouTube link: %%"http://youtube.com/THEVIDEO"%%
 +      * a Facebook Video link: %%"https://www.facebook.com/watch/?v=THEVIDEO"%%
 +      * a Vimeo link: %%"https://vimeo.com/THEVIDEO"%%
 +    * **width** and **height** set the width or height on the video in pixels. You can use both of them or only one. If you set only one the re-sized video will retain its aspect ratio.
 +    * **float** float the images to the left or to the right
  
 +===== BBCode from other standard plugins =====
 +  * [more] ([[doc:plugins:standard#readmore|Read More plugin]]): breaks up long post on the main page with the [Read More…] link that can be clicked on to see the rest of the post
 +  * [entryurl=ENTRY-ID]link text[/entryurl] and [iurl=PAGE]link text[/iurl] ([[res:plugins:internalurls|Internal URLs plugin]]): These elements create links to static pages or entries.
doc/plugins/bbcode.1616273752.txt.gz · Last modified: 2021/03/20 21:55 by arvid

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki