Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on March 02, 2009, 12:39:44 PM

Title: Box BBCode
Post by: vbgamer45 on March 02, 2009, 12:39:44 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=1676)

Box BBCode v1.2

Compatible With:SMF 1.1.X - SMF 2 Beta & RC1
Created By:.LORD. (http://www.simplemachines.org/community/index.php?action=profile;u=192278)
Version:1.2
Languages:Swedish translation by Nas (http://www.simplemachines.org/community/index.php?topic=296629.msg1980822#msg1980822)
Spanish translation by phpMyTony (http://www.simplemachines.org/community/index.php?topic=296629.msg2011390#msg2011390)
 Turkish translation by Özgür´ (http://www.simplemachines.org/community/index.php?topic=296629.msg2012468#msg2012468)
 French translation by @ngel (http://www.simplemachines.org/community/index.php?topic=296629.msg2241417#msg2241417)
Image 1 (http://custom.simplemachines.org/mods/index.php?action=download;mod=1676;id=88630;image)
Image 2 (http://custom.simplemachines.org/mods/index.php?action=download;mod=1676;id=88632;image)
Image 3 (http://custom.simplemachines.org/mods/index.php?action=download;mod=1676;id=94733;image)
You can include boxes and separate the message text into sections.

You can also edit the style of the box using the css rule box_bbcode or other styles through the attribute class.

After install you should do 'hard refresh'.

Version 1.1: attribute link added.
Version 1.2: attribute hlink added. Change validation in title (beta)

Total Attributes:

[box]Example[/box]

[box title=Abstract]Example[/box]

[box class=titlebg]Example[/box]

[box title=More Info link=http://en.wikipedia.org/wiki/Simple_Machines_Forum]
Simple Machines Forum (abbreviated as SMF) is a freeware Internet forum application...[/box]

[box title=SMF link=http://www.simplemachines.org/community/index.php]
Example with link attribute.
[/box]

[box title=SMF hlink=http://www.simplemachines.org/community/index.php]
Example with hlink attribute.
[/box]
Title: Re: Box BBCode
Post by: Marcus Forsberg on March 02, 2009, 12:44:45 PM
This looks really cool. I gotta try this out when I have some time :P
Title: Re: Box BBCode
Post by: 4Kstore on March 02, 2009, 12:55:50 PM
really cool mod!! thanks!
Title: Re: Box BBCode
Post by: edi67 on March 02, 2009, 02:46:07 PM
nice
Title: Re: Box BBCode
Post by: NHWD on March 03, 2009, 12:18:48 AM
anyway of using this as coda tags instead of using [box]---[/box]
Title: Re: Box BBCode
Post by: Blinker on March 03, 2009, 03:46:11 AM
Nice mod, thanks .LORD.

It works similarly to the modbreak mod, but this time with a button to accompany it. :)

Could you by any chance please provide sample css styling code to give me an idea of what to aim for?
Title: Re: Box BBCode
Post by: shanksta13 on March 03, 2009, 05:16:52 PM
Is there any way you could add a feature to include hyperlinks in the box title?  For instance, I would like to use this mod to cite new articles from other sites and have a link to the original article in the title.

For instance:


     Box Title <this would be hyperlink to a website using the URL codes>
             
             Article content inside box.



The problem is right now, when you go to put the title into the [box title="Title here"] code, the first ] stops the title, so it won't allow for the BBC URL code.
Title: Re: Box BBCode
Post by: Minare on March 04, 2009, 01:45:15 AM
nice job bro, thanks
Title: Re: Box BBCode
Post by: MaryLouW on March 04, 2009, 04:47:44 AM
I love this mod... I installed it tonight but alas, there is no button - just text .  How do I get a button in place of the text?
Title: Re: Box BBCode
Post by: Marcus Forsberg on March 04, 2009, 05:33:23 AM
Quote from: MaryLouW on March 04, 2009, 04:47:44 AM
I love this mod... I installed it tonight but alas, there is no button - just text .  How do I get a button in place of the text?

if you use a custom theme you'll have to place the button in that themes imagesfolder,
Title: Re: Box BBCode
Post by: MaryLouW on March 04, 2009, 12:18:36 PM
Thanks!!!  I found it!  Appreciate the help.
Title: Re: Box BBCode
Post by: .LORD. on March 04, 2009, 12:46:50 PM
Quote from: CL0WNER on March 03, 2009, 12:18:48 AM
anyway of using this as coda tags instead of using [box]---[/box]

Yes, What SMF version are you using?




Quote from: Blinker on March 03, 2009, 03:46:11 AM
1) Nice mod, thanks .LORD.

2) It works similarly to the modbreak mod, but this time with a button to accompany it. :)

3) Could you by any chance please provide sample css styling code to give me an idea of what to aim for?

1. Thanks for your comment :)

2. Oh, yes  T.T

I was looking if there were similar MODs, I was searching for: box, shell, case, fieldset, and i not found any.

I don't search for modbreak  :'(

3. Yes, for example, in the images sample, i have used:

Image 1:

Test Box BBCode

[box]
In this case without title
Test Box BBCode
[/box]

[box title=Title with spaces and special chars: á Ñ 聖闘士星矢]
In this case with title
Test Box BBCode
[/box]

[box title=]
If the title is empty, not have error
Test Box BBCode
[/box]


Image 2:
Test Box BBCode
[box class=titlebg2]
Also is possible to assign a style to the box
Test Box BBCode
[/box]
[box title=Box Mother]
Also is possible to nest box
[box title=Box Daughter]
Test Box BBCode
[/box]
Test Box BBCode
[/box]
[box class=catbg]
Box Mother
[box class=titlebg]
Box Daughter
[/box]
[/box]


More example:


[box class=catbg]
Box Mother
[box class=titlebg]
Box dauther
[/box]
[/box]

[box class=titlebg]
Box Mother
[box class=titlebg]
Box dauther
[/box]
[/box]





Quote from: shanksta13 on March 03, 2009, 05:16:52 PM
Is there any way you could add a feature to include hyperlinks in the box title?  For instance, I would like to use this mod to cite new articles from other sites and have a link to the original article in the title.

For instance:


     Box Title <this would be hyperlink to a website using the URL codes>
             
             Article content inside box.



The problem is right now, when you go to put the title into the [box title="Title here"] code, the first ] stops the title, so it won't allow for the BBC URL code.

Try it:

[box title=http://custom.simplemachines.org/mods/index.php?mod=1676]
Test Box BBCode with link
[/box]


Let me know if that's what you want.




Quote from: Nas on March 02, 2009, 12:44:45 PM
This looks really cool. I gotta try this out when I have some time :P
Quote from: 4kstore on March 02, 2009, 12:55:50 PM
really cool mod!! thanks!
Quote from: edi67 on March 02, 2009, 02:46:07 PM
nice
Quote from: Minare on March 04, 2009, 01:45:15 AM
nice job bro, thanks

Thanks for yours comments  :D

Quote from: Nas on March 04, 2009, 05:33:23 AM
Quote from: MaryLouW on March 04, 2009, 04:47:44 AM
I love this mod... I installed it tonight but alas, there is no button - just text .  How do I get a button in place of the text?

if you use a custom theme you'll have to place the button in that themes imagesfolder,

Thanks for help :D
Title: Re: Box BBCode
Post by: shanksta13 on March 04, 2009, 06:35:06 PM
Quote from: .LORD. on March 04, 2009, 12:46:50 PM

Quote from: shanksta13 on March 03, 2009, 05:16:52 PM
Is there any way you could add a feature to include hyperlinks in the box title?  For instance, I would like to use this mod to cite new articles from other sites and have a link to the original article in the title.

For instance:


     Box Title <this would be hyperlink to a website using the URL codes>
             
             Article content inside box.



The problem is right now, when you go to put the title into the [box title="Title here"] code, the first ] stops the title, so it won't allow for the BBC URL code.

Try it:

[box title=http://custom.simplemachines.org/mods/index.php?mod=1676]
Test Box BBCode with link
[/box]


Let me know if that's what you want.

Yeah, that doesn't actually allow the link to function as a hyperlink.  That's what I was asking for, some way to make it so that you can go to the actual page by clicking on the link.  As it is now, a URL appears as just an unlinked title.
Title: Re: Box BBCode
Post by: MaryLouW on March 04, 2009, 06:40:47 PM
That would be pretty cool!!  I think I'd like that myself.
Title: Re: Box BBCode
Post by: NHWD on March 08, 2009, 05:36:48 AM
Quote from: .LORD. on March 04, 2009, 12:46:50 PM
Quote from: CL0WNER on March 03, 2009, 12:18:48 AM
anyway of using this as coda tags instead of using [box]---[/box]

Yes, What SMF version are you using?
1.1.8
Title: Re: Box BBCode
Post by: cme1st2302 on March 11, 2009, 12:59:28 PM
How would I go about change the font color of the Title when I use it?

Chris
Title: Re: Box BBCode
Post by: Marcus Forsberg on March 18, 2009, 09:45:53 AM
Swedish translation:


//Box BBCode
$txt['box_bbcode'] = 'Infoga box';
Title: Re: Box BBCode
Post by: .LORD. on March 22, 2009, 10:06:57 PM
Quote from: shanksta13 on March 04, 2009, 06:35:06 PM
Yeah, that doesn't actually allow the link to function as a hyperlink.  That's what I was asking for, some way to make it so that you can go to the actual page by clicking on the link.  As it is now, a URL appears as just an unlinked title.

Done.

Now exists the link attribute.

Now you can use:

[box title=More Info: link=http://en.wikipedia.org/wiki/Simple_Machines_Forum]
Simple Machines Forum (abbreviated as SMF) is a freeware Internet forum application...[/box]


Thanks for idea :)

Quote from: MaryLouW on March 04, 2009, 06:40:47 PM
That would be pretty cool!!  I think I'd like that myself.

Thanks for your comments. Done. :)

Quote from: CL0WNER on March 08, 2009, 05:36:48 AM
Quote from: .LORD. on March 04, 2009, 12:46:50 PM
Quote from: CL0WNER on March 03, 2009, 12:18:48 AM
anyway of using this as coda tags instead of using [box]---[/box]

Yes, What SMF version are you using?
1.1.8

Sorry for delay.

Ok, I think I understood what you want.

1.- Search:


array(
'tag' => 'br',
'type' => 'closed',
'content' => '<br />',
),


Replace:

array(
'tag' => 'br',
'type' => 'closed',
'content' => '<br />',
),
/*


2.- Search:


array(
'tag' => 'center',


Replace:

*/
array(
'tag' => 'center',


3.- Install the MOD and open the Subs.php and Search 'box' and replace by 'code'

4.- In Post.template, delete the BBCode buttom. (the buttom that you want delete).

Quote from: cme1st2302 on March 11, 2009, 12:59:28 PM
How would I go about change the font color of the Title when I use it?

Chris

Edit your style.css

Search:

.box_bbcode legend {color: #476C8E }

and change: #476C8E

Quote from: Nas on March 18, 2009, 09:45:53 AM
Swedish translation:


//Box BBCode
$txt['box_bbcode'] = 'Infoga box';


Thanks for translate :D

Title: Re: Box BBCode
Post by: Smog on April 10, 2009, 05:33:54 PM
Hi,
have implemented the 'box mod'and have found a great use for it.
It suits my needs for making 'Notes' stand out.

example:

[box class=catbg]
Note:
[box class=titlebg]
As you are using Vista... please right click the desktop icon and select '[color=red]Run as Administrator[/color]'
[/box]
[/box]


Now my question is,
How can i make this:

[box class=catbg]
Note:
[box class=titlebg]

[/box]
[/box]

into a shortcut?
what i want to do is to be able to post the above message as:


[note]As you are using Vista... please right click the desktop icon and select '[color=red]Run as Administrator[/color]'[/note]

is this possible?
I'm using Version 2 RC 1.
Many thanks for any help.
Title: Re: Box BBCode
Post by: phpMyTony on April 10, 2009, 05:39:14 PM
Spanish translation ;)
//Box BBCode
$txt['box_bbcode'] = 'Inserta caja';
Title: Re: Box BBCode
Post by: .LORD. on April 11, 2009, 03:12:03 PM
Quote from: Smog on April 10, 2009, 05:33:54 PM
Hi,
have implemented the 'box mod'and have found a great use for it.
It suits my needs for making 'Notes' stand out.

example:

[box class=catbg]
Note:
[box class=titlebg]
As you are using Vista... please right click the desktop icon and select '[color=red]Run as Administrator[/color]'
[/box]
[/box]


Now my question is,
How can i make this:

[box class=catbg]
Note:
[box class=titlebg]

[/box]
[/box]

into a shortcut?
what i want to do is to be able to post the above message as:


[note]As you are using Vista... please right click the desktop icon and select '[color=red]Run as Administrator[/color]'[/note]

is this possible?
I'm using Version 2 RC 1.
Many thanks for any help.

You can:

1.-
Code (search in Subs-Editor.php) Select

'box' => array('code' => 'box', 'before' => '[box title=TitleBox]', 'after' => '[/box]', 'description' => $txt['box_bbcode']),


Code (replace) Select

'box' => array('code' => 'box', 'before' => '[box class= catbg]\nNote:\n[box class= titlebg]', 'after' => '[/box]\n[/box]', 'description' => $txt['box_bbcode']),


or

2.-

Code (search in Subs-Editor.php) Select

array(
'tag' => 'blue',
'before' => '<span style="color: blue;" class="bbc_color">',
'after' => '</span>',
),


Code (add before) Select

array(
'tag' => 'note',
'before' => '<fieldset class="box_bbcode catbg">Note:<fieldset class="box_bbcode titlebg">',
'after' => '</fieldset></fieldset>',
'block_level' => true,
),


and

Code (search in Subs-Editor.php) Select

'box' => array('code' => 'box', 'before' => '[box title=TitleBox]', 'after' => '[/box]', 'description' => $txt['box_bbcode']),


Code (add before) Select

'note' => array('code' => 'note', 'before' => '[note]', 'after' => '[/note]', 'description' => $txt['box_bbcode']),


(add your note.gif for bbcode).

The results are different, I don't know which you like best.




Quote from: phpMyTony on April 10, 2009, 05:39:14 PM
Spanish translation ;)
//Box BBCode
$txt['box_bbcode'] = 'Inserta caja';


Thanks I have added your translation in the template MOD's  :)
Title: Re: Box BBCode
Post by: Özgür on April 11, 2009, 04:16:34 PM
Nice Idea.
Turkish Trans.

//Box BBCode
$txt['box_bbcode'] = 'Kutu Ekle';


How can i add url in title?
[box title=[url=http://]Title[/url]]
Or how can linked title to link.
[box title=More Info: link=http://en.wikipedia.org/wiki/Simple_Machines_Forum]
Must be seem
[url=http://en.wikipedia.org/wiki/Simple_Machines_Forum]More Info:[/url]
Title: Re: Box BBCode
Post by: .LORD. on April 11, 2009, 05:36:34 PM
Quote from: Özgür´ on April 11, 2009, 04:16:34 PM
Nice Idea.
Turkish Trans.

//Box BBCode
$txt['box_bbcode'] = 'Kutu Ekle';


How can i add url in title?
[box title=[url=http://]Title[/url]]
Or how can linked title to link.
[box title=More Info: link=http://en.wikipedia.org/wiki/Simple_Machines_Forum]
Must be seem
[url=http://en.wikipedia.org/wiki/Simple_Machines_Forum]More Info:[/url]


Thanks for comments and translate :D

Sorry, seen in this way isn't possible yet.

And "I think" that it isn't possible, because we have to combine two optional parameters in one value.

Title: Re: Box BBCode
Post by: Özgür on April 11, 2009, 05:53:53 PM
Actually i use for this

array(
'tag' => 'box',
'parameters' => array(
'title' => array('optional' => true, 'value' => '$1', 'match' => '(.{0,192}?)'),
'link' => array('optional' => true, 'value' => '$1', 'match' => '(http://[\w.]+/?\S*?)'),
'class' => array('optional' => true, 'value' => ' $1', 'match' => '([\w-]+)'),
),
'before' => '<fieldset class="box_bbcode{class}"><legend><a href="{link}">{title}</a></legend>',
'after' => '</fieldset>',
'block_level' => true,
),

This is work for me but if i no select link title linked topic. Whatever thank you for mod =)
Title: Re: Box BBCode
Post by: .LORD. on April 11, 2009, 06:16:13 PM
Quote from: Özgür´ on April 11, 2009, 05:53:53 PM
Actually i use for this

array(
'tag' => 'box',
'parameters' => array(
'title' => array('optional' => true, 'value' => '$1', 'match' => '(.{0,192}?)'),
'link' => array('optional' => true, 'value' => '$1', 'match' => '(http://[\w.]+/?\S*?)'),
'class' => array('optional' => true, 'value' => ' $1', 'match' => '([\w-]+)'),
),
'before' => '<fieldset class="box_bbcode{class}"><legend><a href="{link}">{title}</a></legend>',
'after' => '</fieldset>',
'block_level' => true,
),

This is work for me but if i no select link title linked topic. Whatever thank you for mod =)

Yes, but if you don't select title or link parameters, then you will haven't XHTML valid.  :(

Perhaps it is possible to test this

1.- Do not erase any line MOD's.

2.- Do

Code (search) Select

array(
'tag' => 'blue',
'before' => '<span style="color: blue;" class="bbc_color">',
'after' => '</span>',
),


Code (add after) Select

array(
'tag' => 'box',
'parameters' => array(
'title' => array('value' => '$1', 'match' => '(.{0,192}?)'),
'link' => array('value' => '$1', 'match' => '(http://[\w.]+/?\S*?)'),
'class' => array('optional' => true, 'value' => ' $1', 'match' => '([\w-]+)'),
),
'before' => '<fieldset class="box_bbcode{class}"><legend><a href="{link}">{title}</a></legend>',
'after' => '</fieldset>',
'block_level' => true,
),


And try all the cases (with titles + with link, without titles + with link, with titles + without link; all the cases + with class, without parameters, etc).

Thanks :)
Title: Re: Box BBCode
Post by: Özgür on April 11, 2009, 06:38:48 PM
Thats work. Thanks .LORD. =)
Title: Re: Box BBCode
Post by: .LORD. on April 11, 2009, 11:49:55 PM
Your welcome, if you like let me know the results  :P
Title: Re: Box BBCode
Post by: Smog on April 12, 2009, 06:05:38 AM
Many thanks for the reply .LORD
I'll let you know how things go.
Title: Re: Box BBCode
Post by: Smog on April 12, 2009, 02:29:52 PM
Hi .LORD
i can't find this coding in 'Subs-Editor.php'
array(
            'tag' => 'blue',
            'before' => '<span style="color: blue;" class="bbc_color">',
            'after' => '</span>',
         ),

but i can find it in 'Subs.php'
is this what you meant?
didn't want to mess in there until you replied.

Thanks.
Title: Re: Box BBCode
Post by: Özgür on April 12, 2009, 02:38:34 PM
Quote from: .LORD. on April 11, 2009, 11:49:55 PM
Your welcome, if you like let me know the results  :P

I like it. And worked fine. I use in this area http://www.rockayseri.net/rk/muzik/bu-sese-kulak-ver/
Title: Re: Box BBCode
Post by: yura_mdj on April 13, 2009, 02:07:27 PM
.LORD. help me.

I use MS IE 7 & Firefox 3.0.4

I installed your mod package version 1.1
Title: Re: Box BBCode
Post by: Özgür on April 13, 2009, 06:59:00 PM
Download package and move "box.gif" to "./Themes/yourtheme/images/bbc".
Title: Re: Box BBCode
Post by: .LORD. on April 13, 2009, 11:56:46 PM
Hi, a new version is available.

This version includes a new attribute: hlink

title + hlink similar to [url=hlink]title[/url]

Thanks Özgür´ for test.

Also, have been changed the validation in title attribute




Quote from: Smog on April 12, 2009, 02:29:52 PM
Hi .LORD
i can't find this coding in 'Subs-Editor.php'
array(
            'tag' => 'blue',
            'before' => '<span style="color: blue;" class="bbc_color">',
            'after' => '</span>',
         ),

but i can find it in 'Subs.php'
is this what you meant?
didn't want to mess in there until you replied.

Thanks.

Hi.

Yeah, sorry, in Subs.php  :P




Quote from: yura_mdj on April 13, 2009, 02:07:27 PM
.LORD. help me.

I use MS IE 7 & Firefox 3.0.4

I installed your mod package version 1.1

This.

Quote from: Özgür´ on April 13, 2009, 06:59:00 PM
Download package and move "box.gif" to "./Themes/yourtheme/images/bbc".

Thanks Özgür´ :)
Title: Re: Box BBCode
Post by: yura_mdj on April 14, 2009, 12:57:01 PM
Özgür´ .LORD. Thank you very much, problem solved
Title: Re: Box BBCode
Post by: TDNY on April 15, 2009, 08:18:06 PM
Hi, great mod, I was looking around and this caught my eye. I installed it on my default core vers. 1.1.8 test forum. I only have 1 button and when clicked I get this:
[box title=TitleBox][/box] am I supposed to have a button for each of the other attributes like: [box]Example[/box]

                        [box title=Abstract]Example[/box]

                        [box class=titlebg]Example[/box]

Thanks for the help and the Mod.

TD
Title: Re: Box BBCode
Post by: .LORD. on April 17, 2009, 06:28:43 PM
Quote from: TDNY on April 15, 2009, 08:18:06 PM
Hi, great mod, I was looking around and this caught my eye. I installed it on my default core vers. 1.1.8 test forum. I only have 1 button and when clicked I get this:
[box title=TitleBox][/box] am I supposed to have a button for each of the other attributes like: [box]Example[/box]

                        [box title=Abstract]Example[/box]

                        [box class=titlebg]Example[/box]

Thanks for the help and the Mod.

TD

Thanks.

Yes, only one button.

In total there are 4 attributes, if you want a specific button with some specific combination attributes, let me know.
Title: Re: Box BBCode
Post by: PHPLearner on April 19, 2009, 05:04:26 PM
Thanks For this Cool Mod, The only Issue I have Is with IE constricting the box(Left To right Shrinking) , thus jumbling images I would like to keep Side by Side, Thanks, Dave
Title: Re: Box BBCode
Post by: .LORD. on May 02, 2009, 01:09:06 PM
Your welcome  :)

And sorry, I not have IE  :-\, I don't know this issue. (anyway, must be a problem IE's with css)

Title: Re: Box BBCode
Post by: Cal O'Shaw on May 16, 2009, 01:05:59 AM
Hello,

A very nice MOD, but was wondering if you might be able to do a version that requires permissions and has a predefined style.  If I may explain...

There is another MOD out here called MODBREAK, which Aaron wrote and is absolutely wonderful for our site to use to make it clear when someone is posting official moderation or admin notices.  However, in order to keep people from abusing this rather powerful tool, we installed the PERMISSIONS MOD and restricted access to the MODBREAK BBC tag.

Big problem: PERMISSIONS is broken, a known bug.  It can arbitrarily reset all BBC tag permissions to denied to groups such as Global Moderators.  This can be a real pain in the *** when I get frantic emails from members telling me the bold and italic tags are broken, or a new MOD I installed and tested the night before for just Admins is visible to world several hours later, because PERMISSIONS just thought it would be cute to blow up.

Aaron is very busy with other matters (I and others have posted to the MODBREAK topic asking for help, and I think he likes the idea, but doesn't have the time).  The PERMISSIONS MOD seems to be orphaned.

So, I was wondering if you might consider seeing if these enhancements might be possible:

1) The ability to set permissions for use.  Setting would logically go into the Permissions section, set under each membergroup.  Alternatively, if you are open to my other requests, creating a tab in the AdminCP under Features and Options and then having a list of permitted groups (comma delimited, checkbox, whatever works best for you).

2) Define the default style in the AdminCP panel.  A field that is read to insert into the BBC the name of the style by default, which can be overwritten using the existing "style" verb.

3) Define the default title in the AdminCP panel.


Since earlier in this topic it was shown how a new BBC tag could be created based on the BOX BBC, would it be another option to add a "modbox" tag that had the AdminCP features listed above (but no BBC icon, as only Admins and mods would be the only ones using it).

I do realise this is very much my imposing on you, but if being able to at least set permissions on BOX with a default title and style, this would really help out us and likely other Admins who may not have considered using this as a way to make it unmistakable when a statement is official or just a personal view.

Grazie mille!

Cal
Title: Re: Box BBCode
Post by: .LORD. on May 17, 2009, 09:28:56 PM
@Cal O'Shaw

Thanks for your ideas.

I still not think an interface for customize the bbcode.

Meanwhile you can do it this way:

1.- First create the class in the file style.css

example:

.modbox {
       etc,etc
}


2.- And then create the BBCode as these steps:

http://www.simplemachines.org/community/index.php?topic=296629.msg2012414#msg2012414

example:

'modbox' => array('code' => 'box', 'before' => '[box title=XXXXX class=modbox]', 'after' => '[/box]', 'description' => $txt['modbox_bbcode']),


3.- To be used only for certain membergroups, I will investigate a little.

Isn't complicate, but I should test first.
Title: Re: Box BBCode
Post by: CerebralJam on June 03, 2009, 10:06:36 AM
Forgive me, I really know not a lot, but I want to be able to expand the rather bleak profile page to include input boxes for individuals to add information about me:  media - ie youtube embed, esnips mpg widget embed, photos etc etc - could this mod be used to give this sort of thing or am I way offline?
Title: Re: Box BBCode
Post by: .LORD. on June 08, 2009, 02:09:13 AM
Quote from: CerebralJam on June 03, 2009, 10:06:36 AM
Forgive me, I really know not a lot, but I want to be able to expand the rather bleak profile page to include input boxes for individuals to add information about me:  media - ie youtube embed, esnips mpg widget embed, photos etc etc - could this mod be used to give this sort of thing or am I way offline?

No sorry.

But this MOD already exist, you want the Ultimate Profile:
http://custom.simplemachines.org/mods/index.php?mod=1675

Title: Re: Box BBCode
Post by: Dante` on June 08, 2009, 02:36:20 AM
nice mod thanks
Title: Re: Box BBCode
Post by: .LORD. on June 14, 2009, 01:14:56 AM
Quote from: Dante` on June 08, 2009, 02:36:20 AM
nice mod thanks

Your welcome :)
Title: Re: Box BBCode
Post by: CerebralJam on June 30, 2009, 08:06:48 AM
thank you for replying and excuse my late return... I would love that mod and have looked at it several times but unfortunately it is not available for SMF 2.0 RC1/RC1-1   :)
Title: Re: Box BBCode
Post by: woolly bugger on July 08, 2009, 01:31:14 PM
I think this mod is what i've been looking for but I need to set the style and change the name of the text box.

I need a little help in the css dept...


Here is what I would like:

1. Titlebox  replaced with Report
2. background of box set to black
3. font set to white, arial 100% bold and centered.

Thanks.
Title: Re: Box BBCode
Post by: .LORD. on July 08, 2009, 08:30:07 PM
Quote from: CerebralJam on June 30, 2009, 08:06:48 AM
thank you for replying and excuse my late return... I would love that mod and have looked at it several times but unfortunately it is not available for SMF 2.0 RC1/RC1-1   :)

Your welcome.

And you can make the request to the author. Maybe, the author will do the upgrade.

Quote from: woolly bugger on July 08, 2009, 01:31:14 PM
I think this mod is what i've been looking for but I need to set the style and change the name of the text box.

I need a little help in the css dept...


Here is what I would like:

1. Titlebox  replaced with Report
2. background of box set to black
3. font set to white, arial 100% bold and centered.

Thanks.


1.- What version?
Search in $sourcedir/Subs-Editor.php or $themedir/Post.template.php">

[box title=TitleBox]

And change.

2&3.- Edit your custom style.css and set this rule

.box_bbcode {
font-family: Arial;
text-align: center;
background: black;
font-weight: bold;
color: white;
}
Title: Re: Box BBCode
Post by: @ngel on September 02, 2009, 10:31:53 PM
French Translation
QuoteInsérer un cadre
I prefer this first translation than the litteral translation
QuoteInsérer une boîte

About the title in the example "More Info:", don't work with my version 2.0RC1.2; If I remove the ":", it's ok.
Title: Re: Box BBCode
Post by: .LORD. on September 03, 2009, 12:26:02 PM
Quote from: @ngel on September 02, 2009, 10:31:53 PM
French Translation
QuoteInsérer un cadre
I prefer this first translation than the litteral translation
QuoteInsérer une boîte

Perfect, thanks for translate.

Quote from: @ngel on September 02, 2009, 10:31:53 PM
About the title in the example "More Info:", don't work with my version 2.0RC1.2; If I remove the ":", it's ok.

I will fix it. The new regex (in v1.2) seems not work for everyone.  :-\
Title: Re: Box BBCode
Post by: zushiba on November 17, 2009, 05:33:37 PM
what are the chances of getting a RC2 version? I <3 this mod by the way.
Title: Re: Box BBCode
Post by: Arantor on November 17, 2009, 05:37:43 PM
I'd say fairly slim given that the author hasn't been online since September.
Title: Re: Box BBCode
Post by: mgrmgr on November 26, 2009, 01:53:54 PM
 :'(

Thanks arantor as well.

It's sad to hear but a silent hope still remains: to meet a kind soul all of a sudden which can help with a (at least interim) solution for 2.0 RC2 :)
Title: Re: Box BBCode
Post by: Arantor on November 26, 2009, 02:17:06 PM
Actually making it work on 2.0 RC2 isn't that hard if you're prepared to do it manually.

Referring to the 2.0 RC1.2 instructions - http://custom.simplemachines.org/mods/index.php?action=parse;mod=1676;attach=94641;smf_version=2.0_RC1.2

Do the edits to Subs.php as detailed. The edits to Themes/default/style.css would now be applied to Themes/default/css/index.css

Lastly we need to change the edit for Subs-Editor.php since this was overhauled in RC2.

Code (find) Select
array(
'image' => 'quote',
'code' => 'quote',
'before' => '[quote]',
'after' => '[/quote]',
'description' => $txt['bbc_quote']
),


Code (after it, add) Select
array(
'image' => 'box',
'code' => 'box',
'before' => '[quotebox=TitleBox]',
'after' => '[/box]',
'description' => $txt['box_bbcode']
),


All edits to Modifications.****.php files would be done, then you'd empty the file cache (Admin > Maintenance > Routine > Clear file cache)
Title: Re: Box BBCode
Post by: mgrmgr on November 26, 2009, 03:07:26 PM
Quote from: mgrmgr on November 26, 2009, 01:53:54 PM
... but a silent hope still remains: to meet a kind soul all of a sudden which can help with a (at least interim) solution for 2.0 RC2 :)

Oh my - that my wish is fulfilled this way: I'd never have believed it :)

Thank you, thank you, thank you!!!

Your detailed instructions seem to make it possible to edit a new install.xml - my preferred way :)
Title: Re: Box BBCode
Post by: Arantor on November 26, 2009, 03:08:32 PM
Let me know if you have any problems with it :)
Title: Re: Box BBCode
Post by: mgrmgr on November 27, 2009, 12:07:53 PM
no problems at all Aranator, again thank you :)

Just to mention a little flaw(?) in your code to insert:

'before' => '[quotebox=TitleBox]',

I replaced this line with

'before' => '[box=TitleBox]',

to have the same start and ending tag :)

BTW: it looks like different start- and ending-tags are possible - is that really true? Could be a nice April fools joke :)

I made (for myself) a new package containing a separate install 2RC2.xml, a new package info and a new languages.xml (including German_informal). If someone needs them (and the modification team has nothing against that plan), I can attach them if there is demand for those files.

Only sad thing is that mod-authors tend to make install- and uninstall sections for 2.0 - 2.99 - methinks that should not be done while major overhauls might happen until the final release is stable :(

Again thank you Aranator!
Title: Re: Box BBCode
Post by: Arantor on November 27, 2009, 01:54:15 PM
Different start and ending tags are not possible, I just copied the quote tag code for the editor edits and didn't edit it properly.

We generally don't recommend attaching packages here because the authors (if active) tend to ask for them to be removed. That said, there's nothing stopping you do it - just that it's not encouraged.


And yes, authors using such version strings is one of my ongoing issues; fortunately (IMHO) 2.0 RC2 is a little less lenient in that direction.
Title: Re: Box BBCode
Post by: mgrmgr on November 27, 2009, 02:35:17 PM
LOL to all your answers, Arantor. I DO know lazy developers (not only for modifications) from my former job as a programmer. That's why I'm laughing.

OK - to keep your team in good mood I won't attach the modification to this posting :) (Might be I can need you guys later on :) ).

Just a small hint: I have installed a 2.0 RC2 board with the download modification myself and upload the package (for RC2 only!) there - ready to download for registered members on my board. The URI of my board is: URI of my Test board (http://forum.michgeyer.de)

Title: Re: Box BBCode
Post by: Arantor on November 27, 2009, 03:24:10 PM
Tell you the truth, I'm actually somewhat lazy too, despite all my posting and so on, I write things so they're done. Classic case: I got fed up of explaining how to modify SSI's boardNews function to handle multiple boards, so I wrote a version to handle that, plus attachments, avatars, and other stuff (currently pending with the team to approve)

In the case above it was easier for me to copy/paste than to attempt to write from scratch.

That we also don't have a problem with - again provided the author doesn't ask you to remove it.
Title: Re: Box BBCode
Post by: mgrmgr on November 29, 2009, 11:25:21 AM
Quote from: Arantor on November 27, 2009, 03:24:10 PM
Tell you the truth, I'm actually somewhat lazy too, despite all my posting and so on, I write things so they're done.
LOL - I never got to know a "Real Programmer" who was NOT lazy (even if I may say so about myself ) :)

Quote from: Arantor on November 27, 2009, 03:24:10 PM
In the case above it was easier for me to copy/paste than to attempt to write from scratch.

I think we agree that "copy & paste" belongs to the best inventions since sliced bread :)

Title: Re: Box BBCode
Post by: qubbah on April 23, 2010, 12:47:29 PM
hope there is and upgrade version for smf rc3
Title: Re: Box BBCode
Post by: Cereus on July 10, 2010, 11:10:22 PM
Portuguese_brazilian
Portuguese_pt

Quote//Box BBCode
$txt['box_bbcode'] = 'Inserir caixa';



Special characters (like 'ã', 'é') doesn't work.

SMF 1.1.11
Theme: Tolkien.
Title: Re: Box BBCode
Post by: qubbah on July 19, 2010, 07:26:24 AM
Any new news for rc3?
Title: Re: Box BBCode
Post by: qubbah on October 16, 2010, 12:46:13 PM
still waiting for rc3
Title: Re: Box BBCode
Post by: Loginsvarios on October 16, 2010, 01:54:49 PM
Another one interested in RC3 version. ; - )
Title: Re: Box BBCode
Post by: akbora on October 19, 2010, 05:27:24 PM
This is compatible with rc3 but only there is one problem in this file:

./Sources/Subs-Editor.php

How can we solve this? Thanks
Title: Re: Box BBCode
Post by: timned88 on October 21, 2010, 11:26:14 PM
count me in for rc3 as well.

i tried adding

array(
      'image' => 'box'
      'code' => 'box',
      'before' => '[box title=TitleBox]',
      'after' => '[/box]',
      'description' => $txt['box_bbcode']),

but it didn't work.
Title: Re: Box BBCode
Post by: the_knight on January 18, 2011, 08:06:45 AM
Here is the code i altered for RC4 ( in the install_2.xml file):

<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>.LORD.:BoxBBCode</id>
<name>Box BBCode</name>
<version>1.2</version>

<file name="$sourcedir/Subs-Editor.php">
<operation>
<search position="before"><![CDATA[
array(
'image' => 'quote',
'code' => 'quote',
'before' => '[quote]',
'after' => '[/quote]',
'description' => $txt['bbc_quote']
),]]</search>
<add><![CDATA[
array(
'image' => 'box',
'code' => 'box',
'before' => '[box title=TitleBox]',
'after' => '[/box]',
'description' => $txt['box_bbcode']
),
array(),]]></add>
</operation>
</file>

<file name="$sourcedir/Subs.php">
<operation>
<search position="before"><![CDATA[
array(
'tag' => 'blue',
'before' => '<span style="color: blue;" class="bbc_color">',
'after' => '</span>',
),]]></search>
<add><![CDATA[
array(
'tag' => 'box',
'parameters' => array(
'class' => array('optional' => true, 'value' => ' $1', 'match' => '([\w-]+)'),
),
'before' => '<fieldset class="box_bbcode{class}">',
'after' => '</fieldset>',
'block_level' => true,
),
array(
'tag' => 'box',
'parameters' => array(
'title' => array('value' => '$1', 'match' => '([\w\s\x]{0,192}?)'),
'hlink' => array('value' => '$1', 'match' => '(http://[\w.]+/?\S*?)'),
'class' => array('optional' => true, 'value' => ' $1', 'match' => '([\w-]+)'),
),
'before' => '<fieldset class="box_bbcode{class}"><legend><a href="{hlink}" target="_blank">{title}</a></legend>',
'after' => '</fieldset>',
'block_level' => true,
),
array(
'tag' => 'box',
'parameters' => array(
'title' => array('optional' => true, 'value' => '$1', 'match' => '([\w\s\x]{0,192}?)'),
'link' => array('optional' => true, 'value' => ' <a href="$1" target="_blank">$1</a>', 'match' => '(http://[\w.]+/?\S*?)'),
'class' => array('optional' => true, 'value' => ' $1', 'match' => '([\w-]+)'),
),
'before' => '<fieldset class="box_bbcode{class}"><legend>{title}{link}</legend>',
'after' => '</fieldset>',
'block_level' => true,
),
array(
'tag' => 'box',
'before' => '<fieldset class="box_bbcode">',
'after' => '</fieldset>',
'block_level' => true,
),]]></add>
</operation>
</file>

<file name="$themedir/css/index.css">
<operation>
<search position="end" />
<add><![CDATA[

/* Box BBCode */
.box_bbcode { margin: 10px 50px 10px 50px; border: 1px solid #ADADAD; }
.box_bbcode legend {color: #476C8E }
]]></add>
</operation>
</file>

</modification>


The button won't show but the bbc tag works^^

Is there any documentation about the fillable parameters of the tag ?
Title: Re: Box BBCode
Post by: aelmiger on July 23, 2011, 10:05:17 PM
Please upgrade to 2.0 version
Title: Re: Box BBCode
Post by: Cereus on December 08, 2011, 11:13:05 PM
Quote from: aelmiger on July 23, 2011, 10:05:17 PM
Please upgrade to 2.0 version

Enforcing the request.

See you.
Title: Re: Box BBCode
Post by: SSimple Team on December 25, 2011, 08:22:21 PM
Patience, we are the team with more mods in smf and we are working on versions of our mods. Besides having 51 official mods, we have over 70 mods and one Portal unofficial, so we have a lot of work and time is a tyrant. So I ask for your patience.
Thank you for understanding
Title: Re: Box BBCode
Post by: Apllicmz on December 26, 2011, 05:44:53 AM
Nice work
when Update Mod Dont forget Portuguese files

<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end" />
                <add><![CDATA[
//    Box BBCode Translate by Candidosa2
$txt['box_bbcode'] = 'Inserir a Caixa';]]></add>
        </operation>
    </file>
   
    <file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
                <add><![CDATA[
//    Box BBCode Translate by Candidosa2
$txt['box_bbcode'] = 'Inserir a Caixa';]]></add>
        </operation>
    </file>
   
    <file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
        <operation>
            <search position="end" />
                <add><![CDATA[
//    Box BBCode Translate by Candidosa2
$txt['box_bbcode'] = 'Inserir a Caixa';]]></add>
        </operation>
    </file>
   
    <file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">
        <operation>
            <search position="end" />
                <add><![CDATA[
//    Box BBCode Translate by Candidosa2
$txt['box_bbcode'] = 'Inserir a Caixa';]]></add>
        </operation>
    </file>

Title: Re: Box BBCode
Post by: Cereus on December 26, 2011, 06:45:59 AM
Quote from: SSimple Team on December 25, 2011, 08:22:21 PM
Patience, we are the team with more mods in smf and we are working on versions of our mods. Besides having 51 official mods, we have over 70 mods and one Portal unofficial, so we have a lot of work and time is a tyrant. So I ask for your patience.
Thank you for understanding

And we understand. I just enforce it because the last post is from July.
Title: Re: Box BBCode
Post by: Jessica. on April 09, 2012, 11:12:02 AM
update for 2.0.2 please?
Title: Re: Box BBCode
Post by: Jack_40k on January 27, 2013, 07:05:27 PM
Quote from: Jessica. on April 09, 2012, 11:12:02 AM
update for 2.0.2 please?

+1 Any chance of an update?
Title: Re: Box BBCode
Post by: N i g h t m a r e on October 03, 2013, 03:24:46 PM
How could i possibly add IMG tags into the title?

so:


[box title=[img]http://myimage.com[/img]] {Text Here}[/box]


...?
Title: Re: Box BBCode
Post by: br360 on March 28, 2014, 06:37:13 PM
I know this is an older topic, but just found this mod so my apologies in advance for bumping it.

I am on version 2.0.7, and when I uploaded the mod, I didn't get the "this mod won't work on your version" or "is corrupt" message, so I didn't have to emulate. I did get a test failed message in ./Sources/Subs-Editor.php, but when I went to parse the code that the warning suggested, the part it wanted me to add new code after, didn't even exist in my subs-editor file.

This one- (does not exist)
'quote' => array('code' => 'quote', 'before' => '[quote]', 'after' => '[/quote]', 'description' => $txt['bbc_quote']),

I also saw a "File Not Found" message in -./Themes/default/style.css.

This being just a test site, I installed it anyway, and it works fine. There is no icon in my bbc list when replying or starting a topic, but since I would plan to have only admins use this, I have no problem with that at all. I can still manually type in all the different attributes manually into a post, and everyone works great.

I also tried to look at the files in the smf mod parser, and none of them existed in any of my files. I'm guessing that a lot changed from when this mod was written for 2.0 RC1.2 to 2.0.7, but just odd that for the most part it works great- installs and uninstalls with no other errors than the warning I received above.

Besides being a little curious how this happened, is there any issue with keeping this mod installed, even though I can't find what file edits were done?
Title: Re: Box BBCode
Post by: qubbah on September 06, 2017, 11:25:14 AM
One problem when we put in the text that have : or ' in [box title=TitleBox-here-][/box] the code not function.