MG Photo Agent


“MG Photo Agent”是我开发的一款类似于flickrRSS的WP插件,它用来显示网络相册上的照片。

目前,它支持以下相册:

  • goole picasa;
  • 163.com网易相册;

2007-02-23更新到0.2版本,更新如下:

  • 调整了网易相册的显示方法,提高效率;
  • 增加了直接指定相册地址的函数参数,使得函数更加灵活;

DEMO可以参考我的blog右侧的图片显示区块。

安装方法:
1、解压缩插件压缩包,将其中的mg-photo-agent文件夹存放在WP的插件目录中(wordpress-home/wp-content/plugins);
2、登录WP管理后台,选择“插件”(或者Plugins),激活mg-photo-agent插件;

使用方法:
1、点击“选项”(或者Options)标签,选择“MG Photo Agent”,在地址栏中输入调用的图片地址;
注意:
(1)使用网易相册,则输入网易相册的浏览地址即可;
(2)使用Google Picasa,则需要输入RSS地址;

2、调用:在THEHE中任何需要调用照片的地方,输入:

  1. <?php if(function_exists('mg_show_photos')) mg_show_photos('max_height=80&max_width=80&random=1&max_count=10&resize=1'); ?>

函数mg_show_photos()可以选择使用一个参数或者两个参数。

当输入一个参数时,该参数定义相册的显示方式,相册的具体位置有WP管理界面指定,具体如下:

  • max_width:最大宽度(resize=1时有效);
  • max_height:最大高度(resize=1时有效);
  • max_count:最大显示数量;
  • resize:1或者0,默认0,当选择1时支持使用JS动态缩放图片大小;
  • random:1或者0,默认0,随机选择相册中的指定数量(max_count)照片;

当输入两个参数时,第一个参数指定相册地址,第二个参数指定相册显示方式;

特征
◎支持网易和google picasa相册,支持自动识别;
◎显示数量控制;
◎JS动态等比例缩放图片,允许自定义最大宽度和高度;
◎支持相册随机显示;

Change Log

2007-02-19
第一次上传插件,目前支持网易和google的相册,支持单一相册调用;

todo
◎支持多个相册,随机调用;

点击这里下载mg-photo-agent


感谢您的关注。您现在可以 阅读留言(1)留下通告地址

One Response to “MG Photo Agent

  • 1
    steven
    4月 30th, 2007 15:22

    请教一下,我想调用http://picasaweb.google.com/StevenCui2008/51
    这个目录里面的图片应该怎样设置??



Leave a Reply

Note: Any comments are permitted only because the site owner is letting you post, and any comments will be removed for any reason at the absolute discretion of the site owner.

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image