Space 简易教程(二十九)—— 首页单篇日志的奥妙

来源:百度文库 编辑:神马文学网 时间:2024/04/29 06:07:55
Space 简易教程(二十九)—— 首页单篇日志的奥妙MSN Space Easy Tutorial (29) —— Secrets of the MSN Spaces with Single Blog Entry Displayed
中文版
以前实现首页单篇日志比较容易的办法是通过Sanall Cobain 的首页设置工具来完成的。可是在8月初,MSN Space 在服务器上修改了代码,使这个工具彻底失效了。如果是以前使用这个工具设置的首页日志,则还能保持原设置,而对于想重新设置首页日志数的朋友,就不那么容易了。
“道高一尺,魔高一丈”!MSN Space 封锁了首页设置 Javascript 工具之后不久,一些朋友和我就研究出了新的方法 —— 利用 MSN Spce 页面中语句来隐藏日志。其原理和我的教程(二十一)中所介绍的用来隐藏日志回复栏的方法类似,只是语句复杂了些。本来没想介绍这个方法,因为我并不想在自己的空间中实现这一效果,而且对大多数没有 HTML 语言基础的朋友来说,实现起来并不容易。但是自从教程(二十八)发布之后,就有好些朋友来询问关于首页版面的设置问题,其中有些就是关于如何设置首页单篇日志,于是我决定还是讲解一下。
声明:文中介绍的方法将使用“不对称”代码,使用不当可能造成日志显示不正常,甚至空间首页无法打开等问题,所以请严格按照教程中的步骤操作!如果发生上述问题,可以修改代码,或者将含有不对称代码的日志删除,空间即可恢复正常。另外,对于没有 HTML 语言基础的朋友,不建议使用此方法,以免造成各种问题。
(一)设置首页单篇日志
1、几乎所有的日志排布格式都做出首页单篇日志的效果,我就先以“一列”日志排布格式为例。请首先将日志排布格式调整为“一列”,其中上方放置各种列表模块,最下方放网络日志(Blog)模块。

2、先写好首页的第一篇日志,并发布预览结果,确保正文无需改动。一定要发布一次,以避免出现其他错误!
3、返回此日志的编辑界面,点击模式切换按钮,将光标移动到整篇日志的最后。在此写入如下代码:
English Version
In June,Sanall Cobain developed a Javasript tool to set the number of blog entries displayed on the default page, so that it could be used to set only one blog entry displayed in your space. However, the tool was disabled by MSN Space several weeks ago. It becomes difficult for us to have only one blog entry displayed in our spaces.
"While the priest climbs a post, the devil climbs ten!" After studying the codes of MSN Space webpage, several friends and me found a new way to display single entry in MSN Spaces. In fact, this method is to hide blog entries except the first one so that it looks like only one blog entry displayed. After reading the feedbacks of my "MSN Space Easy Tutorial (28)", I decided to explain this new approach in details to answer some friends‘ questions.
Notice: This tutorial is for Advanced Users only, especially the part ② and ④. I am not responsible for any misuse of the method. A mistake may cause some problems to your space, such as abnormal display of your blog entries or failure to open your space. If this happens, please delete the blog entry with the codes from this tutorial.
① Display Only One Blog Entry in Your Space
1. Almost any layout of MSN Spaces is applicable to this method. I will use one-column layout as an example. Please set your space layout to one column, and put all modules and lists above the Blog Module.

2. Write a new blog with what you want to display in your space, then publish the entry. Please make sure there is no error in it.
3. Return to edit this blog entry. Press button to enter HTML mode, then move your cursor to the end of the whole blog (after the last HTML tag). Type in the following HTML codes:

4、检查代码无误后,直接点击“发布项”(Publish Entry),不用预览!
5、现在就可以去你的网络空间看结果了。这时应该看到除了首页第一篇日志以外,其他日志项已经看不到,而且首篇日志的回复栏也完全消失了!
实事上,如果你把上述代码添加到以前发布的日志中,那么你就可以设置你的 Space 显示 1~25 篇日志了。从第一篇到写有代码这篇日志会显示在你的 Space 中,而其后的日志都被隐藏起来。
4. Check the code and click "Publish Entry". It is useless to preview the blog entry, because you cannot see the special effect here.
5. Go to preview your space. You should find that all blog entries are dispeared except the first one. Moreover, the bottom row with time, comments, and trackbacks is also hidden.
In fact, you can set 1 to 25 blog entries to be displayed by this method, if you put the above codes in an old blog entry. Only the first entry to the entry with the codes will be shown in your space.
(二)隐藏日志(Blog)标题框和发布日期及超宽显示
按照上述方法实现了首页单篇日志后,现在我就来回答网友问的另一个问题,怎么隐藏网络日志的标题框和发布日期。我还以“一列”日志排布格式为例,其他排布格式类似。
1、请首先将日志排布格式调整为“一列”,其中最上方放置各种列表模块,中间放 Custom HTML 模块,其下方放网络日志(Blog)模块。
2、先写好首页的第一篇日志,并发布预览结果,确保正文无需改动。一定要发布一次,以避免出现其他错误。
3、返回此日志的编辑界面,点击模式切换按钮,将光标移动到整篇日志的最前部,写入如下代码:
② Hide the Frame of Blog Module and widen the Blog Module to unlimited size
Now, let me answer another question on how to hide the frame of the Blog module in MSN spaces. I will still use one-column layout as an example.
1. Please set your space layout to one column, and put the Custom HTML module in the middle of the column, the Blog module right below it, and all other modules and list above it.
2. Write a new blog with what you want to display in your space, then publish the entry. Please make sure there is no error in it.
3. Return to edit this blog entry. Press button to enter HTML mode, then move your cursor to the beginning of the whole blog. Type in the following HTML codes:


4、在模式下,再将光标移至日志最后此写入如下代码:
4. Then move the cursor to the end of the blog, type in the following HTML codes:

5、检查代码无误后,直接点击“发布项”(Publish Entry),不要预览!
6、在 Custom HTML 模块中写入如下代码:
5. Check the code and click "Publish Entry". It is useless to preview the blog entry, because you cannot see the special effect here.
6. In the Custom HTML module, type in the following codes:

7、现在就可以去你的网络空间看结果了。
其中 width=1003 是在 1024×768 显示模式下,IE 窗口内最大宽度。如果选择更大的数值,则可能会有部分内容超宽(屏幕下方会出现横向滚动条);选择较小的值,则会在屏幕右侧留有空白。另外,background="background picture" 和 bgcolor=#FFFFFF 请任选其一使用,可以设定单篇日志的背景图片,或者选择日志背景颜色。具体效果参见网络空间“有话好好说”。
7. Now you can go to preview your space to see the special effects.
In the above codes, width=1003 is the optimum value for 1024×768 dispaly mode in IE windows. A larger number can be set if needed. This is the reason why this method is called "widen the Blog Module to unlimited size". By the way, please select either background="background picture" or bgcolor=#FFFFFF to use in the codes. Here isan example that you may take a look.
(三)隐藏列表模块
按照上述方法(二)实现的首页中,如果想不显示除日志模块外的其他模块,比如:相册,一个办法是将列表模块删除,另一个比较好的办法就是将列表模块置于 Custom HTML 模块和网络日志(Blog)模块之间,则列表模块会被隐藏起来。这样在日志中还能引用放在相册中的图片,但在首页上却看不到相册了。
③ Hide Modules or Custom Lists
In the webpage of your space that is using method ②, if you want to not display other modulus or lists, you can either delete them or put them between the Custom HTML Module and the Blog Module. For example, when the Photo Album is placed between the Custom HTML and Blog Modules, it will be concealed, but you can still use the pictures in the album.
(四)“左右两列”的首页单篇日志
实际效果参见我的“测试空间”,表面上看与教程(二十八)中的结果类似,实际上使用了不同的代码,使得首页仅显示一篇日志,而且网络日志(Blog)模块的标题、边框、日志发布日期、回复栏等均被隐藏起来,可以算是“首页单篇日志”的一个特例。我设计这个范例的想法就是:当首页采用上述方法,改成超宽的单篇日志显示后,如果我们还可以利用 MSN Space 提供的一些模块,不仅能减少一些自己设计页面的工作量,还可以保留“相册”、“Windows Media Player”等功能性的模块,何乐而不为呢?
1、请首先将日志排布格式调整为“左右两列”,其中左侧上方放置 Custom HTML 模块,其下方放网络日志(Blog)模块,右侧则放置其他需要显示的模块。
  或者 
2~7、与本教程第二部分所述几乎完全一样,只是日志栏宽度 width=1003 需要改成 width=820,给右侧的模块留下显示空间。
对于其他页面排布格式的首页单篇日志实现方式,可以参考此教程的方法,但需要大家自己摸索了。
④ Single Blog Entry with Modules/List on the right
When I finished above work, I was thinking whether the modules or lists could be placed on the right. Finally, I found the way to do it. Here is an example of this special effects. It looks like the result that was mentioned in my "MSN Space Easy Tutorial (28)", but it is created by different HTML codes and some features, such as Blog Frame, Blog Date, and Comments Button, are hidden.
1. Please set your space layout to one of the two-columns. In the left column, put the Custom HTML Module on the top. and the Blog Module on the bottom. All other modules and lists you want to show in your space are in the right column.
  或者 
2-7. These steps are almost the same as those in the part ② except that the width in the codes need to be changed from width=1003 to width=820. This is to leave some space for the displayed modules.