年年我发



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

回复
 
主题工具 搜索本主题 显示模式
  #1   IP: 218.2.67.5
旧 2007-07-10, 09:25 PM
smiling smiling 当前离线
高级会员
 
注册日期: 2006-02-12
帖子: 528
现金: 3821 元
资产: 3821 元
声望: 10 smiling 正向着好的方向发展
默认 Last 10 listings on the main page only (phpld v2)

Hi

I know there is a similar thread in this forum but it's getting confusing and most importantly it didn't get me anywhere so I need to ask again if anyone can help me with this one...

I am using the latest free version of PHPLD (2) on my site and I need to display the last 10 listings on my main page.

It would be great if the mod is coded in a way that if I wanted to.. I could change the number of listing from let's say 10 to 15 and it would still work the same way.

Can anyone help me with this one pls?? I would really appreciate it someone could. I don't really wanna switch to any other script because I like everything about PHPLD..
回复时引用此帖

wellcome to www.0058.net
  #2   IP: 218.2.67.5
旧 2007-07-10, 09:26 PM
smiling smiling 当前离线
高级会员
 
注册日期: 2006-02-12
帖子: 528
现金: 3821 元
资产: 3821 元
声望: 10 smiling 正向着好的方向发展
默认

Place in main.tpl below {/strip}
代码:
<table width=894" height="300" align="center" cellspacing="0" cellpadding="0" border="0"> <td width="50%" rowspan="0" border="0" valign="top"> {if count($top_ten) gt 0} <h3>{l}Top Ten Links{/l}</h3> {foreach from=$top_ten item=link name=links} {include file="link.tpl" link=$link} {/foreach} {/if}</td> <td width="50%" rowspan="0" border="0" valign="top"> {if count($last_ten) gt 0} <h3>{l}Latest Ten Links{/l}</h3> {foreach from=$last_ten item=link name=links} {include file="link.tpl" link=$link} {/foreach} {/if} </td> </table>

Place in index.php above echo $tpl->fetch('main.tpl', $id);

代码:
$top_ten = $db->GetAll("SELECT * FROM `{$tables['link']['name']}` WHERE `STATUS` = '2' ORDER BY `HITS` DESC LIMIT 0, 10"); $last_ten = $db->GetAll("SELECT * FROM `{$tables['link']['name']}` WHERE `STATUS` = '2' ORDER BY `ID` DESC LIMIT 0, 10"); $tpl->assign('top_ten' , $top_ten ); $tpl->assign('last_ten', $last_ten);
回复时引用此帖
  #3   IP: 218.2.67.5
旧 2007-07-10, 09:28 PM
smiling smiling 当前离线
高级会员
 
注册日期: 2006-02-12
帖子: 528
现金: 3821 元
资产: 3821 元
声望: 10 smiling 正向着好的方向发展
默认

代码:
Is there a way to get this on the main page ONLY?


phpld 2.0
{if $category.ID eq 0 and !$q and !$p}

your code here

{/if}

phpld 3.06
{if $category.ID eq 0 and !$list and !$search}

your code here

{/if}
回复时引用此帖
  #4   IP: 218.2.67.5
旧 2007-07-10, 09:30 PM
smiling smiling 当前离线
高级会员
 
注册日期: 2006-02-12
帖子: 528
现金: 3821 元
资产: 3821 元
声望: 10 smiling 正向着好的方向发展
默认

use
代码:
<a href="{$link.URL}" target="_blank">{$link.TITLE}</a> <br />

instead of
代码:
{include file="link.tpl" link=$link}
回复时引用此帖
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题作者 版面 回复 最后发表
<<<网赚每个月给我带来1000元补助>>推荐给大家 005yl 网络赚钱技术交流 0 2006-10-31 12:45 AM
Successful Site in 12 Months with Google Alone sunshine 搜索引擎市场营销研究 0 2006-02-27 09:27 PM
Building for the user and the bot. admin 建站交流 0 2006-01-17 03:54 PM


所有时间均为北京时间. 现在的时间是 07:53 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