原创用MOOTOOLS做的超简单wp插件–最近5条日志标题(last5posts)

之前稍微学了mootools一下,一直没有用在BLOG上面,今天首页添加了一个功能,就是显示最新的5条日志或者页面标题。那个是mootools写的,虽然很简单>_<!但是依然想跟网友们一齐分享,下面是使用教程。高手可以无视了。最底方有下载地址

效果:如首页中上方横条一样
使用方法:
1.启动WP last5posts和wp-last5posts-widget插件
2.后台设置显示widget在边栏中
3.直接在需要显示的位置写入代码:

<?php if(function_exists('widget_last5posts'))widget_last5posts();?>

注意:2,3步骤只能做一个,一个页面不能显示两个一样的JS特效(>_<!是我笨没做成),
mootools.js文件有点大材小用,深感抱歉。另外文字上升可以有多种速度变化具体可以修改wp-last5posts.php文件下

 var fx=new Fx.Style('RecentPostsUl','top',
{duration:1000,transition:Fx.Transitions.Quart.easeOut}
);

的transition,这里提供几个效果:
Fx.Transitions.Quad.easeOut
Fx.Transitions.Cubic.easeOut
Fx.Transitions.Quint.easeOut
Fx.Transitions.Sine.easeOut
Fx.Transitions.Expo.easeOut
Fx.Transitions.Circ.easeOut
Fx.Transitions.Bounce.easeOut
Fx.Transitions.Back.easeOut
Fx.Transitions.Elastic.easeOut
下载地址:wp-last5posts.rar
文件包括:样式文件last5posts.css(可以自由修改其中样式),js框架类库文件mootools.js,wp-last5posts-widget.php文件,wp-last5posts.php文件
第一次做WP的插件,可能做得不怎么好,希望大家给点意见。
ps:帖子来自本站http://xiebiji.com,作者小JOE,转载请注明,谢谢

3 Responses to 原创用MOOTOOLS做的超简单wp插件̵... »

  1. JasonOne 评论 2008-08-22 23:30

    :shock: 你学得好!我没空学习,可惜!

    回复

    joe 回复 八月 23rd, 2008 at 16:23

    :shock: 你看一下就知道我学的是皮毛。

    回复

  2. imture 评论 2008-08-23 12:16

    学习了

    回复

Leave a Reply

Email address is not published

You should say a Chinese word to pass spam check. If you can not input Chinese, just copy 你好 and paste them into comment text box.