Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2505)
BBCode with style
ABOUT...BBCode with style, 1.5.2
© 2010-2020 by davidhs
© Italian language 2011 by Sages
© Portuguese for Brazil and Portugal language 2012 by Joomlamz
© Russian language 2010-2011 by Bugo
(https://i.creativecommons.org/l/by/3.0/88x31.png) (https://creativecommons.org/licenses/by/3.0/)
This work is licensed under a Creative Commons Attribution 3.0 Unported License (https://creativecommons.org/licenses/by/3.0/).
DESCRIPTIONAdds the possibility to use CSS styles, CSS classes and attributes like HTML in BBC tags.
New optional attributes of style:
- style, whose value, quoted, are style rules inline.
- class, whose value, quoted, are class names of style.
These attributes are added to the following BBC tags:
- Horizontal rule (hr).
- Image (img).
- List (li, list).
- Table (table, td, tr).
[tag class="class_of_style" style="rules"]text[/tag]
New optional attributes in BBC tags:
- img:
- rotateangle, rotatebgcolor. Rotate an image with a given angle in degree and using a background color for the uncovered zone after the rotation. The background color is an hexadecimal with 3 or 6 digits (#rgb or #rrggbb), a RGB color (r,g,b) or a color name of these:
aqua | = | #00ffff | = | #0ff | = | 0,255,255 |
black | = | #000000 | = | #000 | = | 0,0,0 |
blue | = | #0000ff | = | #00f | = | 0,0,255 |
fuchsia | = | #ff00ff | = | #f0f | = | 255,0,255 |
gray | = | #808080 | | | = | 128,128,128 |
green | = | #008000 | | | = | 0,128,0 |
lime | = | #00ff00 | = | #0f0 | = | 0,255,0 |
maroon | = | #800000 | | | = | 128,0,0 |
navy | = | #000080 | | | = | 0,0,128 |
olive | = | #808000 | | | = | 128,128,0 |
orange | = | #ffa500 | | | = | 255,165,0 |
purple | = | #800080 | | | = | 128,0,128 |
red | = | #ff0000 | = | #f00 | = | 255,0,0 |
silver | = | #c0c0c0 | | | = | 192,192,192 |
teal | = | #008080 | | | = | 0,128,128 |
white | = | #ffffff | = | #fff | = | 255,255,255 |
yellow | = | #ffff00 | = | #ff0 | = | 255,255,0 |
If the color does not exist in the image and can not be added, is used the closest color. Default value is 0 (rotateangle) and black (rotatebgcolor). Values without quotes. - flip. Flip an image in a direction. Permitted values are: horizontal, vertical. Value without quotes.
- table: border. Width (in pixels) of the border around a table. Value without quotes.
- td: colspan, rowspan. Span columns and rows in a table cell. Value without quotes.
[img rotateangle=degree rotatebgcolor=color flip=direction]image[/img]
[table border=number]table content[/table]
[td colspan=number rowspan=number]table cell[/td]
New BBC tags:
- Paragraph style (div): Adds class or style inline to one or more paragraph.
- Character style (span): Adds class or style inline to text within a paragraph.
[div class="class_of_style" style="rules"]paragraph with style[/div]
[span class="class_of_style" style="rules"]text with style[/span]
For these new BBC tags are added buttons in the editing box.
(https://lh3.googleusercontent.com/YY5fJ7Kf1gkD6YOBxlFP0yMaUh8NIGXI5_w79FQBl8PDMpUfg2Uk417Oe6vNctE-5qiuKLc2aMeY1WhKDBZmNSnwMzR2M39a92OrZrFboVCs7P8AiG3vpUm0OLmC5Yd7YHM0ib80OXVHMabOczqVoLO20Iq9r-ZeNrh6qK8aGK1yJBdFGvoDQt8rGavVQK1z6tFKz8Az5-ev9Hbdy6G-sFvGLf7fYQz6u5577KBOKui7PkAlalff_b4l5AThbLSs6LrKDHEiI15Cgxp_JX5juJcN4VMwIO8AWbHePLHxj2Md7dsZ7WS4l4N_q19PgbQW0GFJoju7U5m67z60kyYmvG2yu_Oz_kXvJgWrFOZI6s1PjwPmrolDCz6b9RZyU_R2FRmx9YpQloqkv5cqH11ucuTIBpIIiqsw0dnIQ1RlmRCbTcemkMFqWvuh74m68xB8d-_8aizECsIQXhwbwL_ie2_zWIJssQNoPLT9KK7Wz_w5VwVZTTelL-N-SkVLqU3ArGsNNvWglghQXNUxiBxs07_-VZ8OFU7XF5Zc4bLOqB98bpD-VukdhatyvEmdl4K-6ySlu4NJIZ9BSFrelRo2ZhJhDSEbwr0SxRYsJQB33tarzPxkf5GEqi6Jh8IRq_8D465Yo4T3p06ZEI2YTZ4rC4msPAo6Ov_NPSVaVLeuoA22G1M-n7NC8Q=w629-h72-no)
EXAMPLE(https://lh3.googleusercontent.com/5yr5YFkveAzlf4leXCDfV98ZaRDYne9utGyLN6lYeWwKMt2yZgxDDp1KNHoX1A7Q1jKM3HvpeO9GKubOxmqYFRhCEzpjx0Bdl4hG6uYBzlfTK-0G6UO-5NzNS7kinHqocWJ5V_6K4VZ-2wDh0gjsJ_EvIATzqwg5YwzCSHFmDkk5SNDvfG9ykOkx7qEaZN_o7e0pgJ2-1L_HzEF035AsnAmiBrAm9M9GT85ARQXJpg_1KqNzHpO-gN0Y2hCc-xt6dX46y6Xxanssd3LzuG4hqHB6gJVFVD8E3pvNaZx11T6lWNCX2QYTKR9nDmFxOx57OOLF1fY993S-20tCKhmtUkHisTnKtuEZ5ZgvvLofMHYQMKFmC2zDyAKLRVQljs0WhtXcvH7grfTEyarywOgu4Kz7lXbeDILQgRSSMJBFvw5C1V2tFWuyNsqK5Qd6Z8Wvl1G03XDusKejlkx0yDA-63rnRFsH635sdNO_N1_PlltLcbYpRMyzMUPXDIM6VfUlMbJhtRTijcnbR1_ZOhPnHPNFL3cMVqAQIHeqHA47WN-WShmOPTXFtgISvG0KqWGoINXO6fYowt-xEKi5PiYL9FMXp9uSl9hdbAUJBshUPu_4YsOhWR6u7DPcpCvSXjrxgooSGSTO5vcme7TWEl_GOfiEq1DJ_KlrL84xT6-Di9HyZ9merZl92Q=w835-h660-no)
SMF COMPATIBILITY
- SMF 1.1 to 1.1.21.
- SMF 2.0 to 2.0.17.
Can be installed before or after "nCode Image Resizer" MOD 2.0 (for SMF 2.0-2.0.15).
PHP configuration option "allow_url_fopen" must be activated in php.ini or .htaccess file.
LANGUAGES
- english, english_british.
- italian.
- portuguese_brazilian, brazilian, portuguese_pt.
- russian.
- spanish, spanish_es, spanish_latin.
DOWNLOADLink to MOD (https://custom.simplemachines.org/mods/index.php?mod=2505)
MANUAL INSTALLATIONSee https://wiki.simplemachines.org/smf/Manual_installation_of_mods
COLLABORATE WITH THIS MODThis work is licensed under a Creative Commons Attribution 3.0 Unported License (https://creativecommons.org/licenses/by/3.0/).
You are free to share and adapt this MOD. Also you can collaborate in different ways:
- Translate the mod into other languages, adding the translation in https://www.simplemachines.org/community/index.php?topic=379283.0.
- Write comments, detect errors or suggest improvements in support topics
in English https://www.simplemachines.org/community/index.php?topic=379283.0 and
in Spanish https://www.simplemachines.org/community/index.php?topic=372850.0. - Help to expand my collection of coins, banknotes and stamps, sending me something from your country via postal mail (ask me for address by personal message (https://www.simplemachines.org/community/index.php?action=pm;sa=send;u=242014)).
- Make a donation via PayPal (https://www.paypal.me/davidhs0/1).
CHANGE LOGLegend: ! Fixed + Added - Removed * Changed @ Note
1.5.2 2020-03-07
------------------
@ Can be installed before or after "nCode Image Resizer" MOD 2.0 (for SMF 2.0-2.0.15).
+ SMF compatibility: 2.0.11-2.0.17.
- SMF 2.0.x: Languages: brazilian, brazilian-utf8, spanish, spanish-utf8 (these are not used).
1.5.1 2015-08-26
------------------
! When img tag is disabled only URL is displayed.
1.5 2015-05-23
------------------
@ PHP configuration option "allow_url_fopen" must be activated in php.ini or .htaccess file.
* If rotate or flip of image fail, the original image is shown.
+ SMF compatibility: 1.1.21 and 2.0.10.
1.4.10 2014-10-07
------------------
+ SMF compatibility: 1.1.20 and 2.0.9.
1.4.9 2014-06-23
------------------
! Use HTML entities in ISO-8859-1 languages.
+ SMF compatibility: 2.0.8.
1.4.8 2014-01-25
------------------
+ SMF compatibility: 2.0.7.
1.4.7 2013-10-25
------------------
@ Can be installed before or after "nCode Image Resizer" MOD 1.3-1.4.
+ SMF compatibility: 1.1.19 and 2.0.6.
1.4.6 2013-08-18
------------------
@ This work is licensed under a Creative Commons Attribution 3.0 Unported License https://creativecommons.org/licenses/by/3.0/
+ SMF compatibility: 2.0.5.
1.4.5 2013-04-10
------------------
+ SMF compatibility: 1.1.18.
+ SMF compatibility: 2.0.4.
- SMF compatibility: Support to obsolete series 1.0.x and Beta and RC versions.
1.4.4 2012-12-22
------------------
+ SMF compatibility: 1.0.23.
+ SMF compatibility: 1.1.17.
+ SMF compatibility: 2.0.3.
+ Languages: portuguese_brazilian, portuguese_brazilian-utf8, brazilian, brazilian-utf8, portuguese_pt, portuguese_pt-utf8, thanks to Joomlamz.
1.4.3 2011-12-25
------------------
+ SMF compatibility: 1.0.22.
+ SMF compatibility: 1.1.16.
+ SMF compatibility: 2.0.2.
1.4.2 2011-09-21
------------------
+ SMF compatibility: 1.1.15.
+ SMF compatibility: 2.0.1.
1.4.1 2011-06-23
------------------
+ SMF compatibility: 1.1.14.
+ SMF compatibility: 2.0.
* Uses integration hooks in SMF 2.0 RC4 and next.
1.4 2011-04-09
------------------
+ Optional attribute class in BBC tags: hr, img, li, list, table, td, tr.
1.3.2 2011-04-03
------------------
+ Languages: italian, italian-utf8, thanks to Sages.
1.3.1 2011-03-04
------------------
+ SMF compatibility: 1.0 RC1 to RC2 and 1.0 to 1.0.21.
+ SMF compatibility: 1.1 Beta 3 Public, RC1 to RC3 and 1.1 to 1.1.13.
1.3 2011-02-17
------------------
+ Optional attribute class in BBC tags: div, span.
+ Optional attribute in table BBC tag: border.
+ SMF compatibility: 2.0 Beta 3.1 Public and RC5.
* Join in one package the normal version and the version that is installed after "nCode Image Resizer" MOD 1.3-1.3.1.
1.2.2 2010-11-08
------------------
! Regular expressions of mistake fixes in SMF 2.0 RC2 and RC3.
+ SMF compatibility: 2.0 Beta 4, RC1 to RC1.2 and RC4.
+ Languages: english_british, english_british-utf8 (copy of english).
+ Languages: spanish, spanish-utf8 (copy of spanish_es).
@ There is a version to be installed after "nCode Image Resizer" MOD 1.3-1.3.1.
1.2.1 2010-06-17
------------------
! Source code of img BBC tag.
@ There is a version to be installed after "nCode Image Resizer" MOD 1.3-1.3.1.
1.2 2010-06-14
------------------
+ Optional attributes in img BBC tag: rotateangle, rotatebgcolor, flip.
1.1 2010-05-11
------------------
+ Optional attributes in td BBC tag: colspan, rowspan.
1.0.1 2010-05-09
------------------
+ Languages: russian, russian-utf8, thanks to Bugo.
1.0 2010-04-29
------------------
+ Optional attribute style in BBC tags: hr, img, li, list, table, td, tr.
+ BBC tags (and buttons in the editing box) with style attribute: div, span.
+ SMF compatibility: 2.0 RC2 to RC3.
+ Languages: english, english-utf8, spanish_es, spanish_es-utf8, spanish_latin, spanish_latin-utf8.
Ambitious! I don't know when I might get around to installing this, but there are times when this would have been useful. Very nice mod, I hope it works smoothly and bugfree.
very nice mod
congratulations
Nicely done, great to see you dealt with the other stuff too.
One question: were any tests made for XSS attacks? I can't remember if SMF attempts to sanitise bbcodes like that for XSS.
Russian translation
Quote from: Arantor on May 02, 2010, 05:18:24 PM
One question: were any tests made for XSS attacks? I can't remember if SMF attempts to sanitise bbcodes like that for XSS.
I do not ???
Quote from: Bugo on May 02, 2010, 11:34:29 PM
Russian translation
Thanks!
Fortunately, SMF does protect; I just tested for you.
XSS is where HTML is compromised by user input not being sanitised properly, such as trying to embed Javascript into the "" options provided.
Quote from: Arantor on May 09, 2010, 05:15:16 PM
Fortunately, SMF does protect; I just tested for you.
XSS is where HTML is compromised by user input not being sanitised properly, such as trying to embed Javascript into the "" options provided.
Thanks.
New version:
1.0.1 2010-05-09
------------------
+ Languages: Add russian, russian-utf8, thanks to Bugo.
Have you thought of putting html attributes also? the rowspan and colspan would be very helpful also.
Thanks for the mod!
A great idea, thanks. (There is no colspan / rowspan in CSS).
Soon I will add it.
I know, I know... it was just an idea to put colspan and rowspan... it's a pain to do that with tables... to get it to where you can see the effect of colspan.
Thank you!
New version:
Legend: ! Fixed + Added - Removed * Changed @ Note
1.1 2010-05-11
------------------
+ New optional attributes in td BBCode tag: colspan, rowspan.
Great!!!! thank you for doing that so fast!! I'm going to test drive it right now!
Now I don't have to do things like this
[table]
[tr][td]
[table]
[tr][td][xxxxxxxxxxx][/td][/tr]
[/table]
[/td]
[td]
[table]
[tr][td][xxxxxxxxxxx][/td][/tr]
[tr][td][xxxxxxxxxxx][/td][/tr]
[tr][td][xxxxxxxxxxx][/td][/tr]
[/table]
[/td][/tr]
[/table]
New version:
Legend: ! Fixed + Added - Removed * Changed @ Note
1.2 2010-06-14
------------------
+ New optional attributes in img BBCode tag: rotateangle, rotatebgcolor, flip.
New version:
Legend: ! Fixed + Added - Removed * Changed @ Note
1.2.1 2010-06-17
------------------
! Source code of img BBCode tag.
@ There is a version to be installed after MOD nCode Image Resizer 1.3-1.3.1.
The rotate feature doesn't seem to work for me. I used your example and tested them all on my own forum and everything works except for the rotate image feature.
The rotate/flip features are made with PHP (with CSS/JavaScript not is possible). If your forum is in a free server (for example) may not allow work with images in PHP.
This page made the rotate/flip (not use any function of SMF):
YOUR_FORUM/Source/Subs-BBCodeWithStyle-image.php
You can give the code to the server owner and ask that does not work.
This page have parameters:
YOUR_FORUM/Source/Subs-BBCodeWithStyle-image.php?image=url&rotateangle=nr&rotatebgcolor=color&flip=dir
For example:
YOUR_FORUM/Sources/Subs-BBCodeWithStyle-Image.php?image=http%3A%2F%2Fimg338.imageshack.us%2Fimg338%2F3980%2Funextrannoentrenosotros.jpg&rotateangle=45&flip=vertical
I'm not quite sure what you're getting at there. I'm sorry, I'm a nub, but I do not use a free hosting service or anything and I guess I will look into those other strings but could you post an example that works on yours so I can test it on mine. Maybe I'm just not using the bbcode correctly.
Great modification, thanks a lot!
Quote from: tRu3_sKiTz0 on July 12, 2010, 08:14:57 AMI'm not quite sure what you're getting at there. I'm sorry, I'm a nub, but I do not use a free hosting service or anything and I guess I will look into those other strings but could you post an example that works on yours so I can test it on mine. Maybe I'm just not using the bbcode correctly.
For example, this show image rotate 15º with background red and flip vertical:
[img rotateangle=15 rotatebgcolor=red flip=vertical]http://img338.imageshack.us/img338/3980/unextrannoentrenosotros.jpg[/img]
Okay I tried it and it doesn't work so something went wrong somewhere. But it is the only feature that doesn't work. Not a big deal but I really would like to get this working so if there is anything you could suggest that would be awesome. Thanks.
Sorry, I do not know how I can help. :(
Perhaps that is a parameter of your server ... ?
Thanks anyway I guess.
Great addition. Needed to have possibility to add borders to tables. But i use the 1.1.11 version due to another mods. Does this also work for older versions? If not is there a possibility to have this ported to the older 1.1.11 version?
Quote from: didis on August 30, 2010, 03:48:46 PM
Great addition. Needed to have possibility to add borders to tables. But i use the 1.1.11 version due to another mods. Does this also work for older versions? If not is there a possibility to have this ported to the older 1.1.11 version?
All my MODs are tested only in versions 2.0 RC2-3.
I will adapt my MODs to earlier versions of SMF... when I have time. ;)
New version:
1.2.2 2010-11-08
------------------
! Regular expressions of mistake fixes in SMF 2.0 RC2 and RC3.
+ SMF compatibility: Adds 2.0 Beta 4, RC1 to RC1.2 and RC4.
+ Languages: Adds english_british, english_british-utf8 (copy of english).
+ Languages: Adds spanish, spanish-utf8 (copy of spanish_es).
@ There is a version to be installed after MOD nCode Image Resizer 1.3-1.3.1.
Hey, for some reason the button on it is extra weird.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg405.imageshack.us%2Fimg405%2F9733%2Fnewcanvaslo.png&hash=75c294bcf221a8a6a2cef8c5de0b79d57e65aaaf)
Excuse my doodles but how would I fix the above issue? Btw your mod is exactly what I was looking for! (You need to put table frame, box, etc in your tags orz)
This MOD affects the themes. When you install the MOD, before the Install button is the last section "Install in Other Themes" with one checkbox button for each theme. You should checked all checkbox in order to copy images in themes.
As you did not, the buttons have no image in the editing box.
You have two solutions:
1. If you can uninstall this MOD, uninstall and install it again but now check all checkbox button.
2. If you have installed others MODs maybe you can not uninstall this MOD without uninstalling others before. You do not need to uninstall anything. Steps:
2.1. Download my MOD BBCodeWithStyle_1.2.2.tar.gz.
2.2. Open or unzip file tar.gz.
2.3. Inside folder images are files div.gif and span.gif.
2.4. Copy these two files on your server in folder your_forum/Themes/your_theme/images/bbc/. Do this for all your themes.
Thank you! I can't believe I didn't see that!
Also, I've figured out how to do the table-box. But how do you get scroll bars on the side and how would you get them side by side? See attachment. Also, what's the code for an image bg for a table? If there is any?
I know you can do it in proboards. But here?
I'm sorry for the questions
All (almost) is possible with CSS ;)
Quote from: Mikirin on January 10, 2011, 06:30:13 PM
Also, I've figured out how to do the table-box. But how do you get scroll bars on the side and how would you get them side by side? See attachment.
With div style="width: xxx; height: xxx; overflow: scroll;"
For example:
[div style="border: 1px solid #000000; width: 150px; height: 100px; overflow: scroll;"]
div with scroll
div with scroll
div with scroll
div with scroll
div with scroll
div with scroll
div with scroll
div with scroll
div with scroll
div with scroll
[/div]
[table]
[tr]
[td style="border: 1px solid #000000; width: 200px"]
text in cell
text in cell
text in cell
text in cell
text in cell
text in cell
text in cell
text in cell
text in cell
[/td]
[td style="border: 1px solid #000000; width: 200px"]
[div style="border: 1px solid #ff0000; width: 150px; height: 100px; overflow: scroll;"]
div with scroll in cell
div with scroll in cell
div with scroll in cell
div with scroll in cell
div with scroll in cell
div with scroll in cell
div with scroll in cell
div with scroll in cell
[/div]
[/td]
[/tr]
[tr]
[td style="border: 1px solid #000000; width: 200px"]
[div style="border: 1px solid #ff0000; width: 150px; height: 100px; overflow: scroll;"]
text and table with scroll in cell
[table]
[tr]
[td style="border: 1px solid #0000ff;"]
cell cell cell cell cell cell
[/td]
[td style="border: 1px solid #0000ff;"]
cell cell cell cell cell cell
[/td]
[/tr]
[tr]
[td style="border: 1px solid #0000ff;"]
cell cell cell cell cell cell
[/td]
[td style="border: 1px solid #0000ff;"]
cell cell cell cell cell cell
[/td]
[/tr]
[/table]
[/div]
[/td]
[td style="border: 1px solid #000000; width: 200px"]
text text text text text text text text text text text text text text text text text text text text text text text text
[/td]
[/tr]
[/table]
Quote from: Mikirin on January 10, 2011, 06:30:13 PMAlso, what's the code for an image bg for a table?
With div style="background-image: url('xxx');"
xxx must be relative path of image to your forum.
For example:
[div style="background-image: url('Themes/default/images/board.gif');"]
text with background-image
text with background-image
text with background-image
text with background-image
text with background-image
text with background-image
text with background-image
text with background-image
text with background-image
text with background-image
text with background-image
text with background-image
text with background-image
[/div]
Thank you so much! It worked perfectly, now I'm having the members making what they want out of them >w<
http://tabookeys.net/index.php/topic,184.msg19445.html#msg19445
New version:
1.3 2011-02-17
------------------
+ New optional attribute class in BBCode tags: div, span.
+ New optional attribute in table BBCode tag: border.
+ SMF compatibility: Adds 2.0 Beta 3.1 Public and RC5.
* Join in one package the normal version and the version that is installed after MOD nCode Image Resizer 1.3-1.3.1.
Out of interest, why are you supporting versions as far back as before release candidate status? I can understand supporting 1.1.x current versions, and I can understand supporting 2.0 after release candidacy, but I can't understand the logic of supporting an unstable beta that's been superceded with not only another beta but multiple RCs, including those released for security reasons.
For nothing in particular. I download all versions of SMF and when I support my other MODs to previous versions, I did all because the code was similar.
In a few days I will support 1.x versions for this MOD.
While that's pretty commendable, supporting the earlier versions not only increases your support headache over time, but also encourages people not to upgrade to current versions, which contain security fixes.
New version:
1.3.1 2011-03-04
------------------
+ SMF compatibility: Adds 1.0 RC1 to RC2 and 1.0 to 1.0.21.
+ SMF compatibility: Adds 1.1 Beta 3 Public, RC1 to RC3 and 1.1 to 1.1.13.
Hi!
Thank you for this great mod. I' m from Italy and i' ll give you the translated files asap, in the meanwhile i' d like to ask you a question:
I' m creating topics using the "createPost" function, from the Subs-post.php file outside of SMF, and it seams that the system those not recognize the news tags.
I use them in the body of the message, which is sent, using createPost to the DB and then pulished if the forum, but the code is broken.
If, for example, in the message I write
[div class="prova"]hello[/div]
inside the topic that part of code is written, like text, instead of being parsed correctly.
Is this due to some check performed inside createPost?
Thank for your help
Bye
EDIT: If I try to edit the post and save it without changing anything, it then parses the new tags correctly. Maybe the problem is given by the bouble quote character. I' m going to use """ and see what happens :)
EDIT2: Ok problem solved. Using """ it's all ok! I add the 2 translated files.
Bye
Quote from: Sages on April 01, 2011, 12:48:34 PM
EDIT: If I try to edit the post and save it without changing anything, it then parses the new tags correctly. Maybe the problem is given by the bouble quote character. I' m going to use """ and see what happens :)
EDIT2: Ok problem solved. Using """ it's all ok!
Yes, it is.
SMF 2.0 RC5 use some functions before create post.
Instead of write
<?php
$message = "[div class="prova"]hello[/div]";
$msgOptions = array(
'body' => $message,
// More...
);
createPost($msgOptions, $topicOptions, $posterOptions);
?>
you can write these (I have not do test)
<?php
$message = "[div class=\"prova\"]hello[/div]";
$message = $smcFunc['htmlspecialchars']($message, ENT_QUOTES);
preparsecode($message); // This function is in Sources/Sub-Post.php, line 169
$msgOptions = array(
'body' => $message,
// More...
);
createPost($msgOptions, $topicOptions, $posterOptions);
?>
Quote from: Sages on April 01, 2011, 12:48:34 PMI add the 2 translated files.
Thanks for your translate into Italian :) (I am happy to have another language.)
Yes that way should work as well.
Do you think to add "class/style" attribute for table tags? It could be useful :D
Thank you
Bye
I already add style attribute in BBCode table (since first version :) )
I do not add class attribute in BBCode table because is not necessary. This
// Code not valid
[table class="foo"]...[/table]
with this CSS code
table.foo
{
table CSS rules
}
is equivalent to this
[div class="foo"][table]...[/table][/div]
with this CSS code
div.foo table
{
table CSS rules
}
Eheh lol yes, it's the trick i' am using right now, but in such a way is necessary to add a div not always necessary outside the table.
Not a big problem, ok, but the code could be simpler(also for the css part) declaring directly the class for the table :)
Bye
I will think. Perhaps. I don't know. When I have time.
Don't worry, they way you suggested is perfect and the whole work is really good!
One possible bug: I use this mod for the "spoiler" tag -> http://custom.simplemachines.org/mods/index.php?mod=2330
If I use your tags inside the [spoiler][/spoiler] it doesn't parse them correctly and it writes them like text.
Example:
I write
[spoiler][div style="color:red;"]rrrr[/div][/spoiler]
it posts, inside the [spoiler] tag
[div style="color:red;"]rrrr[/div]
Any idea?
In SMF RC5 works. What is your SMF version?
RC4, didn't upgrade yet...
Now it's necessary :D
I do not understand... in RC4 works! (at least in my empty copy for test my MODs.)
Perhaps is for other MOD installed in your forum
(in my empty copy of RC4 I have installed
1. BBCode with style 1.3
2. Content of the latest posts 1.1.1
3. Menu without limit level 1.0.3
5. Enhancements to purge inactive members 1.1.2
6. Reattribute posts with post numbers 1.2.3
7. Spoiler BBCode 1.1.3
)
These are the mods installed on my test site:
1. Spoiler BBCode 1.1.3
2. Signature Area BBCode Buttons 2.0.2
3. Member Awards 2.2.3
4. WYSIWYG Quick Reply 2.1
5. SimplePortal - Italian 2.3.3
6. BBCode with style 1.3.1
7. MCLegendII RC3 3.0
8. Order Stickied Topics 1.01
9. SimplePortal 2.3.3
10. SMF 2.0 RC4 Security Patch
None of them should create conflicts...
You wirte a post with this text
[spoiler][div style="color: red;"]ciao[/div][/spoiler]
and it works?
Quote from: Sages on April 01, 2011, 05:50:53 PM
You wirte a post with this text
[spoiler][div style="color: red;"]ciao[/div][/spoiler]
and it works?
Yes, it works. In database save this
[spoiler][div style="color: red;"]ciao[/div][/spoiler]
You can do this:
1. Install one copy of RC4 without MODs
2. Install my MOD and test.
3. Install Spoler BBCode and test tag spoiler + div with class
4. Install other of your MODs and test tag spoiler + div with class
5. Install other of your MODs and test tag spoiler + div with class
6. ...
So you know if the problem is one MOD.
Perhaps "SMF 2.0 RC4 Security Patch"? I do not know...
In my DB too the message is saved as
[spoiler][div style="color: red;"]ciao[/div][/spoiler]
Mmmm... I' ll try what you suggested, thank you :)
New version:
1.3.2 2011-04-03
------------------
+ Languages: Adds italian, italian-utf8, thanks to Sages.
Ok problem solved. I don't know the reason, but there msut have been some sort of error during the installation of your mod. After testing with a fresh SMF installation and adding the mods individually, there were no problems at all. I then tried to uninstall/reinstall your mod and there I found that the "Subs.php" was impossibile to be cleaned because it wasn't able to find the lines of code it was looking for!
After that I installed the mod again and now works well :D
Bye and thank you
Quote from: Sages on April 04, 2011, 09:35:37 AMI don't know the reason, but there msut have been some sort of error during the installation of your mod. After testing with a fresh SMF installation and adding the mods individually, there were no problems at all. I then tried to uninstall/reinstall your mod and there I found that the "Subs.php" was impossibile to be cleaned because it wasn't able to find the lines of code it was looking for!
This is normal, have not errors.
If you install one mod (like mine) and then install another that modifies an area that same file, when you uninstall the first mod, an error occur.
You must uninstall the mods in the reverse order. ie
1. install mod1
2. install mod2
3. install mod3
4. uninstall mod3
5. uninstall mod2
6. uninstall mod1
New version:
1.4 2011-04-09
------------------
+ New optional attribute class in BBCode tags: hr, img, li, list, table, td, tr.
Is it possible to change the colour behind text with this? Like a "<font bgcolor="#rrggbb">" type of thing..?
Quote from: FireDitto on June 07, 2011, 04:56:20 AMIs it possible to change the colour behind text with this? Like a "<font bgcolor="#rrggbb">" type of thing..?
Yes, of course :) With CSS. For example:
[span style="background-color: #rrggbb;"]text[/span]
Is there any way to do a div with tabs?
Like this? Where you click the tab and it goes?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FuXPky.png&hash=efb2b8917d119f20e11df08a4969e29a56212511)
Quote from: Mikirin on June 10, 2011, 10:51:59 PM
Is there any way to do a div with tabs?
Like this? Where you click the tab and it goes?
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FuXPky.png&hash=efb2b8917d119f20e11df08a4969e29a56212511)
No, only with div+style or class it is not possible :(.
You need events, for example using html BBCode, something like this (I do not know if this work):
[html]
<div class="tab1" onclick="javascript: document.content1.visibility = visible; document.content2.visibility = hidden;">Tab1</div>
<div class="tab2" onclick="javascript: document.content2.visibility = visible; document.content1.visibility = hidden;">Tab2</div>
<div class="content1" id="content1">text1</div>
<div class="content2" id="content2">text2</div>
[/html]
Quote from: davidhs on June 07, 2011, 07:56:29 AM
Quote from: FireDitto on June 07, 2011, 04:56:20 AMIs it possible to change the colour behind text with this? Like a "<font bgcolor="#rrggbb">" type of thing..?
Yes, of course :) With CSS. For example:
[span style="background-color: #rrggbb;"]text[/span]
WONDERFUL <3 <3 <3 :D :D :D
I can't find an html bbcode mod and it does not work =<
I hope someone might make a mod for it some day.
html bbc will work on the site, but ONLY if the option to use it is checked, and ONLY if you are the administrator of the site; regular members cannot use it.
New version:
1.4.1 2011-06-23
------------------
+ SMF compatibility: Adds 1.1.14.
+ SMF compatibility: Adds 2.0.
* Uses integration hooks in SMF 2.0 RC4 and next.
New version:
1.4.2 2011-09-21
------------------
+ SMF compatibility: Adds 1.1.15.
+ SMF compatibility: Adds 2.0.1.
Cheers! Great mod.
New version:
1.4.3 2011-12-25
------------------
+ SMF compatibility: Adds 1.0.22.
+ SMF compatibility: Adds 1.1.16.
+ SMF compatibility: Adds 2.0.2.
Good work
when Update dont forget
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
// BEGIN MOD BBCodeWithStyle
$txt['style_paragraph'] = 'Estilo de parágrafo';
$txt['style_character'] = 'Estilo de caracteres';
// END MOD BBCodeWithStyle
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
// BEGIN MOD BBCodeWithStyle
$txt['style_paragraph'] = 'Estilo de parágrafo';
$txt['style_character'] = 'Estilo de caracteres';
// END MOD BBCodeWithStyle
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
// BEGIN MOD BBCodeWithStyle
$txt['style_paragraph'] = 'Estilo de parágrafo';
$txt['style_character'] = 'Estilo de caracteres';
// END MOD BBCodeWithStyle
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
// BEGIN MOD BBCodeWithStyle
$txt['style_paragraph'] = 'Estilo de parágrafo';
$txt['style_character'] = 'Estilo de caracteres';
// END MOD BBCodeWithStyle
]]></add>
</operation>
</file>
I just wanted to reply to this and say thank you for this mod! :D It's saved me a lot of frustration on organizing and prettifying a couple of tables for my new site.
Hello!
I have question about links:
Links in posts are, by default, underlined, and css for that part is:
.bbc_link:link, .bbc_link:visited
{
border-bottom: 1px solid #A8B6CF;
}
I would like for some of links not to be underlined, and do not know is it possible to do that with this mod?
I tried, but no luck so far.
Thanks.
Quote from: natasa on December 20, 2012, 03:30:39 AM
Hello!
I have question about links:
Links in posts are, by default, underlined, and css for that part is:
.bbc_link:link, .bbc_link:visited
{
border-bottom: 1px solid #A8B6CF;
}
I would like for some of links not to be underlined, and do not know is it possible to do that with this mod?
I tried, but no luck so far.
Thanks.
You can not use attribute class/style on BBC url/iurl, and if you use BCC span you can modify color/width of underline but no hide underline:
Work:
[iurl=http://www.simplemachines.org][span style="border-bottom: 1px solid yellow;"]http://www.simplemachines.org[/span][/iurl]
Not work:
[iurl=http://www.simplemachines.org][span style="border-bottom-style: none;"]http://www.simplemachines.org[/span][/iurl]
You must use HTML code:
With style
[html]<a href="http://www.simplemachines.org/" class="bbc_link" style="border-bottom-style: none;">http://www.simplemachines.org/</a>[/html]
or with CSS class ( .nounderline { border-bottom-style: none; } )
[html]<a href="http://www.simplemachines.org/" class="bbc_link nounderline">http://www.simplemachines.org/</a>[/html]
You can not use this MOD.
Thanks for quick reply.
I will try with HTML option :).
New version:
1.4.4 2012-12-22
------------------
+ SMF compatibility: Adds 1.0.23.
+ SMF compatibility: Adds 1.1.17.
+ SMF compatibility: Adds 2.0.3.
+ Languages: Adds portuguese_brazilian, portuguese_brazilian-utf8, brazilian, brazilian-utf8, portuguese_pt, portuguese_pt-utf8, thanks to Joomlamz.
New version:
1.4.5 2013-04-10
------------------
+ SMF compatibility: Adds 1.1.18.
+ SMF compatibility: Adds 2.0.4.
- SMF compatibility: Removes support to obsolete series 1.0.x and Beta and RC versions.
how can add cellspacing?
Quote from: Snoopix on June 26, 2013, 08:03:00 PM
how can add cellspacing?
You can use class or style attribute on table.
Perhaps border-spacing:10px; ?
[table border=1]
[tr]
[td style="border-spacing: 10px"][/td]
[/tr]
[/table]
no works.
Quote from: Snoopix on July 10, 2013, 04:30:13 AM
[table border=1]
[tr]
[td style="border-spacing: 10px"][/td]
[/tr]
[/table]
no works.
border-spacing only works in tag table
[table border=1 style="border-spacing: 10px"]
[tr]
[td]...[/td]
[td]...[/td]
[/tr]
[tr]
[td]...[/td]
[td]...[/td]
[/tr]
[/table]
But it depends about whatever you want get. You can find more CSS properties in online manuals.
New version:
1.4.6 2013-08-18
------------------
@ This work is licensed under a Creative Commons Attribution 3.0 Unported License http://creativecommons.org/licenses/by/3.0/
+ SMF compatibility: Adds 2.0.5.
This MOD can be installed before or after MOD nCode Image Resizer 1.4.
New version:
1.4.7 2013-10-25
------------------
@ Can be installed before or after "nCode Image Resizer" MOD 1.3-1.4.
+ SMF compatibility: 1.1.19 and 2.0.6.
I have a couple of questions. I was designing a template on my site with an image hosted at imgur as the background of the div. On preview, it looked great, but every time I would actually post the template, the external url would automatically turn into bbcode and screw up my template.
I turned off "automatically turn links into bbcode links", but then that screwed with another one of my mods, and I would really like to turn the links into bbcode again...
Is there any way to use a background image in a div:
1. without the link automatically turning into a click-able link
2. without uploading the background-image to my server (my members also make templates that have background images that are external links and I don't want to have to force them to upload all their background images to my server).
Quote from: recursiveMAX on November 15, 2013, 04:20:35 PM
I have a couple of questions. I was designing a template on my site with an image hosted at imgur as the background of the div. On preview, it looked great, but every time I would actually post the template, the external url would automatically turn into bbcode and screw up my template.
I turned off "automatically turn links into bbcode links", but then that screwed with another one of my mods, and I would really like to turn the links into bbcode again...
Is there any way to use a background image in a div:
1. without the link automatically turning into a click-able link
2. without uploading the background-image to my server (my members also make templates that have background images that are external links and I don't want to have to force them to upload all their background images to my server).
I suppouse your code is
[div style="background-image('http://image');"]...[/div]
Sorry but SMF parse all links (http:// ) into lick-able link :(
You have two solutions:
1. Upload image to your server. But you can not to do this :(
2. Use html instead of my MOD
[html]<div style="background-image: url('http://media.simplemachinesweb.com/smf/default/images/spanish_es-utf8/new.gif');">[/html]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[html]</div>[/html]
On my forum works but not here:
Quote<div style="background-image: url('http://media.simplemachinesweb.com/smf/default/images/spanish_es-utf8/new.gif');">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
New version:
1.4.8 2014-01-25
------------------
+ SMF compatibility: 2.0.7.
New version:
1.4.9 2014-06-23
------------------
! Use HTML entities in ISO-8859-1 languages.
+ SMF compatibility: 2.0.8.
I don't need to update if I already have it installed and it's working fine with 2.0.8 right? :)
(the language fix doesn't really apply to me)
Yes, you do not need update this MOD :)
Only users with ISO-8859-1 languages.need update this MOD, but not is important. They can not update.
Thanks, appreciate it. :)
New version:
1.4.10 2014-10-07
------------------
+ SMF compatibility: 1.1.20 and 2.0.9.
Regarding: "Sorry but SMF parse all links (http:// ) into lick-able link :("
Would it be possible to turn off the clickable link feature only when it is between BBCode?
SMF won't parse http:// when the switch "Automatically link posted URLs" is turne off. But it would be lovely to have it working only when it is outside BBCode.
http://example.com should be clickable, but [mycoolbbc]http://example.com[/mycoolbbc] should not.
Just my thoughts.
Thanks.
Quote from: gnowak on October 16, 2014, 04:04:21 PM
Regarding: "Sorry but SMF parse all links (http:// ) into lick-able link :("
Would it be possible to turn off the clickable link feature only when it is between BBCode?
SMF won't parse http:// when the switch "Automatically link posted URLs" is turne off. But it would be lovely to have it working only when it is outside BBCode.
http://example.com should be clickable, but [mycoolbbc]http://example.com[/mycoolbbc] should not.
Just my thoughts.
Thanks.
I did not find any mod with your request. It can be an idea for other mod. ;)
Thanks for the quick reply. Yes, I guess this is an idea for another mod. :-D
BBC Parsing http://example.com instead of <a href="http://example.com">http://example.com</a> would be fantastic!
Thanks again for your time.
Hello,
Did anybody manage to make the image rotation work? With more and more photos taken with mobile phones, users end up posting photos automatically rotated on their computer, and not rotated on the forum :(
I run SMF 2.0.9, version 1.4.9 of "BBCode with style" and PHP 5.2. Image always shows as broken link.
I tried with images hosted on forum or externaly, doesn't change anything. As soon as it goes through the "Subs-BBCodeWithStyle-Image.php", there is no output (even with rotateangle=0)
Thanks for any help!
Quote from: TourFL on March 23, 2015, 05:39:27 AM
Hello,
Did anybody manage to make the image rotation work? With more and more photos taken with mobile phones, users end up posting photos automatically rotated on their computer, and not rotated on the forum :(
I run SMF 2.0.9, version 1.4.9 of "BBCode with style" and PHP 5.2. Image always shows as broken link.
I tried with images hosted on forum or externaly, doesn't change anything. As soon as it goes through the "Subs-BBCodeWithStyle-Image.php", there is no output (even with rotateangle=0)
Thanks for any help!
Sorry, but rotateangle, rotatebgcolor and flip do not work in all servers. :(
Ok, but can I know if it uses some special php module, or has special requirements,permissions etc to work? I can surely ask my server hosting to install something if required.
Quote from: TourFL on March 23, 2015, 05:56:45 AM
Ok, but can I know if it uses some special php module, or has special requirements,permissions etc to work? I can surely ask my server hosting to install something if required.
Yes.
First, it need GD library. In next update I will try to do that the mod detected if GD is installed, and if GD is not installed then image will be shown without processed.
Second, in my local server (Windows 7 + Apache 1.3) when an image is processed by Subs-BBCodeWithStyle-Image.php, a temporal file is created in root of my disk. I do not know if this happen in linux systems and permission are required. Perhaps this only happen in my system because my config files...
Thanks, I made it work!
So I added so print in your code, and got this message when printing "exif_imagetype($_GET['image']);"
Warning: exif_imagetype() [function.exif-imagetype]: URL file-access is disabled in the server configuration in ..../Sources/Subs-BBCodeWithStyle-Image.php on line 97
After some search, I learned it comes from php.ini parameter "allow_url_fopen" which should be activated (off by default on my server). So problem comes from not being able to open stream from url.
I don't have acess tphp.ini file on my service provider, but this can be achieved in the .htaccess file by adding the line
php_flag "allow_url_fopen" "On"
Now it works fine! thanks for your help!
Quote from: TourFL on March 23, 2015, 06:38:03 AM
After some search, I learned it comes from php.ini parameter "allow_url_fopen" which should be activated (off by default on my server). So problem comes from not being able to open stream from url.
I don't have acess tphp.ini file on my service provider, but this can be achieved in the .htaccess file by adding the line
php_flag "allow_url_fopen" "On"
Now it works fine! thanks for your help!
Wow. I am glad that this works!
Nice mod, thank you very much. I have a couple of questions if that's ok!
1) Can you suggest a way to make this work on attachments, rotating the thumbnail?
2) My users will want to rotate a lot of images, both attached and images hosted elsewhere. Can you suggest a way to make it supereasy for them, ie maybe some icons they can use on the BBC UIX and tag their img BBC with various rotates. Any suggestions?
Thank you for your time,
-Johan
Quote from: roshaoar on April 29, 2015, 01:55:44 PM
Nice mod, thank you very much. I have a couple of questions if that's ok!
1) Can you suggest a way to make this work on attachments, rotating the thumbnail?
2) My users will want to rotate a lot of images, both attached and images hosted elsewhere. Can you suggest a way to make it supereasy for them, ie maybe some icons they can use on the BBC UIX and tag their img BBC with various rotates. Any suggestions?
Thank you for your time,
-Johan
I do not know... I will see if I can to do something on next update.
Thank you, davidhs!
I think (hope) I can use this to make some obvious icons that'll let the author rotate their images with this (I think). Still need to look into it.
But #1 is eluding me. I don't know where the programming is that affects thumbnails or how to even find thumbnails from a post. Do you know of any documentation that explains this, even in a roundabout way?
Thank you
-Johan
Hmmm, sorry to bother again and be needy, but having thought this worked perfectly I've just discovered that adding this mod seems to have messed up my ability to post an attachment. I've removed and tried rolling back but same problem seems to be happening. When I try and post an attached image I get a 500 error with:
Quote
The website cannot display the page
http://extreme-macro.co.uk/forum/buy-sell/?action=post2;start=0
In my error logs I see:
Quote
mod_fcgid: stderr: PHP Warning: imagedestroy(): 5 is not a valid Image resource in /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/forum/Sources/Subs-BBCodeWithStyle-Image.php on line 113, referer: http://extreme-macro.co.uk/forum/light-diffusers/links-test/
What would you recommend? posting text works fine - it goes to post, not post2
Thank you for your time,
-Johan
Quote from: roshaoar on April 29, 2015, 06:09:04 PM
But #1 is eluding me. I don't know where the programming is that affects thumbnails or how to even find thumbnails from a post. Do you know of any documentation that explains this, even in a roundabout way?
I do not known documentation about this. You can see files:
- Sources/Display.php, line 1449, function loadAttachmentContext()
- Themes/default/Display.template.php, line 497
Quote from: roshaoar on April 30, 2015, 04:27:19 AM
Hmmm, sorry to bother again and be needy, but having thought this worked perfectly I've just discovered that adding this mod seems to have messed up my ability to post an attachment. I've removed and tried rolling back but same problem seems to be happening. When I try and post an attached image I get a 500 error with:...
:o I have this mod installed in a test forum and an operation forum and attach files and images works... I do not known cause of your problem. Sorry :(
Thanks for taking the time to respond davidhs, much appreciated. I'm now suspecting another mod has caused this - but rolling back has sadly massively failed :). So I'll just do a complete reinstall I guess!
Thanks for pointing me to those files
fyi - was user error (partially). I reinstalled and it did the same on a fresh no mods install!!! Turns out the image I was trying to post had something bad about it maybe size or something (no error message though, just a white default 500)... With a different image it went fine.
Thanks again
-Johan
I updated this mod.
Quote from: davidhs on March 23, 2015, 06:16:15 AM
First, it need GD library. In next update I will try to do that the mod detected if GD is installed, and if GD is not installed then image will be shown without processed.
If rotate or flip of image fail, the original image is shown.
Quote from: TourFL on March 23, 2015, 06:38:03 AM
After some search, I learned it comes from php.ini parameter "allow_url_fopen" which should be activated (off by default on my server). So problem comes from not being able to open stream from url.
I don't have acess tphp.ini file on my service provider, but this can be achieved in the .htaccess file by adding the line
php_flag "allow_url_fopen" "On"
Now it works fine! thanks for your help!
I can not activate this on source code, must be activated in php.ini or .htaccess file. I add a note in readme.txt file.
Quote from: roshaoar on April 29, 2015, 01:55:44 PM
Nice mod, thank you very much. I have a couple of questions if that's ok!
1) Can you suggest a way to make this work on attachments, rotating the thumbnail?
2) My users will want to rotate a lot of images, both attached and images hosted elsewhere. Can you suggest a way to make it supereasy for them, ie maybe some icons they can use on the BBC UIX and tag their img BBC with various rotates. Any suggestions?
Thank you for your time,
-Johan
Sorry, I have not done any of this.
1) I think this is not very useful and requires changes beyond the scope of this mod (BBC code).
2) I will not add buttons for insert img BBC various rotates because are not very useful. Other reason, you can use style/class attribute in hr/img/li/list/table/tr/td tag and I do not add button for these, only for div/span.
You can to do these:
- Write a warning on forum with new bbc tags/attributes. For example: "Use [img rotateangle=n]http://...[/img] for rotate an image n degrees".
or
- Add yourself buttons for insert these BBC. This would be another mod :) Steps (using SMF 2.0.x):
1. Create buttons of image rotate 90º, 180º and 270º (named img90.gif, img180.gif, img270.gif), similar to (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fmedia.simplemachinesweb.com%2Fsmf%2Fdefault%2Fimages%2Fbbc%2Fimg.gif&hash=5f2b43122dc29a431d4be221a674b45de4f09c26), and move to /Themes/default/images/bbc/
2. Create a file named Subs-MyBbcButtons.php with this content:
<?php
if (!defined('SMF'))
die('Hacking attempt...');
function my_bbc_buttons(&$bbc_tags)
{
// This insert a gap
$bbc_tags[1][] = array();
// This insert a button with bbc [img rotateangle=90]...[/img]
$bbc_tags[1][] = array(
'image' => 'img90', // File name without ".gif".
'code' => 'img',
'before' => '[img rotateangle=90]',
'after' => '[/img]',
'description' => 'Rotate 90º',
);
// This insert a button with bbc [img rotateangle=180]...[/img]
$bbc_tags[1][] = array(
'image' => 'img180',
'code' => 'img',
'before' => '[img rotateangle=180]',
'after' => '[/img]',
'description' => 'Rotate 180º',
);
// This insert a button with bbc [img rotateangle=270]...[/img]
$bbc_tags[1][] = array(
'image' => 'img270',
'code' => 'img',
'before' => '[img rotateangle=270]',
'after' => '[/img]',
'description' => 'Rotate 270º',
);
}
?>
and move to /Source/
If you do not create buttons, description will displayed instead of button.
3. In Source/Load.php, search "// Any files to pre include?" (near line 317) and insert these before:
add_integration_function('integrate_pre_include', '$boarddir/Sources/Subs-MyBbcButtons.php', false);
add_integration_function('integrate_bbc_buttons', 'my_bbc_buttons', false);
line 317 --> // Any files to pre include?
New version:
1.5 2015-05-23
------------------
@ PHP configuration option "allow_url_fopen" must be activated in php.ini or .htaccess file.
* If rotate or flip of image fail, the original image is shown.
+ SMF compatibility: 1.1.21 and 2.0.10.
Hello,
I keep getting some errors in my logs with one of the module's file:
http://<mysite>/index.php?action=printpage;topic=6078.0
8: Undefined offset: 1
File: <root_dir>/web/Sources/Subs-BBCodeWithStyle.php(66) : runtime-created function
Line: 4
Then the same with offset 2, 3
I run version 1.4.9 of the module, with SMF 2.0.10
Any idea how to solve this?
Thanks!
Quote from: TourFL on August 25, 2015, 04:57:09 AM
Hello,
I keep getting some errors in my logs with one of the module's file:
http://<mysite>/index.php?action=printpage;topic=6078.0
8: Undefined offset: 1
File: <root_dir>/web/Sources/Subs-BBCodeWithStyle.php(66) : runtime-created function
Line: 4
Then the same with offset 2, 3
I run version 1.4.9 of the module, with SMF 2.0.10
Any idea how to solve this?
Thanks!
Sorry, I do not see the cause of this error message. :(
Usually, these messages are not important, you do not worry.
This error is created when you visit http://<mysite>/index.php?action=printpage;topic=6078.0
Is it created when you visit http://<mysite>/index.php?topic=6078.0 ?
You can to do this:
- Update my mod to last version.
- Tell me content of your topic http://<mysite>/index.php?topic=6078.0
Thanks for your help!
The specificity of the topics generating errors, is that it uses [img rotateangle=<degree>] for some images. Errors only appear in those topics.
Adress is: http://www.500-126.com/index.php?topic=6078.0
The error is not generated when viewing the topic normally, only when a user tries to print it.
If I try to print a topic with photos, but not using the rotation, it doesn't generate errors.
I installed version 1.5 of your module, the error is still here :(
Quote from: TourFL on August 25, 2015, 07:53:35 AM
Thanks for your help!
The specificity of the topics generating errors, is that it uses [img rotateangle=<degree>] for some images. Errors only appear in those topics.
Adress is: http://www.500-126.com/index.php?topic=6078.0
The error is not generated when viewing the topic normally, only when a user tries to print it.
If I try to print a topic with photos, but not using the rotation, it doesn't generate errors.
I installed version 1.5 of your module, the error is still here :(
Ok, I will test print with rotate.
Thank you for warning,
Quote from: TourFL on August 25, 2015, 04:57:09 AM
Hello,
I keep getting some errors in my logs with one of the module's file:
http://<mysite>/index.php?action=printpage;topic=6078.0
8: Undefined offset: 1
File: <root_dir>/web/Sources/Subs-BBCodeWithStyle.php(66) : runtime-created function
Line: 4
Then the same with offset 2, 3
I run version 1.4.9 of the module, with SMF 2.0.10
Any idea how to solve this?
Thanks!
I had an error on source code. I fixed this.
1.5.1 2015-08-26
------------------
! When img tag is disabled only URL is displayed.
Thanks a lot!
I'll install it now ;D
Edit: It works! :D
Compatible with SMF 2.0.11.
I was wondering if this mod will allow class style within url tags? For instance, if I don't want a hyperlink to have an underline and wanted to use a class like text-decoration: none;
Is that a possibility? (I'm asking before I install.) :)
EDIT: Hang on..... I sat here and read all 6 pages, so how did I miss this?
http://www.simplemachines.org/community/index.php?topic=379283.msg3456364#msg3456364 (http://www.simplemachines.org/community/index.php?topic=379283.msg3456364#msg3456364)
Well, there ya go, then........
Quote from: Grammy on July 23, 2016, 06:49:48 PM
I was wondering if this mod will allow class style within url tags? For instance, if I don't want a hyperlink to have an underline and wanted to use a class like text-decoration: none;
Is that a possibility? (I'm asking before I install.) :)
EDIT: Hang on..... I sat here and read all 6 pages, so how did I miss this?
http://www.simplemachines.org/community/index.php?topic=379283.msg3456364#msg3456364 (http://www.simplemachines.org/community/index.php?topic=379283.msg3456364#msg3456364)
Well, there ya go, then........
Sorry, you can not use this mod for this. :(
Quote from: davidhs on July 24, 2016, 07:27:45 AM
Sorry, you can not use this mod for this. :(
No, but your advice on that link was just what I needed. Plus, I can see a lot of other neat things I can use the mod for. :)
Thanks!
Compatible with SMF 2.0.12.
Did you make any changes? I've been using this through an number of patches including 2.0.12 without any problems.
Love this mod, btw. :)
Quote from: Steve on October 15, 2016, 10:32:08 AM
Did you make any changes? I've been using this through an number of patches including 2.0.12 without any problems.
Love this mod, btw. :)
I do not make changes. This works in SMF 2.0.12 and previous.
Warning: In you update to SMF 2.0.12, it (SMF) has an important bug :(
http://www.simplemachines.org/community/index.php?topic=549122.0
Ah, okay ... thanks. :)
Compatible with SMF 2.0.13.
Compatible with SMF 2.0.14 and 2.0.15.
Hey there! Thank you for this wonderful mod!
Is there any way to add divs or tables to have background image style? It seems to throw in an error when I try to do it.
Quote from: Kirolainen on February 22, 2018, 08:11:42 PM
Is there any way to add divs or tables to have background image style? It seems to throw in an error when I try to do it.
Yes, with
[div style="background-image: url(http://your_image.gif);"]...[/div]
(same with table, tr or td)
Perhaps you must write an absolute url, instead of relative url.
Thank you for the mod. How can you make a solid border? By default it's double line when I add boarder=1
Quote from: njtweb on May 10, 2018, 07:28:09 AM
Thank you for the mod. How can you make a solid border? By default it's double line when I add boarder=1
You do not use border=1 in table.
Use style="border: 1px solid red;" (for example) in table, tr and/or td.
More examples: https://www.w3schools.com/cssref/pr_border.asp
New version:
1.5.2 2020-03-07
------------------
@ Can be installed before or after "nCode Image Resizer" MOD 2.0 (for SMF 2.0-2.0.15).
+ SMF compatibility: 2.0.11-2.0.17.
- SMF 2.0.x: Languages: brazilian, brazilian-utf8, spanish, spanish-utf8 (these are not used).
I just want to say thank you. This is honestly one of the best modifications and most-used on our website. It allows users to create stylish post templates or flawless biographies. I dearly hope you continue to update and add to this amazing add-on. SMF would not be the same without it.
Quote from: StarredSkies on October 07, 2020, 02:26:50 AM
I just want to say thank you. This is honestly one of the best modifications and most-used on our website. It allows users to create stylish post templates or flawless biographies. I dearly hope you continue to update and add to this amazing add-on. SMF would not be the same without it.
Thank you! :D
I know this topic is old but since davidhs has been here in the last few months I'm going to ask anyway.
Any chance of an update for 2.1.4?
This is the one mod that's holding me back from the 2.1 update. Similarly to the last poster, I'd like to know if this is being upgraded to 2.1. This code is sooooo important to my website's dynamic and I would hate to lose the templates it created.