BbCodes & Buttons Manager

BbCodes & Buttons Manager 3.3.5

No permission to download
Please, How can I disable links and HTML for registered and new users?
For links (tags: url, email), click on "Bb Codes options (Xen)" and go at the bottom of the page.
For HTML (& code & php tags), I didn't include a way to disable these tags by usergroups. It can now easily be done, but I doubt it's really useful. Is there any particular reasons you don't want your users to format html code if they need too?
 
For links (tags: url, email), click on "Bb Codes options (Xen)" and go at the bottom of the page.
For HTML (& code & php tags), I didn't include a way to disable these tags by usergroups. It can now easily be done, but I doubt it's really useful. Is there any particular reasons you don't want your users to format html code if they need too?

Thanks, I want turn off links to combat spam. Links visible but no clickable
 
1.webp
Every time after Update (update button) TinyMCE Buttons Configuration for Redactor the bbcode icon is disappeared. Resaving configuration of a bbcode returning its icon back.
 
@KiF
If you don't use the last version of this addon, update it.
If you use the last version, I will need an access to the library directory of this addon and probably a temporary admin account. If they can't be provided, I can't do anything.
 
cclaerhout updated BbCodes & Buttons Manager with a new update entry:

Version 2.3.2 released

Version 2.3.2 released
  • Fix a bug when saving a Redactor Config (the custom buttons icons were reset). Thanks to @KiF
Explanation: when saving an editor config, the buttons data are retrieved with a custom request to the database. This request targets only the needed fields to avoid to insert unnecessary data in the registry. I forgot to add the new fields for Redactor Css Icons among the needed fields list, so the redactor button configuration was reset (since it was...

Read the rest of this update entry...
 
Last edited:
I didn't find this with some Googling, but thought it sounded interesting. Anyone interested in making a BBCode portal to FontAwesome? Basically a simple BBCode that would allow people to insert any of the FontAwesome icons. People would have to look up the icons, but it's just a simple copy and paste and then they'd have access to the entire library of 369 icons in their posts.
http://fortawesome.github.io/Font-Awesome/icons/

For example, the following might look good in a signature:
[fa]fa-twitter[/fa] @twitterhandle​
This would insert the twitter icon before a link to the persons "twitterhandle" (sorry, I don't use Twitter, so I don't know the proper term for a Twitter username). The Twitter icon would be vector based, so it would look terrific on high resolution displays. Because it is FontAwesome, after a single CSS file, the load on forum and user would be almost zero.
The BBCode for that would be simple. Just replace the BBCode above with:
Code:
<i class="fa fa-twitter"></i>

I'd do it myself, but I think it would be better if there were options to format the icons and that's above my skill level. For example, people could change the color, the size, or rotation:
http://fortawesome.github.io/Font-Awesome/examples/
Perhaps one of the people responsible for all of the FontAwesome resources that keep popping up might be willing to take it on. Someone like @Sheldon, @Matthew Hawley, @Andy.N, @Adam Howard, @Chris Deeming might be interested?

For example, using the Twitter example above, people could change the size and color of the icon, adding a link to their Twitter page. They could do the same for other sites and have a concise row of social media icons in their footer with no image download overhead.

To use it, people would have to add the FA CSS to the PAGE_CONTAINER template. But for anyone who has done that, it seems like something power users might go ahead and run with.

Just a thought... I'm not saying it would be a killer feature, but the costs would be negligible once it was set up. It seems like someone will make it eventually, but I couldn't find it on a Google search.
 
Last edited:
@ForestForTrees
I've never used Font-Awesome, but it looks like it's similar to Icomoon but as a full pack that can't be customized. There might need something to take in consideration with it then, the page loading time. The fonts have many icons and its size seems to be from 40ko to 200ko. I've previously made some tests with a small number of vectorial icons fonts (from icomoon) but repeated many times in a page (about 500 times I think) and it breaks to a certain point (tested on FF). Your idea is good but be sure it will not slow down too much the display of your pages.
 
Great point, Cédric. The suggestion is partially in response to noticing the recent proliferation of resources in the resource manager having to do with fontawesome:
https://www.google.com/search?q=fontawesome+site:xenforo.com
Anyone using these resources will already have added the font-awesome stylesheet to their PAGE_CONTAINER template (or similar), so their visitors will have already downloaded everything. That's the benefit of FA, I guess. It's completely free and once people download it you can use the vector icons wherever you want with no additional downloads. For people like that, I suspect that for them the overhead would be almost zero for both server and user.

I still haven't decided if I'm going to add FA to my site, but I'm definitely intrigued. Some of the resources look very nice and I think that my users really appreciate a little visual interest to their pages.
 
Does anybody have a tutorial on how to edit the visual configuration? I can't seem to move anything around nor add a button to the toolbar. The button is there but it's grayed out.
 
@ForestForTrees
If every developers put the fonts in a different directory, I think they will be loaded several times. A solution would be to use a CDN for fonts like Icomoon propose it in its premium offer. Font-Awesome only uses a CDN for the css (not the fonts). If you create this BbCode, I suggest you to first create a thread in the developer discussions trying to see if there a way developers share a same directory for the fonts. After this, you should also use the BbCode options to allow to format the icon inside a button; possible options: {text}, for the text of the button that will go at the left or at the right of the icon: left/right, to position the text, {backgroundcolor}: background color of the button, {size}: size of the button, small, medium, big (set in the XenForo visual options) ; demo: [fa]fa-twitter[/fa] (only the icon), [fa=big|My Twitter|right|#123456]fa-twitter[/fa] (button with that icon). If you know basic php (loop and conditionals), you should be able to create this addon. Good luck!

Does anybody have a tutorial on how to edit the visual configuration? I can't seem to move anything around nor add a button to the toolbar. The button is there but it's grayed out.
The visual configuration is using the drag & drop feature of jQueryUI. If it doesn't work, check with another browser. You might have a browser plugin that conflict with this library. If it still doesn't work, create me a temporary admin access (only need BBM admin permission) and contact me by pm.
 
Oh, gosh, I'm not much of a developer, so I don't see myself working on this any more than I have. I get little sleep as it is trying to run my nonprofit. But for the record, I'll say that my impression is that the CDN does have the fonts, so they will only be downloaded once if you use that link. Correct me if I'm wrong, but I think that if people use the CDN, the fonts will be taken from there and therefore will only be downloaded once. If someone downloads fontawesome to their own server and links to it from there, duplicate downloads might occur, of course, which definitely seems like something admins should be mindful of when using a shared library.

If someone links to the CDN version, the file begins with:
Code:
@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.eot?v=4.0.3');
  src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
}
My understanding is that relative URLs in CSS are relative to the CSS file, so the fonts referenced in the CDN CSS would be, for example, at http://netdna.bootstrapcdn.com/font-awesome/4.0.3/fonts/fontawesome-webfont.eot?v=4.0.3 . Note that this link does seem to download an appropriate file.
 
I have created Sub bbcode
template: <span style="vertical-align: sub;">{xen:raw $content}</span>

and Super bbcode
template: <span style="vertical-align: super;">{xen:raw $content}</span>

I have an issue with 0 alone with these bbcodes in Redactor.
I can use Text[sub]01[/sub] or Text[sub]0--[/sub] but Text[sub]0[/sub] and Text[super]0[/super] with the 0 alone is not parsing.
cclaerhout can you look at it, please?
 
I have created Sub bbcode
template: <span style="vertical-align: sub;">{xen:raw $content}</span>

and Super bbcode
template: <span style="vertical-align: super;">{xen:raw $content}</span>

I have an issue with 0 alone with these bbcodes in Redactor.
I can use Text[sub]01[/sub] or Text[sub]0--[/sub] but Text[sub]0[/sub] and Text[super]0[/super] with the 0 alone is not parsing.
cclaerhout can you look at it, please?
Uncheck "Do not parse if content is empty". I must have used the php empty function to check this and 0 will make it as empty.
 
  • Like
Reactions: KiF
If not installed TinyMCE some places of this addon linked with MCE functional will cause error (for example: links to mce ltr and rtl visual buttons managers).
Nice to create check for MCE is installed and correct admin templates with this :)

i was add this in BBM_ControllerAdmin_Buttons::actionIndex()
$addonsModel = new XenForo_Model_AddOn;
$addonsArray = $addonsModel->getAllAddOns();
$viewParams = array(
...
'installedMCE' => ((!empty($addonsArray['sedo_tinymce_quattro'])) ? true : false)
);

and added check <xen:if is="{$installedMCE}"> to template bbm_buttons_homepage
 
Last edited:
Top Bottom