蚂蚁分类信息数据标签调用示例大全(重点)
数据调用示例
mymps分类信息数据调用

mymps_get_infos($num,$level,$upgrade,$userid,$catid,$certify,$orderby,$tel,$cityid) |


范例一:调用10条当前分站下的分类信息
{php $infos = mymps_get_infos(10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,$city[cityid]);} |
范例二:调用12条当前分站下的最新首页置顶的信息
{php $infos = mymps_get_infos(12,NULL,3,NULL,NULL,NULL,NULL,NULL,$city[cityid]);} |
范例三:调用10条最新发布的分类信息
{php $infos = mymps_get_infos(10);} |
数据循环输出 {loop $infos $mymps} {$mymps[id]}输出信息编号 {$mymps[ifred]}输出是否套红,套红为1否则为0 {$mymps[ifbold]}输出是否加粗,加粗为1否则为0 {$mymps[catid]}输出分类编号 {$mymps[catname]}输出分类名 {$mymps[info_level]}输出信息状态,正常为1推荐为2 {$mymps[contact_who]}输出联系人 {$mymps[userid]}输出用户名 {echo cutstr($mymps[title],30)}输出截取15个字数的信息标题 {$mymps[uri]}输出信息链接 {$mymps[uri_tname]}输出会员链接 {$mymps[uri_cat]}输出分类链接 {echo get_format_time($mymps[begintime])}输出友好的发布时间 {echo GetTime($mymps[begintime])}输出正常格式时间 {$mymps[hit]}输出浏览次数 {$mymps[img_path]}输出缩略图 {echo cutstr($mymps[content],40)}输出内容的前20个字 {/loop} |

调用分类信息的栏目分类
{php $categories = get_categories_tree(0,'category');} {loop $categories $mymps} {$mymps[catname]}输出根分类名 {$mymps[caturi]}输出根分类链接 {loop $mymps[children] $w} {$w[catname]}输出子分类名 {$w[caturi]}输出子分类链接 {/loop} {/loop} |


mymps_get_members($num,$level,$orderby,$certify,$ifindex,$iflist,$catid,$cityid) |


范例一:调用10条最新的加入的商家机构
{php $members = mymps_get_members();} |
范例二:调用11条当前分站下的首页推荐商家机构
{php $members = mymps_get_members(11,NULL,NULL,NULL,1,$city[cityid]);} |
范例二:调用10条通过认证商家机构
{php $members = mymps_get_members(10,NULL,NULL,1,1);} |
数据循环输出 {loop $members $mymps} {$mymps[userid]}输出用户名 {$mymps[cname]}输出联系人 {$mymps[tname]}输出机构名称 {$mymps[uri]}输出机构URL链接 {$mymps[prelogo]}输出缩略图 {echo GetTime($mymps[jointime])}输出注册时间 {echo GetTime($mymps[logintime])}输出上次登录时间 {$mymps[address]}输出机构地址 {$mymps[qq]}输出机构QQ {$mymps[email]}输出机构email {$mymps[hit]}输出店铺浏览次数 {$mymps_global[SiteUrl]}/images/credit/{$mymps[credits]}.gif输出店铺信誉等级图标 {/loop} |


mymps_get_member_docus($num,$userid,$typeid,$orderby) |


范例一:调用10条机构文章
{php $docu = mymps_get_member_docus();} |
范例二:调用9条优惠促销文章
{php $docu = mymps_get_member_docus(9,NULL,2);} |
数据循环输出 {loop $docu $mymps} {$mymps[uri]}输出URL链接 {$mymps[title]}输出文章标题 {$mymps[content]}输出文章内容 {$mymps[pre_imgpath]}输出文章缩略图 {$mymps[tname_uri]}输出机构链接 {echo GetTime($mymps[pubtime])}输出文章发布时间 {$mymps[hit]}输出阅读次数 {/loop} |

{php $shopclass = get_corp_tree(0,'corp');} {loop $shopclass $mymps} {$mymps[corpid]}输出根分类编号 {$mymps[uri]}输出根分类链接 {$mymps[corpname]}输出根分类名称 {loop $myps[children] $w} {$w[corpid]}输出子分类编号 {$w[uri]}输出子分类名称 {$w[corpname]}输出子分类名称 {/loop} {/loop} |

导航数据调用示例
mymps蚂蚁分类信息菜单导航数据调用

mymps_get_navurl($type,$num) |


范例一:调用12条主导航
{php $navurl = mymps_get_navurl('header',12);} |
范例二:调用20条头部导航
{php $navurl = mymps_get_navurl('head',20);} |
范例三:调用30条尾部导航
{php $navurl = mymps_get_navurl('foot',30);} |
数据循环输出 {loop $navurl $k $mymps} {$mymps[target]}输出打开方式,值为_blank或_self {$mymps[url]}输出URL链接 {$mymps[color]}输出导航颜色 {$mymps[title]}输出导航文字 {$mymps[flag]}输出导航标识 {$mymps[ico]}输出小图标,值为re,xin,qiang {/loop} |


mymps_get_news($num,$catid,$ifimg,$join,$ifhot,$orderby) |


范例一:调用10条新闻
{php $news = mymps_get_news();} |
范例二:调用9条图片新闻
{php $news = mymps_get_news(9,NULL,1);} |
数据循环输出 {loop $news $mymps} {$mymps[uri]}输出URL链接 {$mymps[title]}输出新闻标题 {$mymps[content]}输出新闻内容 {$mymps[imgpath]}输出新闻缩略图 {$mymps[iscommend]}输出是否推荐值,1为推荐 {$mymps[catname]}输出分类栏目 {$mymps[caturi]}输出分类链接 {echo GetTime($mymps[begintime])}输出新闻发布时间 {$mymps[hit]}输出阅读次数 {/loop} |


mymps_get_goods($num,$onsale,$shuxing,$catid,$userid,$orderby,$cityid) |


范例一:调用10条商品信息
{php $goods = mymps_get_goods();} |
范例二:调用9条当前分站下的促销商品
{php $goods = mymps_get_goods(9,NULL,'cuxiao',NULL,NULL,NULL,$city[cityid]);} |
数据循环输出 {loop $goods $mymps} {$mymps[goodsid]}输出商品编号 {$mymps[goodsname]}输出商品名称 {$mymps[uri]}输出商品URL链接 {$mymps[content]}输出商品内容介绍 {$mymps_global[SiteUrl]}/{$mymps[pre_picture]}输出商品缩略图 {$mymps[nowprice]}输出商品原价 {$mymps[nowprice]}输出商品售价 {/loop} |


mymps_get_groups($num,$glevel,$cityid) |


范例一:调用3条当前分站下的团购信息
{php $groups = mymps_get_groups(3,NULL,$city[cityid]);} |
数据循环输出 {loop $groups $mymps} {$mymps[groupid]}输出团购编号 {$mymps[gname]}输出团购名称 {$mymps[uri]}输出团购URL链接 {$mymps_global[SiteUrl]}/{$mymps[picture]}输出团购缩略图(大图) {$mymps_global[SiteUrl]}/{$mymps[pre_picture]}输出团购缩略图(小图) {$mymps[gaddress]}输出团购地址 {$mymps[dateline]}输出团购发布时间 {$mymps[meetdate]}输出活动举办时间 {$mymps[enddate]}输出活动结束时间 {/loop} |


mymps_get_focus($type,$num,$cityid) |


范例一:调用3条当前分站下的网站首页焦点图
{php $focus = mymps_get_focus('index',$city[cityid],3);} |
范例二:调用3条当前分站下的新闻首页焦点图
{php $focus = mymps_get_focus('news',$city[cityid],3);} |
数据循环输出 {loop $focus $mymps} {$mymps[id]}输出焦点图编号 {$mymps[pre_image]}输出焦点图小图 {$mymps[image]}输出焦点图大图 {$mymps[url]}输出焦点图URL链接 {$mymps[words]}输出焦点图文字说明 {/loop} |


mymps_get_announce($num,$cityid) |


范例一:调用5条当前分站公告
{php $announce = mymps_get_announce(5,$city[cityid]);} |
数据循环输出 {loop $announce $mymps} {$mymps[id]}输出公告标题 {$mymps[title]}输出公告标题 {$mymps[uri]}输出链接地址 {$mymps[pubdate]}输出发布时间 {/loop} |


mymps_get_faq($num) |


范例一:调用5条帮助主题
{php $faq = mymps_get_faq(5);} |
数据循环输出 {loop $faq $mymps} {$mymps[id]}输出帮助编号 {$mymps[title]}输出帮助主题 {$mymps[uri]}输出链接地址 {/loop} |

输出图片友情链接[仅网站首页可输出]
{loop $friendlink[img] $mymps} {$mymps[logo]}输出链接图片 {$mymps[name]}输出链接文字 {$mymps[url]}输出链接地址 {/loop} |
输出文字友情链接[仅网站首页/分类栏目列表页可输出]
{loop $friendlink[txt] $mymps} {$mymps[name]}输出链接文字 {$mymps[url]}输出链接地址 {/loop} |