Space 简易教程(二十八)—— PowerToy 之应用实例

来源:百度文库 编辑:神马文学网 时间:2024/04/28 12:33:32
Space 简易教程(二十八)—— PowerToy 之应用实例

MSN Space Easy Tutorial (28) —— Application of PowerToy Modules


中文版   MSN Space 推出 PowerToy 已经有十多天了,不少朋友的网页上已经有了很多变化,比如:添加了 Windows Media Player 模块来播放音乐或者电影文件,用 Tweak UI 模块来调节背景、模块、字体的颜色等。在这里我就说说几个大家可能感兴趣的应用,也算是回答一些朋友所提出的问题。对于 PowerToy 模块还不了解的朋友,请先看看教程(二十六)的内容。

(一)背景音乐中多首歌曲的连续播放

很早就有朋友问我,是否能在 Space 中连续播放多首背景音乐。目前 MSN Space 新推出了 Windows Media Player 模块,则给我们解决单一的背景音乐提供了一个很好的途径。只要制作一个简单的音乐文件列表,再上传到网络上的免费空间,就可以达到目的了。具体方法如下:

1、音乐文件列表的制作
用“记事本”新建一个文件,把你所要播放的背景音乐文件地址依次写到这个文件中。其中每一行只能放一个地址,而且只要网址,不要加歌曲名、编号等注释!例如:三首轻音乐的列表文件内容

http://www.lyrebird.org/midi/secret.mid
http://blogfile.nate.com/data/11/newsirin/169420.wma
http://cw.hc.edu.tw/pupst0103/music/01.The%20Touch%20of%20Love.mp3

按照下图所示,将做好的音乐列表文件保存为 MP3 文件。

English Version   The PowerToy Modules have been introduced into MSN Spaces for about 2 weeks. Many friends began to use them to make their spaces more colorful. I also studied how to use these PowerToys to get special effects. In this tutorial, I will show you some application of them that you may be interested. If you do not know how to install PowerToys in your space, please read my "MSN Space Easy Tutorial (26) —— PowerToy Modules" first.  

① Play Multiple Song/Movie Files in the Windows Media Player Module

Before Windows Media Player (WMP) Module appears in MSN Spaces, it is not easy to play multiple songs one by one as background music. Now with WMP, it only takes three easy steps to get it done.


1. Create a playlist file of songs Use "Notepad" to creat a new text document, such as bgmusic_list.txt. Copy the URL of each song/music into this file. Every URL of the song should be in a single line. Please no number or notes before/after the URLs of songs. For example, here is the list of three music I like:

http://www.lyrebird.org/midi/secret.mid
http://blogfile.nate.com/data/11/newsirin/169420.wma
http://cw.hc.edu.tw/pupst0103/music/01.The%20Touch%20of%20Love.mp3


2、音乐列表文件的上传
将做好的音乐列表文件(.mp3)上传到你的免费网络空间中,记下其地址。例如:我的列表文件地址为

http://www31.websamba.com/atiger1974/MSN_Space/bgmusic_list.mp3

3、背景音乐文件的播放
将列表文件地址放到你的 Window Media Player 模块的 URL 中。按“Save”按钮后,就可以预览你的空间了。这三首轻音乐会按照列表文件中的顺序依次拨出。

通过这个办法,不仅可以连续播放多首背景音乐,而且有些原本 Windows Media Player 不支持的音乐类型 Midi(.MID 文件)也能播放了!只要在列表中放入此类文件的网址即可。

补充:Windows Media Player 目前可以直接播放 Flash 动画文件了,无须再做列表文件!范例请参考我的测试空间中的日历。另外,关于列表文件上传空间的申请使用,可以参考一下教程(二十三)的内容。

2. Upload the playlist file to Internet Save the .TXT file, then change the extension name to .MP3. Upload this file to your free web space and write down the URL of this file. If you do not have a free web space, apply one, such as www.websamba.com. For example, the URL of my playlist file is

http://www31.websamba.com/atiger1974/MSN_Space/bgmusic_list.mp3


3. Play the playlist file in Windows Media Player Input the web address of the playlist file into the URL of Windows Media Player, and "save" it. Now you can preview your space, and listen to the music/songs played one by one.  

By using this method, you can not only play multiple songs and movies in your space, but also have WMP module to play some files that cannot be played in WMP module directly, such as Midi files (.MID) and Flash movies (.SWF). Just put midi or flash file links into the playlist file.

Remark:Now, Flash files (.swf) can be played in the Windows Media Player module directly. The calendar in my testing space is an example.




(二)宽屏显示的实现

可能 MSN Space 为了照顾那些依然使用 800×600 显示模式的用户,将日志和列表的屏幕显示宽度范围限制在 800px 之内。但是这样对于使用 1024×768 及以上显示模式的用户来说,就会在屏幕的右边留下空白区域,很不美观。以前在自由定位语句还能使用的阶段,不少朋友和我都在空白之处放上一些图片来弥补。可是自由定位语句在6月底就被 MSN 封杀了,从那时起我就开始探索是否有其他可行的办法来弥补这一空白。“工夫不负有心人”,通过 PowerToy 中的 Custom HTML 模块,只要写上短短的一个代码,就能突破宽度 800px 的限制。

1、宽屏显示的原理
因为 MSN Space 整个页面是通过表格

语句来定位,所以这个宽屏显示也是通过
语句来实现的。主要是将左列或者中列的模块变宽,将右列的模块挤到原来显示范围之外。由于采用了不对称的
语句,所以请严格按照以下步骤去做,以免出现日志混乱、甚至空间首页无法登录等问题。

2、宽屏显示的条件
如果想使用本办法请将你的 MSN Space 排布格式改成如图所示的三种版式之一。如选择左宽右窄的“左右两列”版式,则左列上方放 Custom HTML 模块,下方放网络日志模块,并尽量将其他模块都放到右列。

② Widen the Blog by the Custom HTML Module

  Maybe MSN considers those people who is still using 800×600 display mode, so the width of MSN Spaces are limited to 800 pixels. However, for the users with 1024×768 display mode, it leaves a large blank area on the right. Many people, including myself, are continuously seeking a way to reclaim this virgin soil. After spending a whole weekend in it, I found it could be possible to exceed the 800px limit by using Custom HTML module with some specific codes.   1. The principle As we know, the webpage of MSN Space is using a large table to locate and display contents, such as Blog and Custom List. The width of Blog module is defined within this table. So I apply some
tags to change it. Because wrong codes may cause some problems to your space, please make sure that you follow my tutorial step by step, and check the codes carefully before previewing your space.    2. The applicable layouts Please select one of the three layouts as shown below. For two-column layout, put the Custom HTML module on the top of the left column, the Blog module under it, and other modules and lists into the right column. 

如选择“左中右三列”,则左列最好不放置模块,或者只放一两个模块(比如我首页上的 Welcome List),中列上方放 Custom HTML 模块,下方放 Blog(网络日志)模块,将其他模块都放到右列。

For three-column layout, put the Custom HTML module on the top of the middle column and the Blog module under it. Do not leave too many modules or lists in the left column, but the right column.

    or   

3、实现宽屏的语句
在 Custom HTML 模块中写入下面这个语句:

点击“Save”按钮后,就可以新开一个 IE 窗口去预览效果了。这样做的目的是,万一出现问题,还可以回到原编辑窗口内修改代码。如果没有问题,就应该看到左侧的日志栏已经变宽,并将右侧的列表挤至 800px 限制的范围之外了。

4、添加图片或者文字
如果需要在 Custom HTML 模块中放置图片或者文字,则可把相应代码放到之后,大家可以试试看。需要图片居中的朋友,根据图片大小有两个办法:如果图片较小(比如:我置顶的“卧虎”图片),请选用上述“左中右三列”模式,可以在图片前放置空格来调整图片位置;如果图片比较大(比如:小乖的置顶图片),采用“左宽右窄两列”版式,将图片宽度设置为 width=760 即可。 

备注:如果将 Windows Media Player 模块放到右边列表栏中,并设定 Display Mode 为 Invisible 模式,那么右边的列表栏会稍微增加些宽度,每一行能多写两个字。另外,使用宽屏显示方法后,背景可能会变得不透明了。需要透明背景的朋友,可以看看教程(四十四)

这种宽屏显示的效果不知道大家觉得怎么样,喜欢么?

3. The HTML codes Write the following code in the Custom HTML module:    Click "Save" button, and then preview your space in another IE windows. If something wrong, you can go back to the original window to change the codes. Now you may find that the Blog module becomes wider, and the right column is pushed to exceed the 800px limit.   4. Other codes in the Custom HTML module If you need to put other codes in the Custom HTML module, put them after the above code. If you have a large picture in it, you may use the two column layout and set the width of the picture is 760 pixels to make it look like in the center above the Blog, such as Annie‘s Blog. If your picture is small, you may select three column layout, like the tiger picture in my space.   Remark: If you put Windows Media Player module in the right column, and set it to “Invisible” mode, the right column will appear a little wider. By the way, if you want to have a transparent background, please read my tutorial (44).   Wish you like this wider effect of your space!