Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: jerm on September 03, 2006, 06:31:41 PM

Title: URL Popup
Post by: jerm on September 03, 2006, 06:31:41 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=451)
Rate this Mod (http://mods.simplemachines.org/index.php?action=review;sa=add;mod=451)

URL Popup
Written by: jerm
Email: [email protected]

----------
This mod will create a popup box when the URL bbc tag is clicked on the post page.
The popup will display a URL name that you would like to give it and the destination.

Thanks goes to A.M.A for the code posted Tips and Tricks section.
http://www.simplemachines.org/community/index.php?topic=17867.msg146789#msg146789


~jerm

---------

Version 1.0
- Creates a popup box for the url name, and the url location.
Title: Re: URL Popup
Post by: husmen73 (Gulhin) on September 04, 2006, 05:09:20 AM
Thanks jerm. that's great mod ;)
Title: Re: URL Popup
Post by: Cache-man on September 07, 2006, 05:20:59 PM
do i have to activate this in admin somewhere, as no popup appears for me.

I'm using RC3 at forums.cache-community.co.uk, and have tried this with the default theme and my own theme.

Help would be appreciated
Title: Re: URL Popup
Post by: rebus on November 15, 2006, 10:08:29 AM
Great Mod! Thanks a lot
Title: Re: URL Popup
Post by: geezmo on November 19, 2006, 12:37:01 PM
Works great except that it doesn't work with the Enhanced Quick Reply. Can you tell me which codes to edit/add in order to make this work in the Enhanced Quick Reply mod?
Title: Re: URL Popup
Post by: WebWorm on December 01, 2006, 01:05:55 AM
Works fine on 1.09 - thanks!
Title: Re: URL Popup
Post by: mgaidia on December 18, 2006, 06:27:59 PM
I cant install the english version from package browser, only turkish is available
please fix it
Title: Re: URL Popup
Post by: kran1um on December 18, 2006, 06:55:30 PM
Quote from: mgaidia on December 18, 2006, 06:27:59 PM
I cant install the english version from package browser, only turkish is available
please fix it

Same problem here, but just google translation and probably paste it in the file overwriting the Turkish.
Title: Re: URL Popup
Post by: sonofabit on January 24, 2007, 08:03:13 PM
could really use this on 1.1.1, thanks!

-SelArom
Title: Re: URL Popup
Post by: affbld on February 17, 2007, 09:18:01 PM
please update to latest version 1.1.2
Title: Re: URL Popup
Post by: hotjunkie on March 01, 2007, 02:34:08 AM
Very nice mod, thank you. :)
Title: Re: URL Popup
Post by: Frantix on March 25, 2007, 10:25:23 PM
Just wanted to send out a thanks on the mod  8)
Title: Re: URL Popup
Post by: Matthew Schenker on May 02, 2007, 03:03:10 PM
This sounds like a great modification, if I understand it correctly!

Is it compatible with 1.1.2?

Thanks!
Title: Re: URL Popup
Post by: Matthew Schenker on May 02, 2007, 03:16:16 PM
OK, I just went in and installed this modification because it's such a great idea. Right away, I am thrilled with it!

Thanks for doing this!  A lot of my members were confused about changing the code manually, and this is a very friendly way to work with the URL code in a more friendly manner.

I definitely think this should be a basic feature.

Thanks again!
Title: Re: URL Popup
Post by: kaajee on June 12, 2007, 07:11:11 AM
Great mod! Every SMF board should have this......

One thing though. This popup requires two inputs: 1,first=the URL (itself) and 2,second = the referal text/name (URL name)
What i really would lijke to see is selecting a piece of text off which you want a hyperlink, then click the URL bcc button and the enter the wanted url, and then the (previously) selected text is converted.
Hard to explain maybe....... :D
I'll try an example:

-this is the whole line of text-

now i want to 'hyperlink' 'text' only into www.linux.com....
with the current URL Popup mod, i actually have to delete 'text', click on the url bcc button, then enter; www.linux.com, then a second popup comes and I have to enter; text (again).

It would be even more handy to just select (highlight) 'text' click the url bcc button and only have to enter www.linux.com en text is 'converted' into a hyperlink......

If one leaves the second popup (url name) blank a 'not wanted' result is the issue.
Then the result is:
[url]http://www.linux.comtext[/url]

Would this be possible maybe?
Title: Re: URL Popup
Post by: Matthew Schenker on June 12, 2007, 09:42:22 AM
kaajee,
I've been using this popup for a few weeks on my woodworking forum (www.festoolownersgroup.com), and my members like it a lot.

Actually, I like the two-step entry process.  Sometimes you want to have readable text as the link, and sometimes you want to have the link appear.  This gives you both options.

But, as with so many things, there is room for different opinions.

Matthew
Title: Re: URL Popup
Post by: kaajee on June 12, 2007, 09:56:38 AM
Quote from: Matthew Schenker on June 12, 2007, 09:42:22 AM
kaajee,
I've been using this popup for a few weeks on my woodworking forum (www.festoolownersgroup.com), and my members like it a lot.

Actually, I like the two-step entry process.  Sometimes you want to have readable text as the link, and sometimes you want to have the link appear.  This gives you both options.

But, as with so many things, there is room for different opinions.

Matthew
Agree, shouldn't/couldn't it be an option to have it both?
So when selecting a piece of text, the URL name is allready filled in, or the dialox box for the URL name does not appear at all.....and when no text is selected one has to enter/type/paste the URL name..........
Title: Re: URL Popup
Post by: Matthew Schenker on June 12, 2007, 10:18:43 AM
kaajee,
OK, I see what you mean.

Right, let's say you've already typed some text in your post, then you just want to select it and apply a link.  I have to admit, however, that in a short time my members just got used to hitting the "URL Popup' button first, then entering the link and text.

Keep in mind that with the URL Popup modification installed, you can just type a link and it becomes hypertexed without using the button (for example, www.festoolownersgroup.com is automatically hyperlinked just by typing it here).

But I do agree that your suggestion would be a nice way to work in many cases.
Title: Re: URL Popup
Post by: kaajee on June 12, 2007, 11:36:46 AM
Matthew,
i know about the 'automatic hyperlink', but take a look at this message  (http://www.simplemachines.org/community/index.php?topic=176453.msg1123806#msg1123806) on this forum (my initial question regarding this issue). And you'll understand that in some cases this is not wanted and looks kind of silly (the lenght of the url)  :P
Title: Re: URL Popup
Post by: Air_Cooled_Nut on June 19, 2007, 02:43:52 PM
This installed fine for the standerd Default theme.  I'm using Ancient and Rusted so I had to manually apply the changes to the appropriate .php.  No errors and the code is present if I do a View Source in IE6.  However, when clicking on the Insert Hyperlink icon this mod doesn't work, it just puts the // BBC code in the user's text entry box.

Suggestions to get this seemingly simple mod to work?

SMF 1.1.2
Ancient and Rusted
Internet Explorer v6
Title: Re: URL Popup
Post by: Niteblade on June 20, 2007, 07:47:04 PM
Excellent mod.

Installed with no problems on v1.1.2
Title: Re: URL Popup
Post by: Jmecca2 on June 20, 2007, 10:39:22 PM
Good mod.

Works perfect.
Title: Re: URL Popup
Post by: Deoxys94 on September 05, 2007, 08:23:53 AM
Hi!

When applying mod appears this:

(http://img206.imageshack.us/img206/1696/pupme4.jpg)

that it happens?

Bye
Title: Re: URL Popup
Post by: MinasC on September 07, 2007, 11:16:05 AM
i got an error in Post.template.php (i uploaded it for anyone who could help to see it) !

i use smf 1.1.3/tp 0.9.8 ! any ideas ?
thnx !
Title: Re: URL Popup
Post by: TrueSatan on September 07, 2007, 12:29:16 PM
Your error is a variant on the most common error of all those reported on these pages...it tells you that another mod you have installed has already edited the file in question and that you thus need to do a manual installation of this mod. Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)
Title: Re: URL Popup
Post by: MinasC on September 08, 2007, 12:19:11 PM
Quote from: TrueSatan on September 07, 2007, 12:29:16 PM
Your error is a variant on the most common error of all those reported on these pages...it tells you that another mod you have installed has already edited the file in question and that you thus need to do a manual installation of this mod. Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)


thnx for your time to ... paste the answer (just kidding) ! i really hope that's the answer to everything , cause then it's easy to make it right !

thnx True Satan !  ;)
Title: Re: URL Popup
Post by: waxpop on October 12, 2007, 02:42:57 PM
I've installed this on my board and it works for the Default theme but it's not working on the overall forum default (Classic YaBB SE Theme). Can someone tell me what I need to do to apply this mod to my other theme?

ETA: Ok, I'm following the XML directions on the Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402#post_xmlformat) and it looks like I'm supposed to edit Post.template.php but when I open that up I don't see < operation > tags, like it says in Step 2. Can someone point me in the right direction? (I'm using 1.1.4)

Thanks!
Title: Re: URL Popup
Post by: waxpop on October 15, 2007, 02:07:48 PM
Anyone?
Title: Re: URL Popup
Post by: Air_Cooled_Nut on October 15, 2007, 02:34:17 PM
You want to look at the text between the <operation></operation> tags.
Title: Re: URL Popup
Post by: waxpop on October 15, 2007, 05:19:33 PM
Yeah, like I said in my last post, there are no operation tags in my Post.template.php file.

I just did a text search for "operation" within the file - should I be looking for something else?
Title: Re: URL Popup
Post by: Air_Cooled_Nut on October 15, 2007, 06:02:25 PM
Yeah, like I said in my last post, you want to look BETWEEN the tags and NOT INCLUDE them as part of your search.  "Between" isn't inclusive ;)  So search on any items beyond -- but NOT INCLUDING -- the <operation> tag.
Title: Re: URL Popup
Post by: waxpop on October 16, 2007, 12:16:09 PM
You've been entirely unhelpful! ;)
Title: Re: URL Popup
Post by: dumblonde on January 10, 2008, 01:05:48 PM
Has anyone installed this on 1.1.4 yet?  Is is compatible?  :D
Title: Re: URL Popup
Post by: syzable on March 04, 2008, 05:06:36 AM
Quote from: dumblonde on January 10, 2008, 01:05:48 PM
Has anyone installed this on 1.1.4 yet?  Is is compatible?  :D

I just have and it works a charm. :)
Title: Re: URL Popup
Post by: perplexed on March 29, 2008, 03:00:32 PM
I have it on a test site, still trying to get it to work with enhanced quick reply
Title: Re: URL Popup
Post by: 58tbird on March 29, 2008, 06:38:35 PM
Quote from: syzable on March 04, 2008, 05:06:36 AM
Quote from: dumblonde on January 10, 2008, 01:05:48 PM
Has anyone installed this on 1.1.4 yet?  Is is compatible?  :D

I just have and it works a charm. :)
Same here, and I love it!  Also, I wanted to change the message in the second box to read "Enter the text you want to display for this link:" by locating the code for this text here (http://www.simplemachines.org/community/index.php?topic=17867.msg146789#msg146789).
Title: Re: URL Popup
Post by: dailytalk on April 10, 2008, 01:17:28 PM
Does this mod also work with SMF 2.0 ?
Title: Re: URL Popup
Post by: aishaweb on April 10, 2008, 01:41:33 PM
Quote from: coca-cola on April 10, 2008, 01:17:28 PM
Does this mod also work with SMF 2.0 ?

SMF 2.0 has a WYSIWYG option that has a popup by default.
Title: Re: URL Popup
Post by: dailytalk on April 10, 2008, 05:26:33 PM
I do not find this WYSIWYG option. Could you tell me were I find it?
Title: Re: URL Popup
Post by: IchBin™ on April 10, 2008, 07:26:28 PM
In SMF2 you have to enable the wysiwig editor in your profile under look and layout.
Title: Re: URL Popup
Post by: Matthew Schenker on May 07, 2008, 12:11:35 PM
Quote from: IchBin™ on April 10, 2008, 07:26:28 PM
In SMF2 you have to enable the wysiwig editor in your profile under look and layout.

Not really...
It has a popup for the URL address, but it is missing the next one that lets you display the link text.
Are they going to fix this for the real release?
Matthew
Title: Re: URL Popup
Post by: edi67 on May 08, 2008, 06:55:33 AM
goosd
Title: Re: URL Popup
Post by: Matthew Schenker on May 08, 2008, 08:06:28 AM
Quote from: edi67 on May 08, 2008, 06:55:33 AM
goosd

I'm not sure I understand this.
Does anyone know if the URL popup will be fixed by the RC release of 2.0?
Matt
Title: Re: URL Popup
Post by: IchBin™ on May 31, 2008, 04:48:21 PM
In SMF 2.0 all you have to do is highlight your text, click the URL pop-up and create the link. I don't quite get what you think needs to be fixed.
Title: Re: URL Popup
Post by: kai920 on June 11, 2008, 04:07:34 AM
Quote from: kaajee on June 12, 2007, 09:56:38 AM
Agree, shouldn't/couldn't it be an option to have it both?
So when selecting a piece of text, the URL name is allready filled in, or the dialox box for the URL name does not appear at all.....and when no text is selected one has to enter/type/paste the URL name..........

Is there a new mod that has this function?

a) if text is already selected, then just ask for the URL...
b) if the URL bbcode box is clicked with no text selected, then ask for both URL and display text...

Is this what SMF2 has?
Title: Re: URL Popup
Post by: IchBin™ on June 11, 2008, 09:45:57 AM
In SMF2 if the text is highlighted, it will ask you for the URL. It will then create the text with the URL. If no text is highlighted, it will ask you for the URL and then insert the URL with the URL as the text. So its not exactly what you're looking for.
Title: Re: URL Popup
Post by: gemigene on June 20, 2008, 06:57:46 PM
Hi IchBin

Fantastic Mod, love it.

Is there any way I can modify some of the code to make this bilingual by having the text in both Modifications_english and french? I assume that the 3 following lines would need to be changed:

var urlLINK = prompt("Please enter URL address:","http://");
alert("Sorry no text entered!");
var urlNAME = prompt("Please enter URL name:","");


I've also noticed that some of my users copy and paste links and end-up with a double instance of http:// so would removing ,"http://" from the var urlLINK line take care of that?

Thanks,
Gene
Title: Re: URL Popup
Post by: Basie on June 20, 2008, 07:39:40 PM
Quote from: IchBin™ on May 31, 2008, 04:48:21 PM
In SMF 2.0 all you have to do is highlight your text, click the URL pop-up and create the link. I don't quite get what you think needs to be fixed.

This is for WYSIWYG right? What about forums that disable WYSIWYG? This mod would still be useful for them.
Title: Re: URL Popup
Post by: IchBin™ on June 20, 2008, 07:43:08 PM
Been so long since I looked at this mod, that made me realize it needs to be updated to use the text strings as you are asking. :) Yes, you can simply add some txt variables there to get you what you'd like to the modifications.english.php file. For example you can translate these lines to your other language.

$txt['url_popup'] = 'Please enter URL address:';
$txt['url_popup_alert'] = 'Sorry no text entered!';
$txt['url_popup_name'] = 'Please enter URL name:';


Replace those lines of code with what is needed.
var urlLINK = prompt("', $txt['url_popup'],'","http://");
alert("',$txt['url_popup_alert'],'");
var urlNAME = prompt("',$txt['url_popup_name'],'","");
Title: Re: URL Popup
Post by: gemigene on June 20, 2008, 08:50:30 PM
Thanks IchBin, that was quick.

Gene
Title: Re: URL Popup
Post by: gemigene on June 20, 2008, 09:30:59 PM
Fantastic, works great. One thing though, I've noticed that once the link and name have been inputted and shown in the post, the cursor is between the link name and [/URL], for users that aren't too savvy, they'd keep on typing inside the description. Isn't there a way to make the cursor go at the end of the line?

For example: [url=http://www.somesite.com]Whatever name or title(cursor is here)[/url](instead of here).

Thanks,
Gene
Title: Re: URL Popup
Post by: IchBin™ on June 20, 2008, 09:55:56 PM
I'm not sure how to move the cursor. I'll see if I can't find some info on it.
Title: Re: URL Popup
Post by: gemigene on June 20, 2008, 10:08:59 PM
Thanks ichBin, it sure would be an improvement. I have another English-only forum (with your Mod) which has been live since January and some members have a tendency to do exactly what I mentioned in the above post and end-up with a long post which is all part of the URL. LOL!

Cheers,
Gene
Title: URL Popup manual instructions broken
Post by: quatermass on November 13, 2008, 05:17:52 PM
I can't get this ext. it to work in 1.1.6

Ah... the manual install instructions seem to be missing whole chunks!

It doesn't display the "Add Before" section!

Can this be fixed?

Has anyone got it working in 1.1.6?
Title: Re: URL Popup
Post by: .HuNTeR. on December 19, 2008, 06:04:24 AM
does anybody know how to get it to work with enhanced quick reply ?
Title: Re: URL Popup
Post by: TurtleKicker on January 28, 2009, 08:39:57 PM
So is there still no way to make this work in 1.1.7 with "select text first" then a single Javascript box asking for the URL?
Title: Re: URL Popup
Post by: IchBin™ on January 29, 2009, 12:35:13 AM
You figure out the javascript and let me know. I'll add it in the package. :)
Title: Re: URL Popup
Post by: TurtleKicker on January 29, 2009, 12:56:23 AM
Quote from: IchBin™ on January 29, 2009, 12:35:13 AM
You figure out the javascript and let me know. I'll add it in the package. :)
Can't you look at the source of any vBulletin post/reply page? That's how vBulletin functions so the "secret" should be visible in there somewhere.
Title: Re: URL Popup
Post by: seficar on August 14, 2009, 05:36:31 PM
does this work on 1.1.10?

is there a way to put this in Enhanced Quick Reply 2.0?
Title: Re: URL Popup
Post by: Chamaeleon on August 20, 2009, 11:51:16 AM
modified for SMF 2.0 RC1.2  ;)

added english and german language
Title: Re: URL + Popup + İMAGE + HİDE + CENTER
Post by: osmanagaa on November 21, 2009, 04:26:15 PM
Hello guys,


imageurlpopuphidecentertr.zip (turkish)
imageurlpopuphidecenter.zip ( english)

please download and install that packages to your forum and then open the:

themes/default/post.template.php

FIND:

function urlINPT()
  {
          // Enter URL .........................................
          var urlLINK = prompt("Please enter URL address:","http://");
          if (urlLINK == null )
{
//cancel pressed . . .
          }
          else if (urlLINK == "" || urlLINK == " ")
{
//ok pressed but with Notext . . .
                  alert("Sorry no text entered!");
          }
          else
          {
    //ok pressed and there is something :)
          // Enter Description ...................................
          var urlNAME = "[img]LİNK[/img]";
          if (urlNAME == null )
{
//cancel pressed . . .
          }
          else if (urlNAME == "" || urlNAME == " ")

//ok pressed but with notext so use URL only!
                    surroundText(\'[center][hide][url=\'+urlLINK+\']\'+urlNAME+\'\', \'[/url][/hide][/center]\', document.', $context['post_form'], '.', $context['post_box_name'], ');
          }
          else //ok pressed with text so use URL and Name!
                    surroundText(\'[center][hide][url=\'+urlLINK+\']\'+urlNAME+\'\', \'[/url][/hide][/center]\', document.', $context['post_form'], '.', $context['post_box_name'], ');
          }
          }
          // --' . '>
          </script>';



LOOK FOR:

var urlNAME = "[img]LİNK[/img]";

IN THE CODE.

and then change the word (LİNK)  to your image link which is between the img tag.

for example:

var urlNAME = "[img]http://www.google.com.tr/forum/indir.gif[/img]";

thanks.



Title: Re: URL Popup
Post by: SN on November 28, 2009, 02:59:07 AM
Can any comfirm that, the img pop there works?

i would really love this to do it with images also
Title: Re: URL Popup
Post by: Acer1 on January 10, 2010, 12:12:20 PM
The Mod for SMF 2.0 RC2 ???


Please !  8) 8)
Title: Re: URL Popup
Post by: XtcruleZ on January 16, 2010, 06:28:26 PM
Any chance of getting this updated to work with SMF 2.0 RC2?
Title: Re: URL Popup
Post by: IchBin™ on January 24, 2010, 12:06:31 AM
I will not be updating this mod, or any of my mods for that matter. If anyone wants to take this over, feel free to shoot me a PM.
Title: Re: URL Popup
Post by: steve51184 on March 12, 2010, 09:50:24 PM

also need this for rc2/3
Title: Re: URL Popup
Post by: TurtleKicker on March 13, 2010, 06:55:02 PM
Quote from: IchBin™ on January 24, 2010, 12:06:31 AM
I will not be updating this mod, or any of my mods for that matter. If anyone wants to take this over, feel free to shoot me a PM.
That's really unfortunate. I was desperately looking forward to using this in SMF2. Hopefully someone is willing to take it over.