Revision history for LastFMAction


Revision [23182]

Last edited on 2016-05-20 07:38:47 by CimNine [Replaces old-style internal links with new pipe-split links.]
Additions:
=====[[LastFMAction | LastFM]] Action=====
Documentation: LastFMActionInfo.>>This is the development page for the [[LastFMAction | LastFM]] action.::c::
Deletions:
=====[[LastFMAction LastFM]] Action=====
Documentation: LastFMActionInfo.>>This is the development page for the [[LastFMAction LastFM]] action.::c::


Revision [19109]

Edited on 2008-01-28 00:14:03 by CimNine [Modified links pointing to docs server]

No Differences

Revision [16615]

Edited on 2007-05-20 10:36:37 by CimNine [updated to v1.1.1]
Additions:
=##v1.1.1##=
~- __fix:__ playlist loaded the wrong widget
~- __fix:__ playlist ignored the theme settings##
print "<strong>You must provide the kind of LastFM (chart,radio,playlist,quilt) and a username.</strong>";
print "<strong>You must provide a type of playlist (recently,otracks (overall tracks),".
"oartists (overall artists),wtracks (weekly tracks), wartists (weekly artists))</strong>";
print "<strong>You must provide a type of quilt (album,artist)</strong>";





bgcolor="'.$bgcolor.'" width="'.$width.'" height="'.$height.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"


<param name="movie" value="http://panther1.last.fm/widgets/playlist/3.swf" />
bgcolor="'.$bgcolor.'" width="'.$width.'" height="'.$height.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
FlashVars="lfmMode=playlist&resourceType=37&resourceID=570204&radioURL=user%2F'.$user.'%2Fplaylist&username='.$user.'&title='.$user.'%E2%80%99s+Playlist&theme='.$style.'&autostart='.$autostart.'"



print "<strong>Can't identify the kind of widget. Please only use chart,radio,plist (playlist),quilt.</strong>";
Deletions:
print "<strong>You must provide the kind of LastFM (chart,radio,playlist,quilt) and a username.</strong>";
print "<strong>You must provide a type of playlist (recently,otracks (overall tracks),".
"oartists (overall artists),wtracks (weekly tracks), wartists (weekly artists))</strong>";
print "<strong>You must provide a type of quilt (album,artist)</strong>";







FlashVars="lfmMode=playlist&resourceType=37&resourceID=570204&radioURL=user%2F'.$user.'%2Fplaylist&username='.$user.'&title='.$user.'%E2%80%99s+Playlist&theme'.$style.'&autostart='.$autostart.'"



print "<strong>Can't identify the kind of widget. Please only use chart,radio,plist (playlist),quilt.</strong>";


Revision [16613]

Edited on 2007-05-20 10:20:53 by CimNine [updated to v1.1]
Additions:
==Changelog==
=##v1.0##=
##
~- __init__##
=##v1.1##=
##
~- __fix:__ autostart from radio doesn't work correctly
~- __new:__ playlist widget implemented##
__''WARNING: May contain one, two bugs, but it works all in all.''__
**actions/lastfm.php**
Based on YouTube plugin created by Grant Young.
{{lastfm src="plist" user="#####" [float="left|right" style="red|blue|black|grey" size="regular|mini" width="148" height="140"] }}
$autostart="";
$height="248";
$autostart="";
FlashVars="lfmMode=playlist&resourceType=37&resourceID=570204&radioURL=user%2F'.$user.'%2Fplaylist&username='.$user.'&title='.$user.'%E2%80%99s+Playlist&theme'.$style.'&autostart='.$autostart.'"
Deletions:
**''WARNING: Playlist-Feature __not__ implemented yet!!!''**
**''WARNING2: May contain one, two bugs, but works all in all.''**
actions/lastfm.php
{{lastfm src="plist" user="#####" [float="left|right" style="red|blue|black|grey"] }}
$autostart="false";
print '<strong>Not implemented yet.</strong>';


Revision [16592]

Edited on 2007-05-17 17:25:56 by CimNine [updated to v1.1]

No Differences

Revision [16591]

Edited on 2007-05-17 17:25:47 by CimNine [updated to v1.1]
Additions:
**''WARNING2: May contain one, two bugs, but works all in all.''**


Revision [16588]

Edited on 2007-05-17 17:17:37 by CimNine [updated to v1.1]
Additions:
With this action you can embed the widgeds of last.fm .
Deletions:
With this action you can embed the widgeds of LastFM.


Revision [16587]

Edited on 2007-05-17 17:17:11 by CimNine [updated to v1.1]
Additions:
Documentation: LastFMActionInfo.>>This is the development page for the [[LastFMAction LastFM]] action.::c::
Deletions:
Documentation: LastFMActionInfo.>>This is the development page for the [[LastFMAction iFilm]] action.::c::


Revision [16583]

Edited on 2007-05-17 16:33:52 by CimNine [init]
Additions:
=====[[LastFMAction LastFM]] Action=====
Documentation: LastFMActionInfo.>>This is the development page for the [[LastFMAction iFilm]] action.::c::
With this action you can embed the widgeds of LastFM.
**''WARNING: Playlist-Feature __not__ implemented yet!!!''**
actions/lastfm.php
LastFM plugin created by CimNine.
USE:
{{lastfm src="chart" user="#####" type="recently|otracks|oartists|wtracks|wartists" [float="left|right" style="red|blue|black|grey" width="184" height="140"] }}
{{lastfm src="radio" user="#####" [autostart="false|true" float="left|center|right" style="red|blue|black|grey" size="regular|mini" width="148" height="140"] }}
Provide size OR width&height!
{{lastfm src="plist" user="#####" [float="left|right" style="red|blue|black|grey"] }}
{{lastfm src="quilt" user="#####" type="album|artist" [float="left|right" style="red|blue|black|grey" size="small|medium|large" orient="hori|vert" width="148" height="140"]}}
Provide size&orient (orientation) OR width&height!
//Check values
if (!($src) || !($user)) {
print "<strong>You must provide the kind of LastFM (chart,radio,playlist,quilt) and a username.</strong>";
if ($style=="black")
$style = "black";
$bgcolor = "000000";
} elseif ($style=="red")
$style = "red";
$bgcolor = "d01f3c";
} elseif ($style=="blue")
$style = "blue";
$bgcolor = "000000";
} else
$style = "grey";
$bgcolor = "999999";
if (!$float || ($float != "right" && $float != "left"))
$float = "left";
if ($src=="chart" && !$type)
print "<strong>You must provide a type of playlist (recently,otracks (overall tracks),".
"oartists (overall artists),wtracks (weekly tracks), wartists (weekly artists))</strong>";
return;
if ($src=="radio" && !$size)
$size = "regular";
if ($src=="quilt")
if (!$type)
{
print "<strong>You must provide a type of quilt (album,artist)</strong>";
return;
}
if (!$size)
{
$size="small";
}
if (!$orient)
{
$orient="vert";
}
//gen HTML
if ($src=="chart")
//fill size
$width="184";
$height="140";

//fill kind
//recently|otracks|oartists|wtracks|wartists
if ($type == "otracks")
$type="toptracks";
} elseif ($type == "oartists")
$type="topartists";
} elseif ($type == "wtracks")
$type="weeklytrackchart";
} elseif ($type == "wartists")
$type="weeklyartistchart";
} else
$type="recenttracks";

print '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="184" height="140"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab%23version=7,0,0,0" style="float:'.$float.';">

<param name="bgcolor" value="'.$bgcolor.'" />
<param name="movie" value="http://panther1.last.fm/widgets/chart/2.swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="sameDomain" />
<embed
src="http://panther1.last.fm/widgets/chart/2.swf" type="application/x-shockwave-flash" name="widgetPlayer"
bgcolor="'.$bgcolor.'" width="'.$width.'" height="'.$height.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
FlashVars="type='.$type.'&user='.$user.'&theme='.$style.'"
allowScriptAccess="sameDomain">
</embed>
} elseif ($src=="radio")
//fill size
if ($size)
if ($size=="mini")
{
$height="140";
$width="110";
} else
{
$height="140";
$width="184";
}
} else
if (!$width)
{
$width="140";
}
if (!$height)
{
$height="184";
}

//correct autostart
if ($autostart != "true")
$autostart="false";

print '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'.$width.'" height="'.$height.'"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab%23version=7,0,0,0" style="float:'.$float.';">
<param name="bgcolor" value="'.$bgcolor.'" />
<param name="movie" value="http://panther1.last.fm/widgets/radio/3.swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="sameDomain" />
<embed
src="http://panther1.last.fm/widgets/radio/3.swf" type="application/x-shockwave-flash" name="widgetPlayer"
bgcolor="'.$bgcolor.'" width="'.$width.'" height="'.$height.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
FlashVars="lfmMode=radio&radioURL=user%2F'.$user.'%2Fneighbours&title='.$user.'%E2%80%99s+Neighbourhood&theme='.$style.'&autostart='.$autostart.'"
allowScriptAccess="sameDomain">
</embed>
} elseif ($src=="plist")
print '<strong>Not implemented yet.</strong>';
} elseif ($src=="quilt")
//fill size
if ($size)
if ($orient="vert")
{
if ($size=="small")
{
$height="370";
} elseif ($size=="large")
{
$height="640";
} else
{
$height="505";
}
$width="234";
} else {
if ($size=="small")
{
$height="235";
} elseif ($size=="large")
{
$height="325";
} else
{
$height="280";
}
$width="510";
}
} else
if (!$width)
{
$width="234";
}
if (!$height)
{
$height="505";
}

//fill kind
if ($type=="artist")
$type="topartists";
} else
$type="topalbums";

print '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'.$width.'" height="'.$height.'"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab%23version=7,0,0,0" style="float:'.$float.';">

<param name="bgcolor" value="'.$bgcolor.'" />
<param name="movie" value="http://panther1.last.fm/widgets/quilt/6.swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="sameDomain" />
<embed
src="http://panther1.last.fm/widgets/quilt/6.swf" type="application/x-shockwave-flash" name="widgetPlayer"
bgcolor="'.$bgcolor.'" width="'.$width.'" height="'.$height.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
FlashVars="type=user&variable='.$user.'&file='.$type.'&bgColor='.$style.'&theme='.$style.'"
allowScriptAccess="sameDomain">
</embed>
} else
print "<strong>Can't identify the kind of widget. Please only use chart,radio,plist (playlist),quilt.</strong>";
Deletions:
=====[[IFilmAction iFilm]] Action=====
Documentation: IFilmActionInfo.>>This is the development page for the [[IFilmAction iFilm]] action.::c::
This action provides you an interace to embed iFilm-Movies (like the [[YouTube YouTube Action]]).
actions/ifilm.php
iFilm plugin created by CimNine.
Based on YouTube plugin created by Grant Young.
USE: {{ifilm url="http://www.ifilm.com/video/#######" [width="425" height="350" bgcolor="#ffffff"]}}
'url' must be provided.
'width', 'height' and 'bgcolor' are all optional. Defaults are listed above.
if (!($url)) {
print "<strong>You must provide the iFilm url, including 'http://'.</strong>";
$width = 425;
$height = 350;
if (!$bgcolor)
$bgcolor = "#ffffff";
// http://www.ifilm.com/video/2854851 - if URL in this format, extract id of movie
$ptn = "/video\/([0-9]{7})$/";
if (preg_match($ptn, $url, $matches))
$id = $matches[1];
else
print "<strong>The provided URL was not in the correct format.</strong>";
print '<object type="application/x-shockwave-flash" data="http://www.ifilm.com/efp" width="'.$width.'" height="'.$height.'" id="VideoPlayback">
<param name="movie" value="http://www.ifilm.com/efp" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="quality" value="best" />
<param name="bgcolor" value="'.$bgcolor.'" />
<param name="scale" value="noScale" />
<param name="FlashVars" value="flvbaseclip='.$id.'&" />


Revision [16582]

The oldest known version of this page was created on 2007-05-17 16:29:42 by CimNine [init]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki