miniBB Support Forums | 16 years on The Web
miniBB ® 


 | Begin | Register | Reply | Search | Statistics | File Bank | Manual |
Suggestions miniBB Support Forums / Suggestions /   

Avoiding [youtube=null] on cancel?

Author tom322
Active Member
#1 | Posted: 9 Oct 2014 22:13 | Edited by: tom322 
Currently the Youtube video Javascript prompt looks like:

<a href="JavaScript:paste_strinL(selektion,4,'[youtube='+prompt('YouTube%20movie%20URL:','')+']','','')" onmousemove="pasteSel()"><img src="" style="width:23px;height:22px" alt="" title="Insert YouTube video"></a>

A small 'issue' is that after clicking on the Cancel button, the following is still pasted into the form:


It seems the code is almost the same as for the URL, so I'm not sure it behaves differently with the youtube link.. Ideally, there should be nothing pasted when user clicks on the Cancel button.

Author Paul
Lead Developer
#2 | Posted: 10 Oct 2014 16:29 
Here's the exact code:

if(bbCode1=='[youtube=null]') { bbCode1=''; bbCode2=''; myValue=''; }

You need to put it before the line saying


of templates/form.js -> function insertAtCursor.

If you confirm it works on your end, I could add it to the TODO list for YouTube add-on for the future.

Author tom322
Active Member
#3 | Posted: 10 Oct 2014 16:57 
Thank you Paul, will be testing today and post the results here.

Author tom322
Active Member
#4 | Posted: 10 Oct 2014 18:51 
I can confirm the change works correctly, thank you!

Suggestions miniBB Support Forums / Suggestions /
 Avoiding [youtube=null] on cancel?
 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 our forum posting rules. If not, it may be locked or deleted 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
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.