wordpress plugins

使用WP-PostViews浏览次数插件获取指定文章浏览数

星期一, 十一月 26th, 2012 | php, wordpress | 没有评论

在自己调用文章的循环中,去调用次数的时候比较范畴,最终查到获取次说的方法:

一:直接获取指定id文章的展示次数:
WP-PostViews用custom field存储展示次数,此custom field调用值为views,只要获取views的值就可以了。

方法一:loop循环调用方法:

1
2
$post_views = intval(post_custom('views'));
echo ' - '$post_views.' views';

方法二:根据文章的postid,获取任意文章的展示次数

1
2
 $post_views = get_post_meta($post["ID"], 'views', true);
echo ' - '$post_views.' views';

二:顺便也记录下对应的调用函数
设置生效的前提:需要将插件提供模板标签the_views()写到模板中(index.php、single.php或者page.php等),该标签要写在循环(loop)内.
› Continue reading

Tags: , ,

ImgShow图片点击滚轮缩放的wordpress插件(plugins)

星期日, 四月 5th, 2009 | php, wordpress | 70 Comments

小记前:这段时间一直忙着基于java的支付平台的设计和对接口的处理,赶在清明节有空整理下这个图片的点击,弄成个小插件吧,希望有需要的也可以直接激活使用,简单多了;
ImgShow图片点击滚轮缩放的wordpress插件(plugins)
官方访问地址:http://wordpress.org/extend/plugins/imgshow/
—-2012-04-18更新至2.1版本——————————-
屈指一算竟然时隔2年, 才再次更新版本,废话少说,此次更新如下就2点,兼容性和一个功能点:
1.支持更多 ie, firefox, chrome, opera, Safari,以前只支持ie和firefox
2.不想使特定图片启用效果该效果的,可以用下面代码阻止(系统默认对所有站点图片生效的)

<!--noimgshow--><img src="pic.jpg" /><!--noimgshow-->

EN:
1.Support for ie, firefox, chrome, opera, Safari
2. Do not want to make the corresponding picture effect is enabled,
you can use to prevent the effect of

<!--noimgshow--><img src="pic.jpg" /><!--noimgshow-->
imgshow2.1下载地址:imgshow2.1

—-2010-04-22更新至2.0.2.2版本—————————-

1.修正点击图片会弹出新窗口,造成本插件不能使用的bug; (No new windows open,the bug is not here)
下载地址:imgshow2.0.2.2

—-2010-04-05更新至2.0.2.1版本—————————-

1.优化加载处理速度
2.修正在一篇文章中多个图片的加载问题
3.增加鼠标移动到图片显示手型的样式
下载地址:imgshow2.0.2.1

== Description ==

Mouse Wheel zoom picture when you onclick it,use sample:

[imgShow:<img src="//www.pomelolee.com/imgshow/showPhoto.jpg" border="0" alt="skag"  width="560"/>]

this is ok
now start download(下载):imgshow1.0

今天难得休假一天,也抽个时间把imgShow这个插件更新至2.0版本

新版修正了和jquery不兼容的bug,和使用者的反馈,实现了自动给文章内容的图片实现imgShow的展示功能,此版本继续兼容使用代码的方式;

启用此插件后即可,无需代码的插入,最大减少使用者的操作,完全自动化,感谢大家的意见和支持!
下载地址:imgshow2.0
1.2010-02-26 modify js Compatibility ;修正由于大小写转换造成的部分js代码失效的bug
2.版本更新至2.0.1版本 version 2.0.1
版本更新至2.0.1修正bug如上:imgshow2.0.1下载

== Installation ==

1. Extract the contents of the archive (zip file)
2. Upload the showphoto folder to your ‘wp-content/plugins’ folder
3. Log in to your WordPress admin and go to the ‘Plugins’ section. You should now see showphoto in the list of available plugins
4. Activate the plugin by clicking the ‘activate’ link
5. Now go to use sample:

[imgShow:<img src="//www.pomelolee.com/imgshow/showPhoto.jpg" border="0" alt="skag"  width="560"/>]

6. More please click link: //www.pomelolee.com/imgshow/
另计:支持ie6,ie7,ff等的鼠标滚轮缩放和鼠标移动功能!

此插件在wp2.8版本或其他中的可视化的编辑中不能正常显示,因插件采用的是代码的格式;请采用在HTML格式下保持的示例模式

example:

图片看不清,可点击查看,支持滚轮缩放….正是本插件实现的功能

skag

Tags: , , , , , , ,

Search

文章分类

Links

Meta