1

I have a website with a mediabox which is a javascript what can popup elements and send them to a Youtube link for example. Now I want to link to that popup, is that possible?

I want to link to the popup on my website so they can watch the movie in which I linked to there...

Greetings,

Prashant Tapase
  • 2,132
  • 2
  • 25
  • 34
Kuubs
  • 1,300
  • 1
  • 14
  • 42
  • search on google. u will get nice script. Read documentation and try – Prashant Tapase Sep 27 '14 at 09:46
  • I dont understand you, I've read all the docs of the mediabox and I couldnt find what I was looking for. – Kuubs Sep 27 '14 at 11:55
  • What code? It's jus a standard plugin I downloaded: https://www.joomlacontenteditor.net/support/tutorials/jcemediabox I want to link to that specific popup on my site instead of linking to Youtube – Kuubs Sep 27 '14 at 12:11
  • http://www.toolboxcreations.com/articles/development/4-mediabox-how-to-implement-with-joomla – Prashant Tapase Sep 27 '14 at 12:28

2 Answers2

0

You could do that using url parameters. For example, link to your site would be something like: www.mysite.com/something?video_url=<some youtube link>. Then, on you page you can have event handler ($(document).ready(function(){...})) which would check if there is a 'video_url' param present in the url, and if it is just show the popup with <some youtube link> loaded in it. For example (getParameterByName(name) found here):

// a function that gets the value of query parameter
function getParameterByName(name) {
    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
    results = regex.exec(location.search);
    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}

// jquery used, but not really needed
$(document).ready(function() {
    var video_url = getParameterByName("video_url");
    // your function that shows the popup
    showPopup(video_url);
});
Community
  • 1
  • 1
Predrag Maric
  • 23,938
  • 5
  • 52
  • 68
  • How can I see this link? Because I cannot copy it because it's just linking to the Youtube page of the video. – Kuubs Sep 27 '14 at 11:55
  • I added an example, see edited answer and let me know if it works. – Predrag Maric Sep 27 '14 at 12:29
  • I think my question is wrongly formulated... I just want to take the URL of my website and set it to others, but automatically open the mediabox with said youtube movie in it... – Kuubs Sep 27 '14 at 13:59
0

Any objects you wish to open in Mediabox, simply add rel="mediabox[width height]" within the tag. Simple!

  <a href="http://www.youtube.com/view_play_list?p=63F0C78739B09958" rel="lightbox[social]" 
title="www.youtube.com playlist::hover over the window to see everything in the play queue">
    YouTube Playlist »</a>

For reference

OFficial website

Prashant Tapase
  • 2,132
  • 2
  • 25
  • 34
  • I guess I formulated the question wrong.. I want an URL so I can send it to mycolleagues, such as: http://www.website.com/?rel=mediabox[640 480]'http://www.youtube.com/?=movieid' I know this won't work but it's just an example... – Kuubs Sep 27 '14 at 14:01
  • see this site: http://www.dmnnetwork.com on the right there is a youtube movie behind a image. click the image and a popup appears. I want to link this so you open the dmnnetwork.com page with the popup with the movie in it... – Kuubs Sep 27 '14 at 14:29
  • Yes that is the movie. I want it to open IN the Mediabox ON MY website. NOT on the Youtube website. – Kuubs Sep 27 '14 at 14:38
  • check my updated answer. check my official website link provide in answer. then go tho social video then youtube playlist. – Prashant Tapase Sep 27 '14 at 14:43
  • It's still not what I want. I want to email the URL or save it on my phone. Please tell me if this is possible Just like i want to send http://www.youtube.com or like a URL to people. It's just that, nothing with coding or anything. Just URLS which the mediabox get automatically activated... I thought I had formulated my answer decently but I seem wrong. – Kuubs Sep 27 '14 at 14:55
  • Thanks! Appreciate the answer! – Kuubs Sep 27 '14 at 14:57