免费PHP万能建站系统_社区团购SaaS_商城系统_软件开发_虚拟币交易所系统_矿机系统_微信钻石投票系统_成品源码

标题: ourphp 会员收藏信息插件 [打印本页]

作者: ourphp    时间: 2016-6-18 11:23
标题: ourphp 会员收藏信息插件

ourphp 会员收藏信息插件

利用此插件,会员可以把喜欢的信息收藏到会员中心!

注:此插件的调用标签,只能在内容页模板中使用。
比如:cn_productview.html

不能在首页或列表页使用。

调用标签:
[.collection type=$ip.type classid=$ip.listid viewid=$ip.viewid lang=$ip.lang.]

安装方法:
1. 本贴中下载插件安装包,并解压缩到桌面
2. 把解压缩后的 collection 目录,上传至你的OURPHP程序的 /client/plus/ 目录内
3. 进入后台 -> 运营 ->插件管理 -> 安装新插件
4. 把解压缩后的 cn_usercollection.html 文件,上传至你的OURPHP程序的 /templates/user/ 目录内
5. 打开 /templates/user/cn_leftnav.html 文件,在合适的位置上插入:<li><a href="[.$webpath.]client/user/?[.$ip.lang.]-usercollection.html"><span class="ion-settings"></span>我的收藏</a></li>
6. 打开 /client/user/ourphp_userview.class.php 文件,找到:$smarty->assign('mail',ourphp_usermail()); 并在它的上面 插入如下代码:
  1. function ourphp_usercollection(){
  2.         global $db;
  3.         $query = $db-> listgo("`id`,`type`,`classid`,`viewid`,`time`,`title`","`ourphp_p_collection`","where `useremail` = '".$_SESSION['username']."'");
  4.         $userrows = array();
  5.         while($ourphp_rs = $db -> whilego($query)){
  6.                 $rs = $db-> selectl("`OP_Title`","`ourphp_product`","where `id` = " . $ourphp_rs[3]);
  7.                 $userrows[] = array(
  8.                                                         'id' => $ourphp_rs[0],
  9.                                                         'type' => $ourphp_rs[1],
  10.                                                         'classid' => $ourphp_rs[2],
  11.                                                         'viewid' => $ourphp_rs[3],
  12.                                                         'time' => $ourphp_rs[4],
  13.                                                         'lang' => $ourphp_rs[5],
  14.                                                         'title' => $rs[0],
  15.                 );
  16.         }
  17.         return $userrows;
  18. }

  19. $smarty->assign('collection',ourphp_usercollection());
复制代码


完成!

调用标签:
[.collection type=$ip.type classid=$ip.listid viewid=$ip.viewid lang=$ip.lang.]



回复后下载插件
http://pan.baidu.com/s/1eRM2nMa




作者: lianglhm36    时间: 2016-8-21 09:23
44444444444444444444444
作者: 3219291841    时间: 2016-12-21 12:00
功能不错
作者: baiwenqiang    时间: 2022-5-19 18:29
一直在丰富
作者: lufaliu    时间: 2022-9-1 16:06
调用标签




欢迎光临 免费PHP万能建站系统_社区团购SaaS_商城系统_软件开发_虚拟币交易所系统_矿机系统_微信钻石投票系统_成品源码 (https://www.ourphp.net/club/) Powered by Discuz! X3.2