|  | 
 
插件版本
| OURPHP版本: | 需V1.7.0或以上版本 |  
| 描述: | - |  
| 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()); 并在它的上面 插入如下代码:
 
 复制代码function ourphp_usercollection(){
        global $db;
        $query = $db-> listgo("`id`,`type`,`classid`,`viewid`,`time`,`title`","`ourphp_p_collection`","where `useremail` = '".$_SESSION['username']."'");
        $userrows = array();
        while($ourphp_rs = $db -> whilego($query)){
                $rs = $db-> selectl("`OP_Title`","`ourphp_product`","where `id` = " . $ourphp_rs[3]);
                $userrows[] = array(
                                                        'id' => $ourphp_rs[0],
                                                        'type' => $ourphp_rs[1],
                                                        'classid' => $ourphp_rs[2],
                                                        'viewid' => $ourphp_rs[3],
                                                        'time' => $ourphp_rs[4],
                                                        'lang' => $ourphp_rs[5],
                                                        'title' => $rs[0],
                );
        }
        return $userrows;
}
$smarty->assign('collection',ourphp_usercollection());
 完成!
 
 调用标签:
 [.collection type=$ip.type classid=$ip.listid viewid=$ip.viewid lang=$ip.lang.]
 
 
 
 回复后下载插件
 http://pan.baidu.com/s/1eRM2nMa
 
 
 
 
 | 
 |