WordPress Simple Popup Plugin

January 29th, 2009

Here’s my first WordPress plugin; blood, sweat, and tears have gone into making this simple thing.  The function of this plugin is to easily create a simple popup window like so.

I figure there’s got to be a bunch of bands/musicians using WordPress that need an easy way to create a popup music player to showcase their songs without having visitors go to a separate page of the site.

*This plugin is compatible with WordPress 2.8 and above.

Installation

  1. Download and install/activate this Simple Popup plugin.
  2. Adjust settings in the options page.
  3. Use.

Usage

-Create a popup link in a post or a page by using the shortcode:

[popup url="http://www.popupurl.com"]Link Text Here[/popup]

-For simple sidebar links use the widget

-Create a popup link anywhere else in a sidebar, header, footer, etc. by using the template tag:

<?php simple_popup_link("http://www.popupurl.com","LINK TEXT HERE"); ?>

Screenshot

Simple Popup Plugin v3 Screenshot

Download

Changelog

2/23/09 – Version 2.0 – Now has an option for toggling scrollbars, a widget for easily adding a link to the popup in your sidebar, and a template tag for adding a link wherever else you might want one!  Roll it!

11/1/09 – Version 3.0 – Added support for multiple popup links.  Now has the option to position the window on the screen.  Removed widget :(   Wasn’t very useful.

11/3/09 – Version 3.1 – Brought back widget with easier usage! :D There you go Julie!

1/15/10 – Version 3.2 – With the help of Rich added ability to use multiple popups in the widget and window centering support.

Categories: Internet, Wordpress Plugins


180 Comments on “WordPress Simple Popup Plugin” Comments RSS Feed

  1. Garrett says:

    Hi Afton,
    It does work with 2.7! It’s compatible with 2.5 and above. Check out that link I posted for Peter and see if that helps. And check your email!

  2. Grimm-

    I also got:

    Warning: Cannot modify header information – headers already sent by (output started at /…/simple-popup-plugin/simple_popup.php:12) in /…/wp-includes/pluggable.php on line 850

    You need to fix your file “simple_popup.php”. It has line spaces IN BETWEEN php code blocks, as well as 6 blank lines after the last closing php tag!

    In any event, a trivial bug… Thanks a lot for your contribution!

  3. Jon says:

    Seem to be having problems with this… No popup appears, rather it opens in the same window.

    http://tynsetkirke.no/?page_id=90

    is the address, with the address in the fourth paragraph, last word:

    Salmelisten

    Vi håper at dere gjennom denne nettsiden kan få hjelp, slik at valget blir enklere. Ved å klikke på knappene i salmelisten kan dere høre melodiene. Du kan lese tekstene ved å klikke **her**.

    Am I doing something wrong here?

    Cheers!

    J

  4. green says:

    Nice plugin! Is there any way to make this work in a sidebar/footer?

  5. baron says:

    hi. Thanks for plugin

    perfect.

    Regards

  6. Garrett says:

    Hello all, I’ve just updated the plugin to version 2.0. It now has an option for toggling scrollbars, a widget for easily adding a link to the popup in your sidebar, and a template tag for adding a link wherever else you might want one!

  7. 1saucygirl says:

    Thanks for this plugin & widget! It’s exactly what I needed and works great. One question: I need to remove the browser tool bar from the popup window so only the window displays. How can I do that?

  8. 1saucygirl says:

    Also — when using the sidebar widget, how would I make the popup link an image rather than a text link? I have an image in the sidebar and I want to make it clickable to display the popup window. Thanks!

  9. Great plugin, thanks. Simple and to the point. You can see it in action here: http://markjeffries.com/the-keynote/

    A quick question though: are you planning on having an option to center the popup on the screen? I’d do it myself, but don’t want to mess around with core code that gets overwritten on updates…

    Thanks again.

  10. thank you so much for this !!

    i downloaded a couple lynda.com’s tutorials on wordpress last week and am now making a website for a friend as i type this — you can click on the Music section to see your plugin in action.

    ;) :)

  11. Nick says:

    Great little plugin and it almost works for me but with the xspf template I’m getting

    Fatal error: Class ‘xspf_player’ not found in /home/xx/xx/xx/themes/k2/XSPF_template.php on line 40

    Any idea how I can fix that?

    thanks!

  12. Arne says:

    Is it somehow possible to have more that one link as a popup? I’d like to have two or three different links to pop up.

  13. Karen O'Neal says:

    Is there a way to have the window popup when the page has loaded or when you exit a page instead of onclick? If so, can someone give me the proper code?

  14. Ross says:

    hello, how you can use the Simpele Pop-Up PLugin to more Pop-Up.

    example : [*popup1*]LINK TEXT HERE[*/popup*]
    [*popup2*]LINK TEXT HERE[*/popup*]
    [*popup3*]LINK TEXT HERE[*/popup*]

  15. Fabian says:

    Hi, it is possible to include more of a connection? example:

    [*popup1*]LINK TEXT HERE[*/popup*]
    [*popup2*]LINK TEXT HERE[*/popup*]
    etc

  16. Nita says:

    Thank you for this plugin. I’ve been tearing my hair out trying to learn php to do just this! Thank you. I had the popup working as a script in html and just could not translate this to WP. You might like my little popup it has 2 frames and absolute links so that even when the main window is closed it plays, the player is coffeecup jukebox as was the code to generate the frames in the pop-up – I think. or maybe i just mushed… Anyway, this is my trial before doing the real thing for a musician. Thanks

  17. Gordon says:

    Is there any news about the new version? Thanks.

  18. Garrett says:

    Hi All! Apologies on my end for taking so long. I’ve posted a solution above to the issue of wanting multiple popup links. It’s not as simple as it could be, but it works for now. I’ll come up with something better soon. Let me know if you have any questions.

  19. Luis says:

    Hi Garret, is there anyway to use an image instead of text link. I am using the header code:

    how would I change this to show an image button instead of the current text.

    Your help is greatly appreciated.
    dowgold.net

  20. Garrett says:

    Hey Luis,

    To use an image instead of text for the link you can use the code above at the end of the post “Creating Multiple Popup Links”. Just put the image source in where the link text would go, like this:

    <a onclick=”return popitup(’URL HERE’)” href=”URL HERE TOO”><img src=”IMAGE URL” /></a>

  21. Megan says:

    My prayers had been answered with your plug in but I am having issues with doing the multiple links. I need to have a page of links and want each to open in a new window. I am able to get the popup link to work that uses the link referenced in the settings of the plugin. However, when I try the other method, it opens up the popup in the same window, same size. Any pointers?

    http://newlawrenceville.com/services

    By the way, you are a very kind and patient person. I read through all of your responses. Very generous with your time. Thank you for doing this!

  22. Bruce says:

    Hi,

    Thanks for the plugin, but when I input the height and width demensions, nothings happens. I’m using wordpress v2.7.1…Now I must search for some pop-up script to intergrate with this plugin. This can take hours.

  23. Jon says:

    Garrett,

    You’re the man. Let me explain this scenario and then I’ll ask my question. I’ve set everything up in the WordPress backend (Using 2.7) and everything seems to work when I’m at home (of course). When I click the established link, the player shows up in a separate window. I tried it on a number of browsers and everything works great (IE7, FFX, Opera, Netscape, etc.). Now I’m here at work and when I click the pop-up link, I get the player on the same page instead of in a pop-up. I work for the government so I’m sure there are a lot of things locked down in the browsers (tried IE7, Firefox and then Firefox in a Virtual Machine running Ubuntu all with the same results). However, I am able to go into the browser options and make sure that Java-Script is on; make sure that pop-ups are not blocked. I even checked Internet Explorer Internet Options and it seems that what is setup by the admin would allow the pop-up to function properly. My question is, what do you think is causing this? Hate to give this away unfinished but my site is http://www.mnyfamily.com/underground. When you go there, click the “Pages” link in the navigation and then the “Player” link and see what happens on your end (clicking the player link should produce the pop-up). Thanks again.

    Jonathan

    • Garrett says:

      Hey Jon, sorry it took so long to get back to you. Ok, so it looks like your link isn’t pointing to the script to open a new window. The explanation in the above post under the heading “Creating Multiple Popup Links” should fix your problem. Just modify your “Player” link so it looks like this:

      <a onclick=”return popitup(’http://mnyfamily.com/underground/?page_id=29’)” href=”http://mnyfamily.com/underground/?page_id=29”>Player</a>

      Let me know if that works for you.
      -Garrett

      • jonathan says:

        Garrett,

        It’s fine that you weren’t able to get back to me; I’m just getting back to my site this evening. I don’t know how but things have really gone down hill. When I wrote my original comment/question, I was at the point where the pop-up was working properly at home but not at work. I was 90% there; I was ready to move onto other things. Tonight, the plug-in function I was getting at home seems to have evaporated. I tried to follow your advice which I interpreted in the following way: (1)I went to the wp back end (2)Expanded the “Settings” option at the bottom-left of the dashboard and selected the “Simple Pop-up Plug-in” link (3) I then copied and pasted directly from the proposed code in your reply into the field labeled “URL to be Popped Up!”. Did I go wrong somewhere? As I said, the explanation is easy enough and things were working great at first but I seem to be lost somehow.

        • jonathan says:

          Garrett,

          I’m going to add a bit more to my last reply. The information might help you help me because looking back at what you said and my reply to your advice, it probably seems like I missed the point. In your reply, you said to change the “player” link to Player and I didn’t understand. The reason I didn’t understand is this: The “player” link is the link to a page that I created in the back end that has the XSPF template. “player” is the title that I put on that page, thus creating the “player” link. I didn’t really see how I could change the “player” link. The only thing I could think to do was what I said in my previous reply. I went to the Simple Pop-up Plug-in Settings and pasted your code into the field labeled “URL to be Popped Up!. However, it just does not work. I get my player in the upper-left corner of a full sized window that contains the background of the site. I even started this process all over again from the point of downloading/reinstalling the plug-in and I still can’t get back to the point I was at where I was able to get this to work at home. The “player” link has been changed to “detach player” and the id is now “45″. Like I said; I’m lost. Any information you need to help diagnose and fix this I will provide but it may not be the greatest idea to do so through these public comments. Please, help.

          • Garrett says:

            Hi Jonathan, I think you’re misunderstanding how the link works. Don’t copy and paste that code into the options menu. Leave the url in the options menu as the address of the popup.

            When you write the html for the link use the code above. For instance, on the widget page (which is probably how your adding the link, correct?) use the code above. I hope that helps

  24. Jonathan says:

    Garrett,

    In short, I was going about the process a bit backwards but after correcting myself, some good progress has been made. However, I have hit a bit of a hangup trying to take the next step of creating an image that detaches the player. I will explain here. If you take a look at my site now you will see a new area at the bottom right side of my site. What I ended up with after correcting my earlier error is a title area that displays a title and a text area that displays a click-able text of the code entered for the the pop-up window. When you click the code text, the pop-up appears as it should. Ultimately I’m trying to make this whole area that has appeared into a big click-able image that detaches the player. Therefore, I (tried) to follow the instructions you gave to 1saucygirl by using a text widget containing the code from the reply (with the proper edits) but things are not working out at all. Can you please walk me through this process step by step? I would greatly appreciate it. Thank you for all your help thus far.

    Jonathan

    • Jonathan says:

      Garrett,

      I was able to create a text widget and insert an image into the text widget. The text is the following:

      The problem is I don’t get the pop-up when I click the image; I get an error. The error reads:

      Not Found
      The requested URL /underground/”http://mnyfamily.com/underground/ was not found on this server.

      Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

      I think this is probably much simpler to follow instead what I wrote previously. Can you take a look at my site and see what you can do to help me, please? I’ve gone over this several times and I just can’t get this thing to work correctly for me. I just don’t understand why this works so perfectly for everyone else. Please help. http://www.mnyfamily.com/underground

      • Garrett says:

        Hi Jonathan,

        Ok, I think you’re over complicating it. With the plugin activated, paste this code into a text widget:

        <a onclick=”return popitup(’http://mnyfamily.com/underground/?page_id=80’)” href=”http://mnyfamily.com/underground/?page_id=80”>Player</a>

        That should work, let me know!

        • Jonathan says:

          Garrett,

          Thank you for your patience with my situation but I’m sorry to say that your latest suggestion doesn’t do it. Check out the site yourself. I created a text widget, put your code in and when I click on the “Player” text that appears on the site I get this error:

          Not Found
          The requested URL /underground/”http://mnyfamily.com/underground/ was not found on this server.

          Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

          I’m not sure if this suggestion is appropriate (I apologize if it is and please let me know) but would you consider taking my wp account information, logging into my dashboard and giving the process a go? Yeah, I understand that is dangerous for me just in case you turn into a big jerk and decide to muck with my site but I’ll take my chances, if you’re willing to take that step. If you have a $rate$ for this kind of thing, I’m open to listen. I simply need this to work properly. Just get at me on my email; I’d appreciate it. Thanks, again.

  25. Gary says:

    Hi, when i put this Terms into the blog in the HTML pane and i click on the link it just opens like a regular link, no popup window or custom size. Using FF3.

  26. Garrett says:

    Hey Gary, can you send me a link to the page/post you’re trying it on? Thanks

  27. Ian says:

    Hi Garrett,

    Was wondering if your plugin could be used to create a popup when the main page is opened. If so could you let me know how and if it requires php the code that goes along with it.

    Thanks,
    Ian

  28. Hiya!
    I just installed your popup plugin, however what i do not understand is how to get the popup to open automatically when the home page loads.

    What is the point of having a popup open when someone clicks on a link? For that you can just use target=”blank” in your hyperlink?

    I’d appreciate any help
    Thanks
    Diggy

  29. Scott says:

    Hi. This plugin worked great for me. My only question is how do I create links in the popup so that it targets back to the original page. If you want to see how I’m using it, go to my site and click on Programs in the top menu. The popup link is the last word in the first section.

  30. Erik says:

    Hey Garret,

    Really cool. Is there any plans to make it so I can add multiple popups? This would be great if you could add!

  31. NIck says:

    Hi, is there a way to set up a popup in the middle of the screen? thank you in advance for this useful plugin, good work!

  32. mo says:

    Excellent plugin just what i was looking for

    Thanks!

  33. Tom Foley says:

    Just to let you know that if you use the plugin on an install of WordPress-MU you get the issue discussed at ..
    http://mu.wordpress.org/forums/topic/11621

    If you choose to address it I’ll be happy to test, if that’s of any help :-)

    - Tom

    • Garrett says:

      Hey Tom, thanks for the offer! I just updated it, can you try and see if it still has the same problem? Thanks

      • Tom Foley says:

        Hi Garett,

        Sorry for the delay. I just got the control panel notification that the new version was available.

        I’ll do some testing and get back to you when I have some hard data.

        - Tom

        • Tom Foley says:

          Well that didn’t take long, I now get the options page without issue. Great stuff!

          And thank you for addressing it. It’s particularly useful in my setup as I stream audio from the popup.

          Thank again,

          - Tom

      • Tom F says:

        Garrett,

        I spoke too-soon with my other two comments. While I did get the options page I did not change any settings until today. When I attempt to make a change to the settings for the plugin I still get the WordPress Error – “Options Page Not Found”. :-( Same as before.

  34. fixray says:

    Hello
    I’ve entered the code under the Appearance/Footer editor. However it doesn’t display the Privacy Statement text with its hyperlink.

    Am I on the right track?

    Thanks

  35. Garrett,

    Nice job! Some folks have wondered about the location bar… that one’s going to show under most browsers. As browsers update, one of the security things has been to display what you’re really seeing, so I think that’s going to stay.

    I’d like to see the window automatically center, too, and have emailed you about that.

    Thanks,

    Rich

  36. Julia says:

    Hi,

    Thanks for the grat plugin.

    I wanted to know if there was a way to use in image instead of text for the pop-up link. I know you posted how to do it in a widget, but I am using it as a plugin. This is my code…

  37. satcha says:

    your plugin working fine !

    there is any chance to add adcode to popup window ?

  38. Hi, I recently put the pop-up in this post:

    http://www.bengreenfieldfitness.com/2009/11/if-you-could-eat-a-steak-in-a-pill-would-you/

    But it doesn’t work! Can you give me some insight…I originally posted the sidebar code in my sidebar, but it didn’t work there either…please advise!

  39. Steve says:

    Garrett,

    Great plugin. Thanks for the hard work, I’ve got it working fine with an img linking to 2 pop up players.

    Kudos = 10/10

    Steve

  40. Garik says:

    Hi. I want an image popup in a sidebar. I put this in my text widget – . I changed it to my links and picture doesn’t show up in the sidebar. Please help!

    Do i need to install some plugins like php support for widgets or something?

    Thanks in advance!

  41. Sam says:

    This is great, thankyou :)

    Just one problem which occurs in IE6 and IE7 only.

    The pop-up opens in a new page with the following javascript error:

    “An error has occurred in the script on this page.
    Line: 58.
    Char: 21.
    Error: newwindow is null or not an object.”

    It then asks: Do you want to continue running scripts on this page?

    This problem occurs on all the sites I have tested (from your users who have posted a comment here) not just my site. For example Steve’s site http://www.strummerville.com/ who posted above me.

    Any work around for this? Many people still use IE7 unfortunately…

    Cheers Garret!

  42. Mark says:

    Is there a way to play a YouTube, Viddler, or self-hosted video in the popup window? Any code examples?

    Great work! Love it.

    • Mark says:

      Garret,

      You might have missed my comment about playing YouTube videos? When I try that, it tryes to load the whole YouTube page in the window, not just the video. Ideas? Code snippet available? Thx!

      • Garrett says:

        Hi Mark,

        Are placing the youtube video url into the widget? That’s probably why. If you take a youtube video url and paste it into your browser it will open up the whole youtube site as well. You need to create a blank page and use the “Embed” code from youtube so only the video will load. See this post for info on creating a blank page where you can add the code:
        http://www.grimmdude.com/how-to-create-a-popup-music-player-using-the-simple-popup-plugin-for-wordpress/

        The post is about making a popup music player, but just use your youtube code instead of the music player code. Let me know if you have any questions.

        • Mark says:

          Garrett,

          Thanks.

          Nope, I’m not using it in a widget, just links on a mian page.

          You say see “this post” but no link., I assume you mean “How To Create a Popup Music Player Using..”.

          That sounds like what I need, but it seems like I’d have to create a unique page for each of 40-50 videos with the embed code set on each page.

          Seems like there should be a way to envoke your plugin and have it open a window and pass the window the embed code? I’m not a PHP guy obviously.

          Thanks for anything you can do.

          • Garrett says:

            Hi Mark, yea sorry about that I was going for the post you mentioned. Hmm I see what you’re saying. Let me figure something out for the next release. Thanks for the feedback

  43. Joan says:

    Hi Garret
    What I love about your program/plugin is that it is sooo fast to load! Thank you. My scroll bars are not showing however (I have the option ticked in the admin screen). Can you have a look at http://travelhorizonstyle.com.au/contact-us/testimonials/ and if you click LINK TEST the popup only displays scroll bars in Chrome (not IE or FF).
    Hoping it’s some simple glitch.
    Regards, Joan

  44. Matt says:

    Hi Garrett,

    I cannot for life of me make a clickable image in the sidebar that engages your pop up window plugin. I’ve tried all the combination of code in above comments – specifically:

    when I put in the image URL nothing shows up. If it just put in text instead it works great. but I want an image!

    I am running the StudioPress Lifestyle theme if that makes a difference…

    Thanks in Advance!

  45. Nicole says:

    Hi! Just wanted to thank you for a nice, intuitive plugin that did exactly what I needed it to do.

    Thanks!

  46. EricJT says:

    Hi, I figured out why I was getting the tags in the url the plugin was producing and leading to a page not found error. I had selected and pasted your text from the plugin settings page that gave the format of the short code. This copied the html behind your text, which included those tags to make it display as such in the settings page. When I pasted it in notepad to clean out the code it came up clean and the popup works fine.

  47. Matthew says:

    Is there any way of manually changing the pop-up window size? It seems limiting that it can only open a specific height and width for all the pop-ups on a site.

    Is there something I am missing?
    Is there something close to this that I can do:
    [popup url="http://www.popupurl.com" width="300" height="250"]Link Text Here[/popup]

    • EricJT says:

      Yes, you can only set the popup size for all popups, and that’s done in the Settings section for Simple Popup Plugin. I tried what you suggested and it doesn’t work. With the settings at 0 and 0 it makes a larger popup; at 1 and 1 it’s a small popup, all regardless of the code in the article. It would be great if there was a way to specify for each popup since pictures are of different sizes. But for such you could always use a lightbox type of plugin instead of a popup. Look at NexGen Gallery.

  48. Dale says:

    Hi thanks for the plugin i have just upgraded after awhile and found changes. I have mutiple popups on my website with different sizes. I see you have the ability to have multiple popups with the plugin but haven’t got any options for sizes. Is this not possible now? Not to worry if not they will have to all open in big windows i guess.

    • Garrett says:

      Hi Dale, thanks for checking out the plugin. To keep it simple the popup window size can only be changed in the options page for all popups. I can see the benefit of being able to change the size for each popup, I’ll try to work on a way to allow for different size popups while maintaining simplicity on the next release.
      -Garrett

Trackbacks/Pingbacks

  1. [...] 7. Simple Popup Plugin Com este plugin poderá apresentar o que bem desejar com um simples pop-up. Artigos, publicidade, newsletters, etc. [...]

  2. [...] 7. Simple Popup Plugin Com este plugin poderá apresentar o que bem desejar com um simples pop-up. Artigos, publicidade, newsletters, etc. [...]

  3. [...] Simpele Pop-Up Plugin Een heel effectieve manier van reclame maken is via een pop-up. Dit is de ultieme manier om dat voor elkaar te krijgen. [...]

  4. [...] have been abundant when it comes to using my Simple Popup Plugin for WordPress to create a popup music player.  Thus, I have written this guide to help you on your [...]

  5. [...] Simple Popup Plugin “makes it easy to create a simple, modifiable popup window” [...]

Leave a Reply