News:

Wondering if this will always be free?  See why free is better.

Main Menu

BBCode with style

Started by davidhs, May 02, 2010, 02:40:59 AM

Previous topic - Next topic

tRu3_sKiTz0

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.

davidhs

Sorry, I do not know how I can help. :(

Perhaps that is a parameter of your server ... ?

tRu3_sKiTz0


didis

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?

davidhs

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. ;)

davidhs

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.

Mikirin

Hey, for some reason the button on it is extra weird.

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)

davidhs

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.


Mikirin

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

davidhs

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]

Mikirin

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

davidhs

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.

Arantor

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.

davidhs

#33
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.

Arantor

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.

davidhs

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.

Boskonovic

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 "&quot;" and see what happens :)

EDIT2: Ok problem solved. Using "&quot;" it's all ok! I add the 2 translated files.

Bye

davidhs

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 "&quot;" and see what happens :)

EDIT2: Ok problem solved. Using "&quot;" it's all ok!
Yes, it is.

SMF 2.0 RC5 use some functions before create post.

Instead of write
<?php
$message 
"[div class=&quot;prova&quot;]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']($messageENT_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.)

Boskonovic

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

davidhs

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
}

Advertisement: