Embedd LastFM on CMSMS

Do something cool with CMS? Show us ...
This board is for 'Answers', and the discussion of answers... Not for questions.
Post Reply
comicinker

Embedd LastFM on CMSMS

Post by comicinker »

Hi! I want to embed a LastFM element on my homepages. I this code here:

Code: Select all

<style type="text/css">table.lfmWidget0d6e0dff44244942b205091e536d2f41 td {margin:0 !important;padding:0 !important;border:0 !important;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmHead a:hover {background:url(http://cdn.last.fm/widgets/images/en/header/chart/toptracks_regular_grey.png) no-repeat 0 0 !important;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmEmbed object {float:left;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmFoot td.lfmConfig a:hover {background:url(http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat 0px 0 !important;;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmFoot td.lfmView a:hover {background:url(http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat -85px 0 !important;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmFoot td.lfmPopup a:hover {background:url(http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat -159px 0 !important;}</style>
<table class="lfmWidget0d6e0dff44244942b205091e536d2f41" cellpadding="0" cellspacing="0" border="0" style="width:184px;"><tr class="lfmHead"><td><a title="comicinker: Overall Top Tracks" href="http://www.last.fm/user/comicinker/charts/?charttype=overall&subtype=track" target="_blank" style="display:block;overflow:hidden;height:20px;width:184px;background:url(http://cdn.last.fm/widgets/images/en/header/chart/toptracks_regular_grey.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/chart/19.swf" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="184" height="160" > <param name="movie" value="http://cdn.last.fm/widgets/chart/19.swf" /> <param name="flashvars" value="type=toptracks&user=comicinker&theme=grey&lang=en&widget_id=0d6e0dff44244942b205091e536d2f41" /> <param name="bgcolor" value="999999" /> <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/grey.png) repeat-x 0 0;text-align:right;"><table cellspacing="0" cellpadding="0" border="0" style="width:184px;"><tr><td class="lfmConfig"><a href="http://www.last.fm/widgets/?colour=grey&chartType=toptracks&user=comicinker&chartFriends=&from=code&widget=chart" title="Get your own widget" target="_blank" style="display:block;overflow:hidden;width:85px;height:20px;float:right;background:url(http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat 0px -20px;text-decoration:none;border:0;"></a></td><td class="lfmView" style="width:74px;"><a href="http://www.last.fm/user/comicinker/" title="View comicinker's profile" target="_blank" style="display:block;overflow:hidden;width:74px;height:20px;background:url(http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat -85px -20px;text-decoration:none;border:0;"></a></td><td class="lfmPopup"style="width:25px;"><a href="http://www.last.fm/widgets/popup/?colour=grey&chartType=toptracks&user=comicinker&chartFriends=&from=code&widget=chart&resize=1" title="Load this chart in a pop up" target="_blank" style="display:block;overflow:hidden;width:25px;height:20px;background:url(http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat -159px -20px;text-decoration:none;border:0;" onclick="window.open(this.href + '&resize=0','lfm_popup','height=260,width=234,resizable=yes,scrollbars=yes'); return false;"></a></td></tr></table></td></tr></table>
This are just two very long lines. But they inherit "{". A user defiened tag doesn't work either. Thats why I cannot just copy paste them How can I embed them?
comicinker

Re: Embedd LastFM on CMSMS

Post by comicinker »

Oh, I just put it into a global content block. I embedded it into a template with {global_content name=LastFM}. When clicked on preview, it showed me some errors. but when I submitted it, things were fine.
alby

Re: Embedd LastFM on CMSMS

Post by alby »

comicinker wrote: Oh, I just put it into a global content block. I embedded it into a template with {global_content name=LastFM}. When clicked on preview, it showed me some errors. but when I submitted it, things were fine.
No inherit "{" in content or global content.
If you want you must around your code (style, javascript, ...) with {literal} tag:
{literal}
table.lfmWidget0d6e0dff44244942b205091e536d2f41 td {margin:0 !important;padding:0 !important;border:0 !important;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmHead a:hover {background:url(http://cdn.last.fm/widgets/images/en/he ... r_grey.png) no-repeat 0 0 !important;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmEmbed object {float:left;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmFoot td.lfmConfig a:hover {background:url(http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat 0px 0 !important;;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmFoot td.lfmView a:hover {background:url(http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat -85px 0 !important;}table.lfmWidget0d6e0dff44244942b205091e536d2f41 tr.lfmFoot td.lfmPopup a:hover {background:url(http://cdn.last.fm/widgets/images/en/footer/grey.png) no-repeat -159px 0 !important;}

{/literal}
Alby
Post Reply

Return to “Tips and Tricks”