Support jOOmla! Autoit!
修正akocomment第一评论页默认为11的问题 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2006-08-21 | View Count View: 19474 | Digg Count Digg: 83

/mambots/content/akocommentbot 里搜索

{mospagebreak}

在其上第二行的 if 语句替换为

          if(($i+1)%10 == 0 && $i != 0) {

已修正过的,而且应网友要求把我的样式也提供出来,具体方法见压缩包里的 readme.txt: Download

 
jd-wiki的当前位置hack成最近位置 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2006-08-18 | View Count View: 8554 | Digg Count Digg: 56

默认方式很不习惯, 干脆改成最近位置算了...

 /components/com_jd-wiki/inc/common.php

166行:

  $crumbs = isset($_SESSION[$conf['title']]['bc']);

替换为:

  if (isset($_SESSION[$conf['title']]['bc'])) {
      $crumbs = $_SESSION[$conf['title']]['bc'];
  }

顺便将

/components/com_jd-wiki/inc/lang/zh/lang.php里的文字也改一下.

 
在样式中定义某个区块的链接可以弹出新窗口 输出PDF 打印 E-mail
Author Author: Ken | Date Date:2006-08-15 | View Count View: 9730 | Digg Count Digg: 57

模块样式定义(module class suffix),它位于模块的参数(parameter)项下。

所有控制模块样式的 CSS class 都包含在模板的 template_css.css 这个文件中; 要编辑的css文件,找到这几个 样式定义(class),table.moduletable 是网站模块的全局样式定义。

* table.moduletable {} 表格的全局定义
* table.moduletable th {} 表头行的定义
* table.moduletable td {} 表格单元格定义

* 例如:要修改“最新消息”(mod_latestnews.php)模块,将模块标题字体间距调成150%(1.5倍行距).

首先打开“最新消息”模块,选择参数(Parameters)标签,找到"Module Class Suffix(模块样式后缀)";填写CSS后缀itedu,然后保存修改。编辑 tmplate_css.css 文件,修改为table.moduletable[suffix],本例为 moduletableitedu。

模块样式表的设置步骤:

(1)进入后台,打开模块编辑状态,在模块CSS后缀的文本框中输入一个表示英文后缀的单词,例如itedu或myhead等.

(2)修改/templates/current_template/css/template_css.css文件,查找table.moduletable一段.复制table.moduletable整段内容,粘贴添加到文件中.然后在新增的内容中在每个moduletable标记后加上后缀的单词,如moduletable[itedu]即可.利用CSS后缀来让用户定制自己的样式,这种编程方法十分值得学习.

可以利用CSS后缀的功能,单独控制某一模块中的链接在新窗口中打开,首先在“主菜单”模块中设定CSS后缀,然后在CSS中添加: table.moduletable[模块后缀名] a:active {text:expression(target="_blank");},主菜单模块中的链接都会在新窗口打开。
下面是CSS的示例:

table.moduletableitedu th {
background: url(../images/subhead_bg.png) repeat-x;
padding-top: 4px;
padding-left: 4px;
height: 21px;
font-weight: bold;
font-size: 12px;
text-transform: uppercase;
}
 
/* 模块总体样式中添加固定布局属性 */ 
table.moduletableitedu { table-layout: fixed; } 
 
/* 模块一级标题中添加强制不换行、隐藏超出对象内容、显示省略标记属性 */ 
table.moduletableitedu td { 
white-space: nowrap; 
overflow: hidden; 
text-overflow:ellipsis; 
} 
/* 实在不行再添加一个模块中的li */ 
table.moduletableitedu li { 
white-space: nowrap; 
overflow: hidden; 
text-overflow:ellipsis; 
}
阅读全文...
 
简单的 "改变" joomla 后台administrator目录 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2006-08-07 | View Count View: 31581 | Digg Count Digg: 157

建立可以登陆用的页面,放在根目录下, 本站以 try.php 为例:

<?php
  session_name( "Autoit" ); 
  session_start(); 
  $_SESSION['admin_user'] = "Y";
  session_write_close();
?>
<meta http-equiv="refresh" content="0;url=http://www.autoit.cn/administrator">

 然后在administrator/index.php的32行左右增加[具体可以参考下面图示]: 

// Add by Autoit!
session_name( "Autoit" ); 
session_start(); 
$ok_to_browse = ( $_SESSION['admin_user'] == "Y" ); 
if (! $ok_to_browse ) {
 require( $mosConfig_absolute_path .'/offline.php' );
}else{
   $_SESSION['admin_user'] = "Y";
  session_write_close();
}
//  Add by Autoit! 
不清楚的可以参考下面图示!
Image

这样基本上就可以了.

自己登陆的使用方法: http://www.autoit.cn/try.php ,这样的效果和没改之前是相同的.而直接用 http://www.autoit.cn/administrator/ 是不可以的! 所以为了安全点,你可以把 try.php这个名字改的只你自己知道就可以. session_name 里的 Autoit 也是要改的! 可以改的不容易被猜出来. 这样的话就多了一道门, 这就是我的:"改变"你 joomla 的 Administrator目录了!

在你登陆到后台后,如果不关闭这个浏览器窗口,那么他都是一直有效的,如果关闭就要重来!

说出来真是小儿科, 但不说你还真不知道丫...... 没想私有,分享了出来.

 
针对浏览器的标题进行 SEO 的友好hack 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2006-08-05 | View Count View: 17753 | Digg Count Digg: 64

hack文件: includes/joomla.php

503行段:

 function setPageTitle( $title=null ) {
  if (@$GLOBALS['mosConfig_pagetitles']) {
   $title = trim( htmlspecialchars( $title ) );
   $title = stripslashes($title);
   $this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title : 
$GLOBALS['mosConfig_sitename'];
  }
 }

里面的

$this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title :

替换为:

$this->_head['title'] = $title ? $title . " - ". $GLOBALS['mosConfig_sitename'] :

当然上面的 $this一整行也可以直接写为:

$this->_head['title'] = $title . " - ". $GLOBALS['mosConfig_sitename'];

我的joomla.php里改的:

   if ($title == '首页')  {
   $this->_head['title'] =  $GLOBALS['mosConfig_sitename'];
   }else {
   $this->_head['title'] = $title . " - ". $GLOBALS['mosConfig_sitename'];
   }           
  }
 }

其实是一样,只是在首页的时候,首页不显示而已.

 

针对 meta 里的  name="description" 做一下改动!

默认是 "你站点的描述+本页文章的标题" 如果你的描述多的话,这样有点不利!

方法 function appendMetaTag 段里:

 $this->_head['meta'][$i][1] = $content .', '. $this->_head['meta'][$i][1];

改为:

$this->_head['meta'][$i][1] = $this->_head['meta'][$i][1] .', '.$content ;

end by Autoit.

 
« First « 1 2 3 4 5 6 7 8 9 10 » Last »

46 - 50 / 109