miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

Adding a "Custom HTML" button to the post form?

 
Author Guest
~
#1 | Posted: 3 Jul 2010 02:58 
Hi,

would it be possible to add a "Custom HTML" button right next to the others (B, I, Image, Link) on the post form? Just a basic function which allows every HTML command (no restrictions)?

Should I add something to bb_codes.php and main_post_form.html?

Thanks in advance :-)

Author Paul
Lead Developer 
#2 | Posted: 5 Jul 2010 02:48 
HTML is disabled by default in miniBB, and we don't recommend to enable it, for security purposes. Besides simply adding the button, you need to care a lot of things - that's right, in bb_codes.php, too.

By default, miniBB has a hidden option, under setup_options.php you may specify:

$adminHTML=TRUE;
it will allow direct HTML posts for admins and moderators.

If you mean the special BB code which would allow certain pieces of HTML in the posted messages, I'm afraid it's even more difficult :-) We don't have such code right now.

Author Guest
~
#3 | Posted: 5 Jul 2010 09:24 
Thank you for your help, would that setting ( $adminHTML=TRUE; ) require me to always use html? Or can I switch between normal use and HTML, if so, how (button/tags)?

Thanks once again :-)

Author Paul
Lead Developer 
#4 | Posted: 6 Jul 2010 03:07 
This is for logged admin and moderators only. No button. Try to enable this setting and post straight HTML code in the message form, it should work.

Author Guest
~
#5 | Posted: 6 Jul 2010 12:28 
Let's say I just wanted just to implent html tags ( [bbhtml] and [/bbhtml] ), what else would I have to take a look at? I have this so far:

https://www.minibb.com/forums/storage/screenshots/53bbhtml.pngHTML

Author Paul
Lead Developer 
#6 | Posted: 7 Jul 2010 02:34 
You have to look at 3rd party codes which may work for other boards or software... It's not that simple like just putting something between HTML tags (and it's actually wrong). If you want such BB code, it's should be a VERY complicated function. Like I wrote earlier, we don't have anything related at the moment. And I can't program it within 15 minutes :-) It's a lot of work, including security-related work.

Author Guest
~
#7 | Posted: 7 Jul 2010 04:34 
This is difficult because we talk about partial piece of text. As Paul mentions, miniBB supports option to not BB-code the text for admins or moderators. But this is for the whole text.

For leaving part of the text intact, you should rack not bb_codes.php, but bb_func_txt.php where it calls enCodeBB() function. This function should not be applied to the whole text, but only to some parts of this text. Most probably, you should use preg_match_all to determine all such pieces, then program a loop cycle to apply enCodeBB to the other pieces of text.

When editing the message, there is otherwise algorithm.

Author OP
Guest
#8 | Posted: 7 Jul 2010 07:02 
Thanks to both of you for your information, I had no idea of what would be involved in implementing these tags. Also, nice of you to fix the IMG tags in my previous post :-).

Cheers

Author Paul
Lead Developer 
#9 | Posted: 7 Jul 2010 08:10 
As usually, I must offer this: if you have a budget, we could try to develop such kind of add-on :-) It definitely takes at least $50 as for 2,5 hours of our work, may be more.

The idea proposed above by Guest is nice, too. May be it's the most proper solution, I could say.

Specific miniBB Support Forums / Specific /
 Adding a "Custom HTML" button to the post form?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑