Support jOOmla! Autoit!
 
在最新文章模块标题右侧加 more 的推荐方法! 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2007-01-01 | View Count View: 24208 | Digg Count Digg: 119

之前的 "另类的模块标题右侧加"更多"链接" 一文, 方法比较简陋. 到J1.0.12的话,也要改系统文件, 所以就产生了这种方法.

乘新年之际写出来送给大家。祝大家在新的一年里一切顺意,心想事成!

1, 在mod_latestnews.xml里结尾处的

 </params>

 上行加

 <param name="diymore" type="text" size="60" default="" label="DIY More URL" description="DIY More URL by Autoit!" />

2, 将mod_latestnews.php里的

 <ul class="latestnews<?php echo $moduleclass_sfx; ?>">

替换为:

 <?php if ($module->showtitle == 0) {?>
<h3><?php if ($diymore !="") echo '<a href="'.$diymore.'">More...</a>' ?><?php echo $module->title ; ?></h3>
<?php }?>
 
 <ul class="latestnews<?php echo $moduleclass_sfx; ?>">

$nullDate  = $database->getNullDate();

下面增加下面一行:

$diymore  = trim( $params->get( 'diymore' ) );

3,在你使用的模板里 template_css.css 的最后增加:

div.module h3 a,  div.moduletable h3 a {
 float:right;
 text-decoration:none;
 color:#1B57B1;
 padding-right:20px;
}

如果你模板还是 table 的话,可能还要把上面的 div.module h3 a,  div.moduletable h3 a 改变为: div.module h3 a,  div.moduletable h3 a, table.moduletable th a

Ok , end !

 

使用注意:


1,如果要显示more的话, 模块设置里的 Show title [显示标题] 选 否[No]
2,如果你这个模块设置里有使用 Module Class Suffix 的话,上面第三步要的css名字要做适当调整,假如你在后台Module Class Suffix设置为 -blank , 那么上面css的名称地方应该就是 div.module-blank h3 a,  div.moduletable-blank h3 a

其实其他任何想加 more 的都可以这样做的。。。By  Autoit!


Permanent URL: http://www.autoit.cn/index.php/content/view/95/25.html

Shares: Google书签 Yahoo书签 雅虎收藏夹 365Key网摘 新浪ViVi 百度收藏 天极网摘 diglog 和讯网摘 POCO网摘 YouNote网摘 博拉网 天下图摘 spurl blogmarks BlinkList reddit digg Del.icio.us   |  Tags: 更多  模块  标题  

« First « 1 2 » Last »
 
让com_banner支持flash输出的hack   最新文章模块条目后面增加new或图片