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

之前的 "另类的模块标题右侧加"更多"链接" 一文, 方法比较简陋. 到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: 更多  模块  标题  

9 lgw6237 @ 2007-01-11 09:27:13 : to Autoit
如果我想链接news内容下的自定义的分类上如book,怎么链接呢?谢谢Autoit回答
8 Autoit @ 2007-01-10 13:18:30 : to lgw6237
7) 模块还怎么链接到模块 ? 通常 这个 more 是链接到对应的分类里的. 否则帖你站点具体说明下.
7 lgw6237 @ 2007-01-10 12:23:40 : 如果我想链接latestnews模块,怎么写链
如果我想链接latestnews模块,怎么写链接语句呢,谢谢
6 Autoit @ 2007-01-10 10:52:42 : to lgw6237
这个链接就是在后台自己加上去的. 
 
more 是链接应该和上面的 "使用手记" 的链接一样的, 所以就把 "使用手记" 的链接帖在 more 的地方就可以了.
5 lgw6237 @ 2007-01-10 08:02:51 : 在请教一下
我看你的more链接是这个地方content/category/3/7/25.html,这是你自己做的网页,还是joomla的什么模块,具体怎么做呢
4 访客 @ 2007-01-10 07:55:16 : 谢谢回复,期待你的后台选择功能的
:0d:) 谢谢回复,期待你的后台选择功能的完成。
3 Autoit @ 2007-01-09 16:55:09 : to 3楼同学
因为在joomla里, 链接个分类有两种选择,一种是blog风格的,一种是表格风格的. 本着在尽量改动少的代码下能实现more的链接的原则就没做那么多了. 
 
所以, 要加more的链接就只能是手动把要的链接copy到这个模块设置的 "DIY More URL "后面的文字框里就可以了. 
 
等抽时间会做个在后台直接选择什么风格的链接的选择的,就更方便了.
2 访客 @ 2007-01-09 15:54:58 : 谢谢,添加more后,点more以后的链接怎
我照着做,添加成功了,非常感谢,但是添加more后,点more以后的链接怎么做呢?
1 linsir @ 2007-01-01 03:46:21 : My god !
:26:) 强. 收了.

Only registered users can write comments.
Please login or register.

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