News:

Join the Facebook Fan Page.

Main Menu

Box BBCode

Started by vbgamer45, March 02, 2009, 12:39:44 PM

Previous topic - Next topic

.LORD.

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  :)

Özgür

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]
So Long

.LORD.

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.


Özgür

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 =)
So Long

.LORD.

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 :)

Özgür

Thats work. Thanks .LORD. =)
So Long

.LORD.

Your welcome, if you like let me know the results  :P


Smog

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.

Özgür

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/
So Long

yura_mdj

.LORD. help me.

I use MS IE 7 & Firefox 3.0.4

I installed your mod package version 1.1

Özgür

Download package and move "box.gif" to "./Themes/yourtheme/images/bbc".
So Long

.LORD.

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´ :)

yura_mdj

Özgür´ .LORD. Thank you very much, problem solved

TDNY

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

.LORD.

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.

PHPLearner

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

.LORD.

Your welcome  :)

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


Cal O'Shaw

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

.LORD.

@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.

Advertisement: