miniBB ® 

miniBB

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

How should BB codes be used when browsers ban JavaScript?

 
Author Guest
~
#1 | Posted: 16 May 2017 15:19 
Hello, Paul,
What should I do if I want to use BB codes in a new topic when I'm blocking JavaScript in my browser?

Author Paul
Lead Developer 
#2 | Posted: 16 May 2017 16:10 
JavaScript is only used for inserting codes dynamically (respectively, from BB-code-buttons located above the message form) and for example, for quoting messages on the way. However you could merely use all these codes manually as well, typing them directly in the form. You should only follow the proper format of the code of making sure it will be transformed into certain HTML. BB codes are in no way related to the direct JavaScript.

Author Guest
~
#3 | Posted: 16 May 2017 16:16 
Paul
Sorry, maybe I didn't make it clear.
I mean, how do you get the BB code button above the new topic to display properly when the browser prohibits JavaScript?
Because shielding JavaScript, it disappeared.

Author Paul
Lead Developer 
#4 | Posted: 16 May 2017 16:26 
Guest:
I mean, how do you get the BB code button above the new topic to display properly when the browser prohibits JavaScript?
Because shielding JavaScript, it disappeared.
It's logical. You could not use BB-code buttons unless you have JavaScript disabled, because their functions are based on the pure JavaScript.
No JavaScript = no functions, no buttons.
But still, it's possible to use straight BB codes.

Author Guest
~
#5 | Posted: 16 May 2017 19:44 
Paul
For some reason, I need the whole process to prohibit loading JS, to prohibit loading JS browser can fully use all the features, can help me modify it? I can pay for it.

Author Guest
~
#6 | Posted: 16 May 2017 19:47 
All need to load JS where the way to be replaced by other ways to achieve.
Including reply, including references, etc ...

Author tom322
Active Member
#7 | Posted: 16 May 2017 20:54 
I don't think it's possible to emulate JS without using JS; the only alternative is the manual way, ie. typing in BB-codes and manually go down to the form to enter message.

Author Paul
Lead Developer 
#8 | Posted: 16 May 2017 22:19 
Guest:
All need to load JS where the way to be replaced by other ways to achieve.
Including reply, including references, etc ...
If you could inform me what "other ways" except JavaScript do you mean, I could at least think of it. Or may be you have some live examples from the other websites/software? not sure.

But like tom322 mentioned, if you have JavaScript disabled in the browser, there is no way to execute JavaScript-based functions. That also means, there is no sense to display BB-code buttons just for decoration, and other functional links as well.

Author Guest
~
#9 | Posted: 16 May 2017 22:48 
Paul
tom322

Oh, I can not think of any other way.
I just want to know if there is no alternative way to replace JavaScript-based functionality when the browser does not allow JavaScript. Because my users often can not normally use JS, and they will not enter the BB code.

Author Paul
Lead Developer 
#10 | Posted: 17 May 2017 00:03 
Guest:
I just want to know if there is no alternative way to replace JavaScript-based functionality when the browser does not allow JavaScript.
As far as I know, JavaScript is the only common way to build a simple bridge of functions communication on the client side.

But... why are your users limited with JavaScript? May be you would need to start from there...

If you search by "javascript alternative" you will see there are quite a lot of projects which pretend for being called so:CoffeScript, TypeScript, Babel, Haxe etc. However I'm not sure how useful they could be for miniBB functions. They appear being for standalone apps, and anyway, the final way of their appearance is JavaScript inclusion.

Guest:
they will not enter the BB code
You could put BB-code's formatting near the message form with explanation. Then your users could just copy them and paste into the message, substituting the necessary text. It will work even on old touch screen devices.

Author Guest
~
#11 | Posted: 17 May 2017 06:43 
Paul

Thanks Paul, i will try to put the BB code in the format :)
But the Private Messaging Service send button is also achieved through the JS, this can be changed to "start new topic" to submit the button that way? Because "start new topic" does not use the JS function.

Author Paul
Lead Developer 
#12 | Posted: 17 May 2017 12:26 
Guest:
But the Private Messaging Service send button is also achieved through the JS, this can be changed to "start new topic" to submit the button that way? Because "start new topic" does not use the JS function.
"Start new topic" and "Post message" buttons all use JavaScript by default (it checks the submitted form for basic errors). But there's in the template is a default <noscript> code which handles straight events.

For PM add-on the Submit button is defined in addon_pmail_options.php - check below the $loginLogout option. There you may add the following code:

<noscript><input type="submit" value="{$l_pmSend}" class="inputButton" tabindex="5" /></noscript>
as it's similarly provided in templates/main_post_area.html. This code actually substitutes the code for browsers with disabled JavaScript and it will not check for native form errors for sure, making straight submission - in this case, be prepared that if the form misses something, you may see the PHP script's error on the screen, and the form contents may be lost.

Author Guest
~
#13 | Posted: 17 May 2017 18:00 
Paul

Thank you very much!
I can directly change to

<input type="submit" value="'.$l_pmSend.'" class="inputButton" tabindex="5" />
can also be sent.

Paul, you and your minibb are great!

Author Paul
Lead Developer 
#14 | Posted: 17 May 2017 23:04 
Thanks :) Enjoy your forum!

How To miniBB Support Forums / How To /
 How should BB codes be used when browsers ban JavaScript?
 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
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑