Advertisement:

Author Topic: URL Popup  (Read 20461 times)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
URL Popup
« on: February 03, 2014, 01:52:22 PM »
Link to Mod

When posting in the editor, the URL bbcode is often considered unfriendly. This mod modifies it so that instead of just adding [url][/url] tags in the editor area, it prompts the user for a website address and optional name and then inserts the relevant bbcode for it.

It does not attempt to modify the WYSIWYG behaviour (but then again, the WYSIWYG behaviour is intentionally different; you're supposed to write the text, then highlight it before pressing the button to make it a link anyway)

Released under the CC0 licence
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline meetdilip

  • Jr. Member
  • **
  • Posts: 272
  • Gender: Male
Re: URL Popup
« Reply #1 on: February 03, 2014, 09:02:02 PM »
Life saver :)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #2 on: February 03, 2014, 09:04:37 PM »
The really odd thing is I wrote this almost 4 years ago just never published it here...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Jeffrey King

  • Semi-Newbie
  • *
  • Posts: 10
Re: URL Popup
« Reply #3 on: February 03, 2014, 09:08:26 PM »
heh heh. Funny!

Offline NekoJonez

  • Full Member
  • ***
  • Posts: 501
  • Gender: Male
  • Stuff
    • @NekoJonez on Twitter
    • My blog
Re: URL Popup
« Reply #4 on: February 04, 2014, 12:39:49 PM »
I don't get this working nicely.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #5 on: February 04, 2014, 12:41:11 PM »
I don't know what you mean.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline NekoJonez

  • Full Member
  • ***
  • Posts: 501
  • Gender: Male
  • Stuff
    • @NekoJonez on Twitter
    • My blog
Re: URL Popup
« Reply #6 on: February 04, 2014, 12:45:50 PM »
When I click on the URL button, I don't get the pop-up. And I don't get the description thing.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #7 on: February 04, 2014, 12:49:02 PM »
Using WYSIWYG?
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline NekoJonez

  • Full Member
  • ***
  • Posts: 501
  • Gender: Male
  • Stuff
    • @NekoJonez on Twitter
    • My blog
Re: URL Popup
« Reply #8 on: February 04, 2014, 01:19:29 PM »
No. But when I use it, it only give me the normal pop up and not for the description .
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #9 on: February 04, 2014, 01:24:41 PM »
That sounds like you're using WYSIWYG...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline NekoJonez

  • Full Member
  • ***
  • Posts: 501
  • Gender: Male
  • Stuff
    • @NekoJonez on Twitter
    • My blog
Re: URL Popup
« Reply #10 on: February 04, 2014, 01:26:18 PM »
I see. Well, maybe I might try to install this mod again.
Retro video game blogger, writer, actor, podcaster and general amazing dude.

Twitter
My Blog

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #11 on: February 04, 2014, 01:29:53 PM »
Or you could turn off WYSIWYG. Here's the thing: the little arrow on the far right, blue arrow inside red [] symbols, is that on or off? If it's on, you're in WYSIWYG and the mod does not touch WYSIWYG for good reason (because you're supposed to highlight text and press URL in WYSIWYG mode)
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline von COLLINZO

  • Semi-Newbie
  • *
  • Posts: 43
  • Gender: Male
  • No Coding, No life!
    • collinsedim on Facebook
    • @@edimcollins on Twitter
    • Leakite Android Blog
Re: URL Popup
« Reply #12 on: February 04, 2014, 01:35:14 PM »
Nice mod, Sir Cumber....

Been looking for a way to get this fixed in my forum.....thanks alot! :D

Offline AllMassive

  • Jr. Member
  • **
  • Posts: 137
  • Gender: Male
Re: URL Popup
« Reply #13 on: February 08, 2014, 08:01:37 AM »
Finally there it is - thank you !

Offline Mr.Truckman

  • Semi-Newbie
  • *
  • Posts: 65
  • Gender: Male
    • mr.seui on Facebook
    • @hugmove on Twitter
    • Mr.Truckman
Re: URL Popup
« Reply #14 on: February 09, 2014, 08:23:18 AM »
I like it ! :D

Offline ApplianceJunk

  • SMF Hero
  • ******
  • Posts: 3,476
    • ApplianceJunk.com
Re: URL Popup
« Reply #15 on: February 09, 2014, 10:47:17 PM »
Awesome, thanks!

Offline Mike L

  • Newbie
  • *
  • Posts: 7
Re: URL Popup
« Reply #16 on: February 13, 2014, 10:57:27 AM »
GREAT!! One of the little things I missed now I'm using SMF.

Just one question: can anyone tell me what "Prevent this page from creating additional dialogues" means in practice, and if there's a best choice?

Cheers  :)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: URL Popup
« Reply #17 on: February 13, 2014, 12:27:12 PM »
That's a Firefox thing, totally unrelated to this MOD. I think it detects a certain number of JS messages and asks you if you want to now show them anymore.
But this MOD (or SMF itself, for the same reason) have nothing to do with it.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #18 on: February 13, 2014, 12:32:59 PM »
Not *totally* unrelated because the URL prompt itself is one of those 'additional dialogues' it talks about. There are people out there who thought it would be funny to lock a browser up with infinite loops of such prompts.

Just don't prevent the page while you're posting to SMF, because you should not need to do so.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline IMSassafras

  • Jr. Member
  • **
  • Posts: 108
  • Gender: Female
    • @saynotomsg on Twitter
    • Mackinac Coast Eyewear
Re: URL Popup
« Reply #19 on: March 20, 2014, 10:25:40 PM »
I am not able to get it to work.  I checked to see if I was doing it right.  Not using WYSIWYG.  Trying to select text and click the url button.  And trying to click the url button and write text.  No pop up appears.  The only time a box appears is when I am in WYSIWYG mode which has nothing to do with your mod.  I checked by uninstalling.

Is there a trick?

Sass
It is not for him to pride himself who loveth his own country, but rather for him who loveth the whole world. The earth is but one country, and mankind its citizens. ~ Bahá'u'lláh
________________________
MisFiT City Forum - Where Attitudes are Nourished and Being a MisFiT is Just Part of the Day!
Say NO to MSG.com - Dedicated to creating public awareness of Monosodium Glutamate and other excitotoxins.

Offline radu81

  • Jr. Member
  • **
  • Posts: 316
  • Gender: Male
Re: URL Popup
« Reply #20 on: May 05, 2014, 02:19:51 PM »
Simple and powerful, thank you Arantor!
sorry for my bad english

Offline Buneduggy

  • Semi-Newbie
  • *
  • Posts: 95
  • Gender: Male
    • NorCalWheelers
Re: URL Popup
« Reply #21 on: May 07, 2014, 09:17:29 PM »
The really odd thing is I wrote this almost 4 years ago just never published it here...

I just saw this on here and wanted to thank Arantor for this mod. I have been using it for years and it has always worked flawlessly.

Offline fapencio

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
    • medilibros
Re: URL Popup
« Reply #22 on: July 30, 2014, 01:22:32 PM »
Hi @‽  Arantor, your mod is awesome, but i have a problem, in the body post without WYSIWYG the mod write this:

Code: [Select]
[url=http://myurl.com]titleofmyurl[/url][url][/url]
i have to delete manually this:
Code: [Select]
[url][/url] for the mod works, please help

My smf forum is 2.0.10 version
my theme is default
language spanish es utf8

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #23 on: July 30, 2014, 01:24:06 PM »
What other mods are you using? This does not happen when this is the only mod installed.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline fapencio

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
    • medilibros
Re: URL Popup
« Reply #24 on: August 01, 2014, 10:57:43 AM »
What other mods are you using? This does not happen when this is the only mod installed.

Hi Arantor @‽  my mods:

1.   QR Code BBcode    1.0.1     
2.   IMG Popup    1.0.2     
3.   Separated Birthdays from Events    1.1.7     
4.   SMF 2.0.8 Update    1.0     
5.   Enhanced PM System    1.1     
6.   Countdown BBCode    2.0.2     
7.   Reason For Editing Mod    2.3.2     
8.   Enhanced Dropdown    1.3     
9.   Post_Board_Select    1.3     
10.   Tabbed smileys    0.3.99c 
11.   URL Popup    1.0.2 

thanks
My smf forum is 2.0.10 version
my theme is default
language spanish es utf8

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #25 on: August 01, 2014, 10:59:37 AM »
Does it behave if you uninstall img popup?
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline fapencio

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
    • medilibros
Re: URL Popup
« Reply #26 on: August 01, 2014, 03:24:22 PM »
Does it behave if you uninstall img popup?

yes, but a new problem emerged in the second pop-up window that appears:



help please (i uninstall img popup)
My smf forum is 2.0.10 version
my theme is default
language spanish es utf8

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #27 on: August 01, 2014, 03:25:58 PM »
o.O I have no idea what's hapened there. I'll see if I can find some time to investigate but I am pretty swamped with paid mod work right now.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline fapencio

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
    • medilibros
Re: URL Popup
« Reply #28 on: August 01, 2014, 03:46:50 PM »
o.O I have no idea what's hapened there. I'll see if I can find some time to investigate but I am pretty swamped with paid mod work right now.

i uninstall your mod, url popup, and I installed again, an now work perfect!!!!!!

but now I'm afraid to install the mod img popup  :(
My smf forum is 2.0.10 version
my theme is default
language spanish es utf8

Offline Steve

  • Support Specialist
  • SMF Hero
  • *
  • Posts: 4,220
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: URL Popup
« Reply #29 on: August 01, 2014, 04:03:33 PM »
Backup your database and try it. If it doesn't work, uninstall it and live without one or the other until he gets time to look at the problem. :P
Online Manual

Please do not PM me for support.

Offline fapencio

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Male
    • medilibros
Re: URL Popup
« Reply #30 on: August 01, 2014, 04:36:43 PM »
Backup your database and try it. If it doesn't work, uninstall it and live without one or the other until he gets time to look at the problem. :P

I tested several modifications to the code until I came to the solution, it is important and mandatory to have installed both mods, both url popup as img popup when installing the second mod installation error which should ignore appear, then open the file called editor.js found in the Themes/default/scripts/editor.js route or in your forum theme, I leave the solution:

if you installed first URL POPUP and then IMG POPUP

in editor.js
search:
Code: [Select]
// URL popup?
if (oButtonProperties.sCode == 'url')
{
// Ask them where to link to.
var sText = prompt(oEditorStrings['prompt_text_url'], 'http://');
if (!sText)
return;

var sDesc = prompt(oEditorStrings['prompt_text_desc']);
if (!sDesc || sDesc == '')
sDesc = sText;

var bbcode = '[url=' + sText + ']' + sDesc + '[/url]';
replaceText(bbcode.replace(/\\n/g, '\n'), this.oTextHandle);
}
// Replace?
else if (!('sAfter' in oButtonProperties) || oButtonProperties.sAfter == null)

replace:
Code: [Select]
// URL popup?
if (oButtonProperties.sCode == 'url')
{
// Ask them where to link to.
var sText = prompt(oEditorStrings['prompt_text_url'], 'http://');
if (!sText)
return;

var sDesc = prompt(oEditorStrings['prompt_text_desc']);
if (!sDesc || sDesc == '')
sDesc = sText;

var bbcode = '[url=' + sText + ']' + sDesc + '[/url]';
replaceText(bbcode.replace(/\\n/g, '\n'), this.oTextHandle);
}
// IMG popup?
else if (oButtonProperties.sCode == 'img')
{
// Ask them where to link to.
var sText = prompt(oEditorStrings['prompt_text_url'], 'http://');
if (!sText)
return;

var bbcode = '[img]' + sText + '[/img]';
replaceText(bbcode.replace(/\\n/g, '\n'), this.oTextHandle);
}
// Replace?
else if (!('sAfter' in oButtonProperties) || oButtonProperties.sAfter == null)

if you installed first IMG POPUP and then URL POPUP

in editor.js
search:
Code: [Select]
// IMG popup?
if (oButtonProperties.sCode == 'img')
{
// Ask them where to link to.
var sText = prompt(oEditorStrings['prompt_text_url'], 'http://');
if (!sText)
return;

var bbcode = '[img]' + sText + '[/img]';
replaceText(bbcode.replace(/\\n/g, '\n'), this.oTextHandle);
}
// Replace?
else if (!('sAfter' in oButtonProperties) || oButtonProperties.sAfter == null)

replace:
Code: [Select]
// IMG popup?
if (oButtonProperties.sCode == 'img')
{
// Ask them where to link to.
var sText = prompt(oEditorStrings['prompt_text_url'], 'http://');
if (!sText)
return;

var bbcode = '[img]' + sText + '[/img]';
replaceText(bbcode.replace(/\\n/g, '\n'), this.oTextHandle);
}

// URL popup?
else if (oButtonProperties.sCode == 'url')
{
// Ask them where to link to.
var sText = prompt(oEditorStrings['prompt_text_url'], 'http://');
if (!sText)
return;

var sDesc = prompt(oEditorStrings['prompt_text_desc']);
if (!sDesc || sDesc == '')
sDesc = sText;

var bbcode = '[url=' + sText + ']' + sDesc + '[/url]';
replaceText(bbcode.replace(/\\n/g, '\n'), this.oTextHandle);
}
// Replace?
else if (!('sAfter' in oButtonProperties) || oButtonProperties.sAfter == null)

thats all, best regards
My smf forum is 2.0.10 version
my theme is default
language spanish es utf8

Offline CarefreeSadie

  • Semi-Newbie
  • *
  • Posts: 10
    • Non-Conformists
Re: URL Popup
« Reply #31 on: August 05, 2014, 04:09:21 PM »
Thank you very much for creating this mod.  I like it a lot.

Offline Taifuuni

  • Newbie
  • *
  • Posts: 5
Re: URL Popup
« Reply #32 on: August 18, 2014, 10:09:08 AM »
Anyway to modify this to automatically input selected text to the URL name input box?

I mean this:

1. Write something.
2. Highlight a word/words.
3. Press URL button.
4. URL popup appears and you input the URL you want.
5. You press OK and in the URL name input box, you already have the word/words you have highlighted on step 2.
6. You press OK and you get the proper url bbcode.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #33 on: August 18, 2014, 10:51:58 AM »
IIRC it would need a rewrite to do that and I don't have time at present, sorry.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline CarefreeSadie

  • Semi-Newbie
  • *
  • Posts: 10
    • Non-Conformists
Re: URL Popup
« Reply #34 on: August 26, 2014, 03:05:12 PM »
Thank you very much for this mod.  I used one before and now after moving to 2.08 I have installed this one.  It works perfectly and the users are happy.  Thank you again.

Offline unseenua

  • Newbie
  • *
  • Posts: 8
Re: URL Popup
« Reply #35 on: October 01, 2014, 04:04:06 AM »
Anyway to modify this to automatically input selected text to the URL name input box?

I mean this:

1. Write something.
2. Highlight a word/words.
3. Press URL button.
4. URL popup appears and you input the URL you want.
5. You press OK and in the URL name input box, you already have the word/words you have highlighted on step 2.
6. You press OK and you get the proper url bbcode.

You can do it by self. Here are how I did this:

1. Open editor.js and add to beginning this code:

Code: [Select]
/* Here we get selected text for URL popup when RichText is in Disabled mode */
function getSelectionText() {
    var text = "";
    if (window.getSelection) {
        text = window.getSelection().toString();
    } else if (document.selection && document.selection.type != "Control") {
        text = document.selection.createRange().text;
    }
    return text;
}

2. Find string "URL popup?" and replace the code below on this one:
Code: [Select]
// URL popup?
if (oButtonProperties.sCode == 'url')
{
// Ask them where to link to.
var sText = prompt(oEditorStrings['prompt_text_url'], 'http://');
if (!sText)
return;

var sDesc = getSelectionText();
if (!sDesc || sDesc == '')
var sDesc = prompt(oEditorStrings['prompt_text_desc']);
if (!sDesc || sDesc == '')
sDesc = sText;

var bbcode = '[url=' + sText + ']' + sDesc + '[/url]';
replaceText(bbcode.replace(/\\n/g, '\n'), this.oTextHandle);
}

How it works.
Initially, the script checks to see if the selected text. If it is, it takes it as a description. If no text has been selected, the dialog box appears in which the user is prompted to enter a description. If the user does not enter a description and click OK, script insert raw URL as link anchor.

P.S. Code of function getSelectionText I took from hxxp:stackoverflow.com/questions/5379120/get-the-highlighted-selected-text [nonactive]

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,671
  • Mod King
    • XPtsp.com Community
Re: URL Popup
« Reply #36 on: December 29, 2014, 07:06:19 PM »
Hey, Arantor....  I was wondering if I could get permission from you to use a variation of this mod in order to add a URL prompt to my Sports bbcode mod.  I need it to get the URL from the user, then the mod would go to that URL and get the video ID cause it's just a world of pain to try to find it manually for that particular website....

Thanks in advance for your time!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #37 on: December 29, 2014, 07:10:45 PM »
Go nuts :)
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,671
  • Mod King
    • XPtsp.com Community
Re: URL Popup
« Reply #38 on: December 30, 2014, 04:00:58 AM »
Cool!  Thanks!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline bjornforum

  • Semi-Newbie
  • *
  • Posts: 43
Re: URL Popup
« Reply #39 on: January 26, 2015, 06:17:31 AM »
The code from unseenua doesn't seem to work in Firefox and IE. I found this alternative[/url] (in the answer) that works also in IE and Firefox:

Code: [Select]
function getSelectionText() {
    if (window.getSelection) {
        try {
            var ta = $('textarea').get(0);
            return ta.value.substring(ta.selectionStart, ta.selectionEnd);
        } catch (e) {
            console.log('Cant get selection text')
        }
    }
    // For IE
    if (document.selection && document.selection.type != "Control") {
        return document.selection.createRange().text;
    }
}

P.S. I would like to link to my source but am not allowed to post external links..

Offline live627

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,272
  • Gender: Male
  • Cat: Destroy!
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: URL Popup
« Reply #40 on: January 26, 2015, 07:23:53 PM »
P.S. I would like to link to my source but am not allowed to post external links..
You can now that you've made a post.
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: URL Popup
« Reply #41 on: May 31, 2015, 07:05:53 AM »
Just been alerted to and proved that this mod causes the Safari Browser on and iPad to close when the button is clicked. Using it in Chrome on an iPad just freezes Chrome with the popup window visible, can't click OK or Cancel.

Am just installing Safari on a Win 8.1 box to test and will report.

My and my friend's iPads both show the same issue, we're both on iOS 8.3
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 190
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: URL Popup
« Reply #42 on: May 31, 2015, 10:01:34 PM »
Just tested on Safari on iPhone running iOS 8.3 and it crashed.

Offline Robomcd

  • Semi-Newbie
  • *
  • Posts: 46
  • Gender: Male
    • Newcastles of the World Forum
Re: URL Popup
« Reply #43 on: March 01, 2016, 01:37:19 PM »
Thanks, just installed it. Works great for our not-internet savvy target group   ;D

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: URL Popup
« Reply #44 on: April 30, 2016, 01:19:58 PM »
Hi Arantor,

Any way to remove the "http://" from the input box? We have many users with tablets that do not automatically overwrite it when pasting in a URL. Works OK on a PC as it's pre highlighted but with iPad and some other devices the highlighting is cancelled when pasting in the URL so you get two "http://"s and have to edit the box. Seems a bit superfluous anyway when copying and pasting a URL, as they always have the http:// included even if it does not show in the address bar.

I tried changing this:

Code: [Select]
var sText = prompt(oEditorStrings['prompt_text_url'], 'http://');
to this

Code: [Select]
var sText = prompt(oEditorStrings['prompt_text_url'], '');
but it made no difference, the http:// was still there.

I uninstalled the mod and edited the editor j script file to remove all hard coded 'http://' s but still there so gave up.

I don't use the WYSIWYG editor at all. I checked the BBC code too for the button but editing that to failed to remove the http:// from the box so reinstalled your mod and told folk to edit the dialog but it would be nice to be able to remove it.

If it's simply, no, can't be done then fair enough but had to ask.

Thanks
Chas.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: URL Popup
« Reply #45 on: April 30, 2016, 02:15:11 PM »
That should generally do it for non WYSIWYG but if you only edited the file, you might still be using an old cache version, so edit it then do a hard refresh or clear your cache manually.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Chas Large

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,101
  • Gender: Male
  • Running 2.0.xx on Apache.
    • Chas.Large on Facebook
    • https://www.linkedin.com/in/charles-large-568ba213 on LinkedIn
    • @https://twitter.com/ on Twitter
    • Chas Large's Site
Re: URL Popup
« Reply #46 on: May 02, 2016, 04:19:07 PM »
That should generally do it for non WYSIWYG but if you only edited the file, you might still be using an old cache version, so edit it then do a hard refresh or clear your cache manually.

Arghhh, the dreaded cache. I did clear the browser cache but not the forum cache. Doing both and reloading did indeed do the job.

Thanks.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Offline Rock Lee

  • SMF Hero
  • ******
  • Posts: 1,486
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: URL Popup
« Reply #47 on: May 07, 2016, 01:33:19 PM »
@Arantor It looks little but here I leave the translation to the Latin Spanish ... I'll use it without hesitation to something I have in mind!

Modifications.spanish_latin-utf8.php and Modifications.spanish_latin.php
Code: [Select]
$txt['prompt_text_desc'] = 'Por favor, introduzca el texto de lo que debe decir el enlace.';

Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,640
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: URL Popup
« Reply #48 on: September 11, 2016, 06:42:30 AM »
Hmm I've installed this but I can't get it to work. I've got WYSIWYG disabled across the board because people paste some weird stuff and it is a disaster so I know it's not that. I don't have any other BBC mods installed either. Any tips? I can't find any settings either. Using Chrome if that makes a difference (but I sure hope not) :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring forum: Color Me Forum/Patreon.

Offline DJ Doena

  • Semi-Newbie
  • *
  • Posts: 15
Re: URL Popup
« Reply #49 on: October 30, 2016, 05:27:41 AM »
Hi,

just installed it on 2.0.12. Unfortunately it simply overwrites any selected text and asks for a new description. Is there an updated version of this mod that already contains the "GetSelectedText" feature?

Offline Kolya

  • Full Member
  • ***
  • Posts: 422
  • systemshock.org
Re: URL Popup
« Reply #50 on: March 04, 2017, 08:04:43 AM »
This uses the selected text to create a link. It only prompts for linktext if no text was selected before.
Tested in Firefox, Chrome and IE 11.

Offline Dwev

  • Jr. Member
  • **
  • Posts: 202
Re: URL Popup
« Reply #51 on: January 12, 2018, 05:58:56 AM »
@ Kolya: I tested the version listed on the Mod-page and was pretty happy with it.

Luckily I checked this thread as well, because this version is even better, thank you very, very much!   ;D

Offline franhaselden

  • Semi-Newbie
  • *
  • Posts: 12
Re: URL Popup
« Reply #52 on: January 14, 2018, 02:12:20 PM »
Just gave the 1.0.3 and don't see any change... Using WYSIWG. Any ideas how to debug?

Offline Kolya

  • Full Member
  • ***
  • Posts: 422
  • systemshock.org
Re: URL Popup
« Reply #53 on: January 14, 2018, 02:37:54 PM »
Uninstall the previous version, install 1.0.3.
Select some text in the editor, click the link button. Enter a URL.
The text you selected is used as link-text.

Offline Rock Lee

  • SMF Hero
  • ******
  • Posts: 1,486
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: URL Popup
« Reply #54 on: February 12, 2018, 08:10:10 PM »
Luckily I found it again I had lost it from my bookmarks :'(


Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!