年年我发 立即注册PayPal并开始接受信用卡付款。
http://www.paypal.com



返回   年年我发 > 网站建设 > Web Directory
用户名
密码
 
注册账号 论坛帮助 会员列表 日历事件网赚工具 标记版面已读




回复
 
主题工具 搜索本主题 显示模式
  #1   IP: 218.2.29.203
旧 2007-07-10, 03:31 PM
topvip topvip 当前离线
超级版主
 
注册日期: 2006-01-04
帖子: 588
精华: 11
现金: 4395 元
资产: 6843 元
声望: 10 topvip 正向着好的方向发展
默认 Front page "Latest Links" and "Top Links" (phpld)

I would like to add my Latest Links and my Top Links to my index page instead of having a seperate page for them. How would I go about doing this?
回复时引用此帖

wellcome to www.0058.net
  #2   IP: 218.2.29.203
旧 2007-07-10, 03:33 PM
topvip topvip 当前离线
超级版主
 
注册日期: 2006-01-04
帖子: 588
精华: 11
现金: 4395 元
资产: 6843 元
声望: 10 topvip 正向着好的方向发展
默认

Try this:

Open index.php and find:
代码:
echo $tpl->fetch('main.tpl', $id);
BEFORE that add this code:
代码:
$top10 = $db->GetOne("SELECT * FROM {$tables['link']['name']} WHERE STATUS = 2 ORDER BY HITS DESC LIMIT 0,10"); $last10 = $db->GetOne("SELECT * FROM {$tables['link']['name']} WHERE STATUS = 2 ORDER BY ID DESC LIMIT 0,10"); $tpl->assign('top10', $top10); $tpl->assign('last10', $last10);
Open main.tpl

Where you want the top10 list to appear add:
代码:
{foreach from=$top10 item=link name=links} {$link.URL} {/foreach}
Where you want the last10 list to appear add:
代码:
{foreach from=$last10 item=link name=links} {$link.URL} {/foreach}
回复时引用此帖
  #3   IP: 218.2.29.203
旧 2007-07-10, 03:37 PM
topvip topvip 当前离线
超级版主
 
注册日期: 2006-01-04
帖子: 588
精华: 11
现金: 4395 元
资产: 6843 元
声望: 10 topvip 正向着好的方向发展
默认

I've added the code and got it up and running, but, it's showing on all my pages, how can I limit it to the frontpage only?
回复时引用此帖
回复


当前查看此主题的会员: 1 (0 位会员和 1 位游客)
 
主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

论坛启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码
论坛跳转


所有时间均为北京时间. 现在的时间是 06:58 PM, Free Patent & Patent Ideas


Powered by vBulletin 3.5.2 Chinese Exhibition Happy New Year
©2000 - 2008,Jelsoft Enterprises Ltd  Desiccant Molecular Sieve Weight Loss Bentonite Trade Manager