miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Suggestions miniBB Support Forums / Suggestions /   

Avoiding [youtube=null] on cancel?

Author tom322
#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="{$main_url}/img/button_youtube.gif" 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
#3 | Posted: 10 Oct 2014 16:57 
Thank you Paul, will be testing today and post the results here.

Author tom322
#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? Top

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

 Short link for this topic:

Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

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 ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB