DJing Discussion

This area is for discussion about DJing in general. Please remember the community rules when posting and try to be polite and inclusive.

Embedding your Playlist url in a website

DJ Quartz 11:07 PM - 24 April, 2013
Any webheads out there?

I revamped my website and I would like to embed my playlist page. I used the iframe control but I'm wondering if there is a way you can force the original page to resize to the dimensions set for the iframe?
jprime 11:13 PM - 24 April, 2013
Don't use iframes to begin with, if you have the playlist, just pop it into an ordered list and voila.
jprime 11:15 PM - 24 April, 2013
If you must use an iframe though - you can set it's width and height properties.

www.w3schools.com

<iframe width=x height=y> Why in gods name am i using iframes</iframe>
DJ Quartz 11:19 PM - 24 April, 2013
Right, but that's not the problem. Working with an wordpress page so I want to have everything width wise without scrolling a left to right.

Scrolling up/down is what I want however.

working with this currently,

<iframe src="serato.com width="1000" height="430" style="-webkit-transform:scale(0.9);-moz-transform-scale(0.9)></iframe
>
DJ Quartz 11:25 PM - 24 April, 2013
Just to clarify, I'm referring to the serato playlist page.
AliKat 9:39 AM - 14 June, 2013
I use a plugin by Rocket Themes that is free called RokBox to display another site with a lightbox effect, within my site. I lose less traffic by doing it this way. It may not be embedded, but it's the next best thing imho.

Check it out in action on my homepage at alikat.ca (Click on the Serato Live Playlist link in the sidebar)

PS, Hi JPrime! :P
DJ Quartz 1:20 PM - 14 June, 2013
Hi AliKat,

This is exactly what I tried to do using just the lightbox effect but it didn't work in the Dance Floor theme.

Right now I'm just doing this, but having a width problem.

www.djquartz.ca
ral 6:01 PM - 14 June, 2013
or you can just export your history as txt/csv and use jquery to load that text in your website

code-tricks.com
jprime 6:35 PM - 14 June, 2013
I don't think transform will work like that inside an iframe. Useful info from StackOverflow:

stackoverflow.com

'Inside an IFrame the browser automatically renders the website page as if it were in a separate page, it behaves in the same manner as if for example you resized the browser... the web page will be displayed as it was designed whether that is a fluid design on fixed dimensions or whatever... you cannot force a different rendering behavior on the site. You could however programmatically modify the page's markup'
jprime 6:37 PM - 14 June, 2013
You could use a PHP cURL call to collect the data inside the elements you want, mark it up how you want, and stuff it into a DIV or whatever.

I have a wordpress site and can mess around with it for fun...
DJ Quartz 6:58 PM - 14 June, 2013
If there was a way we could pull the info directly or maybe we should make a widget or something.

I did approach Serato webmaster on this and they mentioned something is in the pipe as well.
jprime 7:53 PM - 14 June, 2013
A js include for width / height / color / etc settings, a php file to pull the data from a url....should be straightforward.
AliKat 9:25 AM - 15 June, 2013
Omigod, why don't you in just increase the width of your container using CSS

.post-wrapper-full {width:1000px;}
AliKat 9:25 AM - 15 June, 2013
dummies
AliKat 9:29 AM - 15 June, 2013
Quote:
or you can just export your history as txt/csv and use jquery to load that text in your website

code-tricks.com


I do this as well using a plugin... called TablePress

you can see an example of my imported playlist here:
alikat.ca

Just click on the "Download Link & Playlist" url to see the playlist
DJ Quartz 1:00 PM - 15 June, 2013
Omigod, why don't you in just increase the width of your container using CSS

.post-wrapper-full {width:1000px;}

Doesn't work, that was the first thing I tried.

Far from a dummy, miss
AliKat 3:30 PM - 15 June, 2013
I wasn't calling you a dummy, I was calling Jprime one. We've known one another for years.

And you're probably doing it wrong. You need to increase the width of the wrapper too. I didn't mention that because I thought it was fairly obvious.

Make me a login and I'll do it for you in less than 5 minutes.
DJ Quartz 11:38 PM - 15 June, 2013
Gotcha, my apologies.

Well what I'm going to do is the lightbox effect because I originally wanted to do it that way I just had to get some other things fixed before I could come back to it.

Or I might just wait for the widget from Serato if they make one.
jprime 3:16 AM - 16 June, 2013
lol Ali. I was under the impression he wanted to shrink the contents to fit his smaller sized div


not increase the div to fit the contents. Completely different scenario. correct me if I am wrong please OP.
DJ Quartz 2:35 AM - 17 June, 2013
I found a technique to shrink it and I didn't like the results.

I think what I would like to do is not have playlists display on a page but directly pop up a light box with the playlist site instead.

Alikat's link has the perfect example of what I would like to do instead just never had the time to play around yet.
AliKat 7:17 AM - 17 June, 2013
cool, it takes about 5 minutes to set up the plugin, its a simple shortcode.

good luck, drop us a line when you get yourself sorted. :D
DJ Quartz 1:49 PM - 17 June, 2013
I'm going to update it this morning.

I'm assuming I should be able to put the shortcode in the page and it should trigger when you click on the playlists menu link.
DJ Quartz 3:13 PM - 17 June, 2013
Got the plug-in just looking for docs on how to use the shortcode.
jprime 3:38 PM - 17 June, 2013
Ah I see. Yeah that sounds like childs play ;)
DJ Quartz 3:40 PM - 17 June, 2013
Got it working already with the test code, just need the auto trigger on click now.

Thanks for the tip Alikat, it looks so much better and much more elegant of a solution compared to what I was doing previously.
AliKat 8:28 PM - 17 June, 2013
auto trigger on click???

the shortcode is simple, you can find it here: (Mouse over features on the main menu and then click on RokBox)
demo.rockettheme.com

the shortcode I use is:

[rokbox size="75% 90%" text="Serato.com Live Playlist"]serato.com[/rokbox]
DJ Quartz 8:42 PM - 17 June, 2013
Right, that makes a link for you to click which I was testing with.

What I need to do is having that code launch when playlists is clicked instead of loading the page in order and having the user click an actual hyperlink.

Know what I mean?
DJ Quartz 8:49 PM - 17 June, 2013
Mine works nicely at 85%, no horizontal scroll bar.
jprime 9:02 PM - 17 June, 2013
?

'Your playlists' page just has a facebook link now for me :/
DJ Quartz 9:11 PM - 17 June, 2013
I was changing the code, it's back now
jprime 9:16 PM - 17 June, 2013
"What I need to do is having that code launch when playlists is clicked instead of loading the page in order and having the user click an actual hyperlink."

toss a function call into your JS?

$('#myPlayslistsMenuID').click(function(e){
//do whatever code you want
});
jprime 9:17 PM - 17 June, 2013
Or better, bind it on your main page

$('#myPlayslistsMenuID').live("click", function(e){
//do whatever code you want
});
AliKat 9:30 PM - 17 June, 2013
No, Sorry I don't really understand what you mean.

Looks like Jprime does tho.
AliKat 9:31 PM - 17 June, 2013
ok, i think I know what you mean, and I would just enter each playlist link manually on my webpage with the shortcode. Takes a lot more up keep tho.
AliKat 9:39 PM - 17 June, 2013
for me, all i really want to display is my Serato Live Playlist when i am broadcasting my radio show. By default it shows all my playlists when I am not streaming a Live playlist.

Anyhow, I'm not sure I can be much more help from this point. Jprime is highly skilled, respected Programmer. He has experience with numerous languages and platforms. so you're in good hands. I suggest you take his advice as he will steer you in the right direction.

Once again I wish you good luck!
DJ Quartz 9:47 PM - 17 June, 2013
I was looking in the wordpress menus to see if I could do something custom from there.
DJ Quartz 9:51 PM - 17 June, 2013
@ Alikat,

To clarify what I was saying, you see how you have a link for your pop up window.

What I'm attempting to do is have the window launched when you click the playlists control in my menu bar instead.

I have a link currently on there but I think I might have a creative way to do this as well.
DJ Quartz 10:03 PM - 17 June, 2013
I'm going to use icons for now because I will want to have more that one playlist category eventually.
DJ Quartz 11:28 PM - 17 June, 2013
I didn't like how that looked so I scrapped that idea.
DJ Quartz 4:58 AM - 18 June, 2013
Need some assistance, almost there,

<body>
<script type="text/javascript">
function simulateClick(control)
{
if (document.all)
{
control.click();
}
else
{
var evObj = document.createEvent('MouseEvents');
evObj.initMouseEvent('click', true, true, window, 1, 12, 345, 7, 220, false, false, true, false, 0, null );
control.dispatchEvent(evObj);
}
}
</script>

<a rel="rokbox[85% 90%]" title="" href="serato.com id="playlist" onclick="javascript:_gaq.push(['_trackEvent','outbound-widget','serato.com]);" class="rokbox-image"></a>

<script type="text/javascript">
simulateClick(document.getElementById('playlist'));
</script>
</body>

This causes the playlist url to open full screen, I just need to figure out how to get it into the rokbox window.
DJ Quartz 5:04 AM - 18 June, 2013
Ignore this line... <a rel="rokbox[85% 90%]" title="" href="serato.com id="playlist" onclick="javascript:_gaq.push(['_trackEvent','outbound-widget','serato
.com]);"class="rokbox-image"></a>

The code is wrong!

Correct code...

<a rel="rokbox[85% 90%]" title="" href="serato.com id="playlist" onclick="javascript:_gaq.push(['_trackEvent','outbound-widget','serato.com]);" class="rokbox-image"></a>
DJ Quartz 5:05 AM - 18 June, 2013
^ Never mind I see what it did. I forgot the forum code changes the displayed url.
DJ Quartz 1:53 PM - 18 June, 2013
So the problem with the above code is it will only open in full screen vs in the rokbox window.
jprime 3:42 PM - 18 June, 2013
Where is this code that I can see it in action?
jprime 3:43 PM - 18 June, 2013
nm, found in on your site.

Works fine in Firefox and Chrome. What's your issue?
DJ Quartz 3:54 PM - 18 June, 2013
No no,

I changed it back so you have to click on the serato playlist pic.

I had it opening automatically yesterday when you click on playlist but it only opens fully screen.

I'll change it back right now so you can see what I mean.
DJ Quartz 3:56 PM - 18 June, 2013
Just changed it back to the above code.
DJ Quartz 3:57 PM - 18 June, 2013
You'll see that the autoclick works because it launches the playlist page but not inside the rokbox window.

That's what I need to fix.
jprime 4:19 PM - 18 June, 2013
Why not inject the code into the playlist menu item on page load like this instead:


$(document).ready(function(){

$('#menu-item-30').html(
'<a rel="rokbox[85% 90%]" title="" href="serato.com onclick="javascript:_gaq.push(['_trackEvent','outbound-widget','serato.com]);" class="rokbox-image" id="playlist">Playlists</a>'
);

});
jprime 4:27 PM - 18 June, 2013
^^remembering to escape the single quotes of course :P
DJ Quartz 4:28 PM - 18 June, 2013
Couldn't figure it out, didn't know how to do it yet.
DJ Quartz 4:32 PM - 18 June, 2013
I tried doing this the other day by place such code between
1. 
but it didn't work.
DJ Quartz 4:32 PM - 18 June, 2013
code /code is what that should say above ^
jprime 4:41 PM - 18 June, 2013
Try plopping this near the top of your code:


$(document).ready(function(){

$('#menu-item-30').html(

'<a rel="rokbox[85% 90%]" title="" href="serato.com id="playlist" onclick="javascript:_gaq.push([\'_trackEvent\',\'outbound-widget\',\'serato.com\']);" class="rokbox-image">Playlists</a>'

);

});
jprime 4:42 PM - 18 June, 2013
oh ffs, wrong bit:

$(document).ready(function(){

$('#menu-item-30').html(

'<a rel="rokbox[85% 90%]" title="" href="serato.com id="playlist" onclick="javascript:_gaq.push([\'_trackEvent\',\'outbound-widget\',\'s
erato.com\']);"class="rokbox-image">Playlists</a>'

);

});
DJ Quartz 4:52 PM - 18 June, 2013
Just figuring out where it needs to go. Thanks
DJ Quartz 5:03 PM - 18 June, 2013
Some reason I can't get that code to work.

However, the previous code does launch the playlist url but only in fullscreen.

'<a rel="rokbox[85% 90%]" title="" href="serato.com onclick="javascript:_gaq.push(['_trackEvent','outbound-widget','serato.com]);" class="rokbox-image" id="playlist" id="playlist"></a>'

Am I calling it incorrectly?
jprime 5:19 PM - 18 June, 2013
pm ;)
AliKat 10:02 AM - 19 June, 2013
there ya go, its probably easier to just give jprime access and let him have at 'er.

ta boys.

:-*