[SLED] Web Based Media Parcel URL switcher

Alan Levine alan at nmc.org
Thu Aug 23 23:39:43 PDT 2007


On Aug 23, 2007, at 11:21 PM, Birdie Newborn wrote:

> Good idea, intrepid coder -- does it work?

Yes it does. I have it set up to cover 12 different parcels now on  
NMC Campus for SLCC. I have the settings:

// for slcc
$default_stream =  'http://education.phreak-radio.com/';

// associative array of locations and media URLs
$showlist = array(
	'gonick' => $default_stream,
	'learning-performance' => 'http://media.nmc.org/sl/audio/symposium- 
anya-avatar.mp3',
	'learning-amphitheater' => 'http://media.nmc.org/2007/06/ 
castronova.mp3',
	'redrocks' => $default_stream,
	'cooper' => $default_stream,
	'babbage' => $default_stream,
	'teaching' => $default_stream,
	'teaching2' => 'http://media.nmc.org/sl/audio/filthy-fluno.mp3',
	'teaching3' => 'http://media.nmc.org/2007/06/woolsey.mp3',
	'teaching4' => 'http://media.nmc.org/sl/audio/rheingold- 
oct-21-2006.mp3',

	);

So if something happens like the default stream for SLCC changes, I  
just edit it once here (URl for $default_stream), and it is accessed  
anywhere I have set the media to the default



And a second version of this script is used for the video parcel URLs  
as well. Since we use Freeview screens, we just add two new bookmarks  
to the notecard in the freeview player, like:

	Cooper Coliseum Video|http://www.nmc.org/tools/sl-video.php?loc=cooper
	NMC Default Video|http://www.nmc.org/tools/sl-video.php



>
> On 8/22/07, Alan Levine <alan at nmc.org> wrote:
> NMC has quite a few sims and in those, even more parcels that have  
> media streams attached-- changing the URLs, or being able to set  
> say a single media URL across our lands is a tedious task,  
> especially for most of the sims where we need to edit with a  
> special admin avatar account.
>
> In looking at the upcoming SLCC where the stream provided to us may  
> be coming in last minute, or may need to be switched quickly across  
> say 5 sims, I thought of taking a different tact -- each audio  
> parcel URL, instead of pointing directly to an audio URL, points to  
> a PHP script on our web site, and passes a parameter that defines  
> the location. Once set, the media parcel URL would never need  
> changing. The script is like a big channel changer.
>
> The PHP script simply matches the passed parameter to an array  
> containing the current URL we want playing - so we could easily  
> change the media URLs for a number of sims simply by editing a  
> single PHP file on our web server.
>
> The script is not very complex (it cannot be if I coded it):
>
> ====================================================================== 
> =======
> <?php
> /* Set url for Second Life sims
> such basic php codery by Alan Levine, alan at nmc.org
>
> Rather than having to re-edit land parcels, point the media
> to the URL for this script, and add a value of ?loc=xxxxxx to  
> associate
> an audio URL defined in the array below
> */
>
> // set a default URL for anywhere it is not defined
> $default_stream = 'http://livestream.com/mystream';
>
> // associative array of locations and media URLs
> $showlist = array(
> 	'gonick' => ' http://media.nmc.org/2007/06/angela-thomas.mp3',
> 	'redrocks' => ' http://media.nmc.org/sl/audio/slcreativity/ 
> synetics-ted-kahn2.mp3',
> 	'conference' => ' http://media.nmc.org/sl/audio/slcc-larry- 
> johnson.mp3',
> 	'learning' => $default_stream,
> 	);
>
> // parameter for indicating location	
> $id = $_GET['loc'];
>
> // set to proper URL if loc is defined and it matches an array key
> $showtime = (isset($id) and array_key_exists($id,$showlist)) ?  
> $showlist[$id] : $default_stream;
>
> // return an audio stream
> header ("Location: $showtime");
> ?>
>
>
> ====================================================================== 
> =======
>
>
> I'm curious if this even makes sense or would be useful. And no  
> reason why it could not manage the video stream URLs as well. A  
> side benefit is that one now has a permanent URL (the one below is  
> fake) to share as a link outside of SL "Tune in to what in playing  
> at the Gonick Amphitheater! http://www.nmc.org/tools/sl-audip- 
> clicker.php?loc=gonick
>
>
> ------------------------------------------------------------
> Alan Levine aka CDB Barkley   ✪
> ------------------------------------------------------------
> NMC: The New Media Consortium: sparking innovative learning and  
> creativity
> NMC Campus Observer - What's going on at our place in Second Life:
> http://sl.nmc.org/
>
> Symposium on Creativity in Second Life- Aug 12-18, 2007
>   http://www.nmc.org/symposium-on-creativity
> NMC Teachers Buzz - every other Monday
>   http://sl.nmc.org/wiki/Teachers_Buzz_Session
>
>
>
>
>
>
> _______________________________________________
> Educators mailing list
> To unsubscribe
> https://lists.secondlife.com/cgi-bin/mailman/listinfo/educators
>
>
>
>
> -- 
> ..oooO...........
> ...(....)............
> ....)../...Oooo..
> ...(_/.....(....)...
> .............)../.....
> ............(_/......
>
> If we're facing in the right direction,
> all we have to do is keep on walking.
>
> Birdie Newborn
> SL: Birdie Newcomb on Belle Isle
> www.beachcollege.net
> _______________________________________________
> Educators mailing list
> To unsubscribe
> https://lists.secondlife.com/cgi-bin/mailman/listinfo/educators



------------------------------------------------------------
Alan Levine ✪
Vice President, NMC Community and CTO
------------------------------------------------------------
NMC: The New Media Consortium: sparking innovative learning and  
creativity
2499 S, Capital of Texas Highway. Bldg. A, Suite 202 Austin, TX  78746
(512) 445-4200 | (512) 445-4205 fax
http://www.nmc.org

NMC Campus Observer: Second Life http://sl.nmc.org/
NMC Virtual Worlds: http://virtualworlds.nmc.org

Upcoming NMC events:
* Symposium on Creativity in Second Life- Aug 12-18, 2007 in Second Life
* Pachyderm Users Conference- Sep 18-20, 2007 Austin
* Fall Regional Conference- Nov 7-9, 2007 New Orleans, hosted by  
Tulane University
* Fall 2007 Online Conference- Dec 4-5, 2007 Something new, not to be  
missed

For details see http://www.nmc.org/cal




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/educators/attachments/20070823/4848b994/attachment.htm


More information about the Educators mailing list