Another URL Popup

Started by janilxx, February 11, 2009, 09:06:27 AM

Previous topic - Next topic

janilxx

Link to Mod

This mod will create a popup box when the URL bbc tag is clicked on the post page.

Initial version based on URL Popup 1.0 from http://custom.simplemachines.org/mods/index.php?mod=451
    Changes compared to URL Popup 1.0:
        -Only URL address is asked in popup dialog. URL name is not asked.
        -If there is no text selected in textarea before adding URL, url will be like this: http://something.com.
        -If there is text selected in textarea before adding URL, url will be like this: Selected text.
        -If user enters empty URL, URL with only blank spaces or URL which contains only "http://" [url] won't be added.
        -If [url] won't be added (because of the improper text or cancel button) focus is moved back to the textarea.
        -There is no need for internationalized versions because popup contains only text: "URL:".

MaryLouW

Thanks for this cool mod!!!  It will definitely make life easier on my forum!!!  I"ve been hoping someone would write one like this.  It works the same way as the url in Incredimail.  Awesome!!

janilxx

Quote from: EggsOverGreasy on April 15, 2009, 10:07:24 AM
Will there be a SMF 2.0 upgrade? (Maybe SMF 2.0 has a built-in solution...)

I have not tested this with SMF 2.0 because all my forums are still on 1.x version.
Maybe this works with SMF2.0 without modifications?

If this does not work with 2.0, I will update it when I start using 2.0 forums (if SMF does not have built-in improvements).

EggsOverGreasy

SMF 2.0 has a built-in URL popup feature in its WYSIWYG editor. In the post editor, to switch to the WYSIWYG editing mode, toggle the red "A" "Toggle View" icon. To then make an inline link, highlight the link text and then hit the Insert Link edit button and the URL popup appears.

There was some discussion here as to whether this toggle icon isn't so clear. It wasn't obvious to me or to my test partner. Now, I'm searching for how to make WYSIWYG as the default setting, and whether or not it's a good idea...


Quote from: janilxx on April 15, 2009, 11:29:36 AM
Quote from: EggsOverGreasy on April 15, 2009, 10:07:24 AM
Will there be a SMF 2.0 upgrade? (Maybe SMF 2.0 has a built-in solution...)

I have not tested this with SMF 2.0 because all my forums are still on 1.x version.
Maybe this works with SMF2.0 without modifications?

If this does not work with 2.0, I will update it when I start using 2.0 forums (if SMF does not have built-in improvements).

Mo786

Thanks for this. Its way better than the original.

jak6868

for me, this doesnt work on the quick reply box. It does work on the preview text box.

Is there any way to make this work for the quick reply box as well?

janilxx

Quote from: jak6868 on July 24, 2009, 05:10:23 PM
for me, this doesnt work on the quick reply box. It does work on the preview text box.

Is there any way to make this work for the quick reply box as well?

There is no buttons in quick reply box. Enabling "Another URL Popup" feature in quick reply means that you have to add button for adding URL and then add also "Another URL Popup" codes to that button.

Blinker

jak (like me) may be using the enhanced QR. I'd also like if it could work with that.

jak6868

Quote from: Blinker on July 27, 2009, 09:15:05 AM
jak (like me) may be using the enhanced QR. I'd also like if it could work with that.

yes exactly, i'm using the enhanced QR so the buttons are there. I too would love it if this could work on those buttons.

janilxx

Quote from: jak6868 on July 27, 2009, 01:40:26 PM
yes exactly, i'm using the enhanced QR so the buttons are there. I too would love it if this could work on those buttons.

I am sorry but I have no time to investigate enhanced QR mod or make new version which works also with enhanced QR mod.

But if you have some PHP skills and information how mods work it should be quite easy to do the changes by yourself directly to the php files.

jak6868

Quote from: janilxx on July 27, 2009, 02:29:05 PM
Quote from: jak6868 on July 27, 2009, 01:40:26 PM
yes exactly, i'm using the enhanced QR so the buttons are there. I too would love it if this could work on those buttons.

I am sorry but I have no time to investigate enhanced QR mod or make new version which works also with enhanced QR mod.

But if you have some PHP skills and information how mods work it should be quite easy to do the changes by yourself directly to the php files.


can anyone take a crack at this? my php skills are non-existent...

Blinker

I'll take a look at janilxx's code vs. the QR code this weekend and see if I can pinpoint what needs to be done.

I can't code from scratch but I can mimic and extrapolate...it may be enough. No promises though.

jak6868

Quote from: Blinker on July 28, 2009, 04:01:58 AM
I'll take a look at janilxx's code vs. the QR code this weekend and see if I can pinpoint what needs to be done.

I can't code from scratch but I can mimic and extrapolate...it may be enough. No promises though.

you'd be a lifesaver :D

Kat-2

Is it possible to make this where after you add the link, another box will pop up so you can add the title, and have that showing in your post to click rather than the link itself??

Example..

SMF

janilxx

Quote from: Kat-2 on August 10, 2009, 12:20:31 AM
Is it possible to make this where after you add the link, another box will pop up so you can add the title, and have that showing in your post to click rather than the link itself??

Example..

SMF

This already works... this way:
1. Write a word (e.g. "SMF")
2. Select word
3. Click URL-button
4. Enter URL
5. SMF link created as

jak6868

Quote from: jak6868 on July 28, 2009, 11:43:40 AM
Quote from: Blinker on July 28, 2009, 04:01:58 AM
I'll take a look at janilxx's code vs. the QR code this weekend and see if I can pinpoint what needs to be done.

I can't code from scratch but I can mimic and extrapolate...it may be enough. No promises though.

you'd be a lifesaver :D


blinker (or anyone) - did you have a chance to look at it yet?

Kat-2

OMGosh! That is great!!!  :D :D

Thank you!!

nunopitbull

Would like to know, in this mod: http://custom.simplemachines.org/mods/index.php?mod=938

How can i make the text i wanna enter (after i select the URl in popup box) to be highlighted. Like i click any letter in my keyboard and it edits. Dunno if im making myself clear :s

nunopitbull


janilxx

Quote from: nunopitbull on September 17, 2009, 04:24:06 AM
Cant u mod this mod to be like this:

http://img9.imageshack.us/img9/7360/testdp.jpg

Sorry, I do not have time to do this at the moment.
If someone has time, please let me have the codes and I will add them to this mod. They have to work in IE and FF.

Advertisement: