英雄巴乔

博客园 首页 新随笔 联系 订阅 管理

2010年12月14日 #

摘要: 此方法是存入cookie,直接从cookie返回。以下为修改方法:共修改1个php文件,1个html模板文件,1个js文件。1. 根目录/images/js/login.js 查找$('#logined_username').html(username.value);在下面另起一行加入:$('#logined_userphoto').html(unescape(getcookie('userphoto'))); 查找 $('#logined_username').html(unescape(getcookie('username'))); 在下面另起一行加入: $('#logined_user 阅读全文
posted @ 2010-12-14 15:08 英雄巴乔 阅读(2212) 评论(0) 推荐(0)

摘要: !--{get $sql="select avatar from phpcms_member_info where userid=$_userid"}--{if $r[avatar]}?php if(!class_exists('attachment')){ require 'attachment.class.php';}$attachment = new attachment($mod);$avatar = $attachment-get($r['avatar'], 'filepath');$r['avatar'] = UPLOAD_URL.$avatar['filepath'];? 阅读全文
posted @ 2010-12-14 00:11 英雄巴乔 阅读(324) 评论(0) 推荐(0)

2010年12月7日 #

摘要: PHPCMS2008的用户评论不能在内容页显示,用户发表评论后在评论页显示,这点不利于调动用户的互动积极性,下面介绍一个方法,把最新10条评论调到内容页实时显示,同时把评论页的盖楼、支持、反对功能亦移植到内容页,大大增强了用户互动的趣味性。步骤一在comment文件夹下新建comlist.php文件,内容如下:步骤二在templates\default\comment新建ajax_list.html,内容如下:步骤三打开templates\default\phpcms\show.html文件,修改如下:1.在你想显示评论的位置加上div id="comment_list"/div(注: 阅读全文
posted @ 2010-12-07 00:32 英雄巴乔 阅读(493) 评论(0) 推荐(0)

摘要: phpcms get万能标签实现phpcms[上一篇][下一篇]文章的完美解决方案把下列代码加入到show.html的相关位置: ul li{get sql='SELECT * FROM `phpcms_content` WHERE `contentid` $contentid AND `catid` = $catid and status=99 order by contentid asc' return='r1' rows='1'} {php $front=1;}上一篇:a href='{$r1[url]}'{str_cut($r1[title], $titlelen)} 阅读全文
posted @ 2010-12-07 00:26 英雄巴乔 阅读(1023) 评论(0) 推荐(0)

摘要: ?phpinclude './include/common.inc.php';if($catid && $contentid){ //下一篇开始 $previous_query = "select contentid,catid,url,title from ".DB_PRE."content where contentid '$contentid' and catid='$catid' order by contentid desc LIMIT 0,1"; $previous_r = $db-get_one($previous_query); if($previous_r){ 阅读全文
posted @ 2010-12-07 00:19 英雄巴乔 阅读(1541) 评论(0) 推荐(0)