TinyPortal

Development => Block Codes => Topic started by: dedalus on February 29, 2008, 03:37:51 AM

Title: Code for a radio block
Post by: dedalus on February 29, 2008, 03:37:51 AM
Hi guys !!

A couple of days ago I installed a SMF site with Tiny Portal. My congratulations, it´s very, very nice indeed !!
I'm familiar with IPB, VB, PHP Nuke, etc, but SMF+TP is now my favorite as it allows a lot of options without having to edit any php/html.

Today, I decided to add a block with radio and it worked at the 1st try !!
This is how it looks like:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fjoaomat.com%2Ffiles%2Flastfm.jpg&hash=a824be5eb5803bbe5c0ed261e35e68d3f208d2bb)

Want to give it a try?
Go to http://lastfm.pt and click on Widgets --> radio --> Tag/gender(write whatever you like) --> generate --> mini --> black --> Show code.

For the block, I select the scriptbox type and add the code.

Here's for a Chillout box:
<center><style type="text/css">table.lfmWidgetf8d7617a7fa10beaf8bb5df596775ebf td {margin:0 !important;padding:0 !important;border:0 !important;}table.lfmWidgetf8d7617a7fa10beaf8bb5df596775ebf tr.lfmHead a:hover {background:url(http://cdn.last.fm/widgets/images/pt/header/radio/mini_black.png) no-repeat 0 0 !important;}table.lfmWidgetf8d7617a7fa10beaf8bb5df596775ebf tr.lfmEmbed object {float:left;}table.lfmWidgetf8d7617a7fa10beaf8bb5df596775ebf tr.lfmFoot td.lfmConfig a:hover {background:url(http://cdn.last.fm/widgets/images/pt/footer/black.png) no-repeat 0px 0 !important;;}table.lfmWidgetf8d7617a7fa10beaf8bb5df596775ebf tr.lfmFoot td.lfmView a:hover {background:url(http://cdn.last.fm/widgets/images/pt/footer/black.png) no-repeat -85px 0 !important;}table.lfmWidgetf8d7617a7fa10beaf8bb5df596775ebf tr.lfmFoot td.lfmPopup a:hover {background:url(http://cdn.last.fm/widgets/images/pt/footer/black.png) no-repeat -159px 0 !important;}</style><br />
<table class="lfmWidgetf8d7617a7fa10beaf8bb5df596775ebf" cellpadding="0" cellspacing="0" border="0" style="width:110px;"><tr class="lfmHead"><td><a title="Músicas com a tag 'chillout' " href="http://www.lastfm.pt/listen/globaltags/chillout" target="_blank" style="display:block;overflow:hidden;height:20px;width:110px;background:url(http://cdn.last.fm/widgets/images/pt/header/radio/mini_black.png) no-repeat 0 -20px;text-decoration:none;border:0;"></a></td></tr><tr class="lfmEmbed"><td><object type="application/x-shockwave-flash" data="http://cdn.last.fm/widgets/radio/19.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="110" height="140" > <param name="movie" value="http://cdn.last.fm/widgets/radio/19.swf" /> <param name="flashvars" value="lfmMode=radio&amp;radioURL=globaltags%2Fchillout&amp;title=M%C3%BAsicas+com+a+tag+%27chillout%27+&amp;theme=black&amp;autostart=&amp;lang=pt&amp;widget_id=f8d7617a7fa10beaf8bb5df596775ebf" /> <param name="bgcolor" value="000000" /> <param name="quality" value="high" /> <param name="allowScriptAccess" value="always" /> <param name="allowNetworking" value="all" /> </object></td></tr><tr class="lfmFoot"><td style="background:url(http://cdn.last.fm/widgets/images/footer_bg/black.png) repeat-x 0 0;text-align:right;"><table cellspacing="0" cellpadding="0" border="0" style="width:110px;"><tr><td class="lfmConfig"><a href="http://www.lastfm.pt/widgets/?url=globaltags%2Fchillout&amp;colour=black&amp;size=mini&amp;autostart=&amp;from=code&amp;widget=radio" title="Faça um widget como esse para você" target="_blank" style="display:block;overflow:hidden;width:85px;height:20px;float:right;background:url(http://cdn.last.fm/widgets/images/pt/footer/black.png) no-repeat 0px -20px;text-decoration:none;border:0;"></a></td><td class="lfmPopup"style="width:25px;"><a href="http://www.lastfm.pt/widgets/popup/?url=globaltags%2Fchillout&amp;colour=black&amp;size=mini&amp;autostart=&amp;from=code&amp;widget=radio&amp;resize=1" title="Abrir este widget em um pop-up" target="_blank" style="display:block;overflow:hidden;width:25px;height:20px;background:url(http://cdn.last.fm/widgets/images/pt/footer/black.png) no-repeat -159px -20px;text-decoration:none;border:0;" onclick="window.open(this.href + '&amp;resize=0','lfm_popup','height=240,width=160,resizable=yes,scrollbars=yes'); return false;"></a></td></tr></table></td></tr></table></center>


Hope it's useful
Regards
Title: Re: Code for a radio block
Post by: rockskullz on March 03, 2008, 03:33:02 AM
got this in english?
Title: Re: Code for a radio block
Post by: Smoky on March 03, 2008, 04:18:17 AM
hey RockSkull.. you need to go to the site to see if they have english.. maybe that will work for you  ;)
Title: Re: Code for a radio block
Post by: IchBin on March 03, 2008, 04:19:55 AM
http://www.last.fm/widgets/radio/
Title: Re: Code for a radio block
Post by: rockskullz on March 03, 2008, 05:14:37 AM
awesome block! not sure why it didnt show up in english the first time i looked. Couldnt navigate the site very well. Thanks for sharing!
Title: Re: Code for a radio block
Post by: rockskullz on March 03, 2008, 05:41:27 AM
anyway of making it run without interrupting on each new page view?
Title: Re: Code for a radio block
Post by: Zetan on March 03, 2008, 07:31:16 AM
It would have to go in a popup window.
Title: Re: Code for a radio block
Post by: dedalus on March 03, 2008, 11:56:22 PM
Hi guys....

Sorry for my late reply.
In fact it can be in english too and a lot more languages.
Quote from: IchBinâ,,¢ on March 03, 2008, 04:19:55 AM
http://www.last.fm/widgets/radio/
I posted the PT link cause there was some malfunction at the Eng page when i did this post.

And yes, you can have it as a popup. Just click on the right lower corner.

Regards
Title: Re: Code for a radio block
Post by: cazador on March 07, 2008, 01:39:42 PM
I'm useing it, it's a good block
Title: Re: Code for a radio block
Post by: Zetan on March 07, 2008, 01:53:15 PM
Quote from: dedalus on March 03, 2008, 11:56:22 PM
Sorry for my late reply.

Thats ok.. you just got here in time  ::)
Title: Re: Code for a radio block
Post by: IchBin on March 08, 2008, 07:23:41 PM
Moved your post as it wasn't relevant to the topic anna.
http://www.tinyportal.net/index.php?topic=22406.0