Support jOOmla! Autoit!
批量替换文章里失效的触发器或敏感字眼 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2008-04-11 | View Count View: 9835 | Digg Count Digg: 14

主要是触发器用来用去,导致"垃圾"一片....文章里到处可见的 {mosxx} 等.

phpMyAdmin的 sql 里执行:

UPDATE jos_content SET fulltext = replace(fulltext,"{mosreg}","");

fulltext 及 introtext 是放的文章的内容. 主要是用到 replace 函数而已.  也支持正则.

 

 
一站多Ip或多域名或交叉使用的解决方法! 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2008-01-30 | View Count View: 10608 | Digg Count Digg: 30

内网访问用内网ip,外网访问用外网ip或域名,一站绑定多网址....总之用Joomla建的站,只要域名指向过来,随便用哪个域名都可以正常访问!按理说这样对站的SEO不好,不过需要的就是需要,年前最后一帖送给大家。

 

解决方法:

只需要改configuration.php里的 $mosConfig_live_site 的值就可以了!

$mosConfig_live_site = 'http://'.$_SERVER['SERVER_NAME'] ;

顺便祝大家新年快乐!

 
joomla comment 3.12 首页 发表评论Itemid值问题 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2007-12-22 | View Count View: 11067 | Digg Count Digg: 21

joomla comment 3.12

/components/com_comment/joscomment/comment.class.php

about 405 line:

 
function insertCountButton()
{
 global $database, $mainframe;
 
 
 $Itemid = $mainframe->getItemid($this->_contentId);
 
 
  
$adress = sefRelToAbs("index.php?option=com_content&task=view&id=$this->_contentId" . ( $Itemid ? "&Itemid=$Itemid" : "" ));
  
 ...
}

 

 

 
苹果风格的菜单 - CSS Dock Menu 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2007-12-16 | View Count View: 28870 | Digg Count Digg: 77

效果如下图

苹果风格的菜单 - CSS Dock Menu
CSS Dock Menu

方法:在要用的页面里插入下面js+css ( 注意路径)

 <script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/interface.js"></script>
 <link href="style.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
 <style type="text/css">
 div, img { behavior: url(iepngfix.htc) }
 </style>
<![endif]-->

 然后在 <body> 标签里插入:

 <script type="text/javascript">
 
 $(document).ready(
  function()
  {
   $('#dock2').Fisheye(
    {
     maxWidth: 60,
     items: 'a',
     itemsText: 'span',
     container: '.dock-container2',
     itemWidth: 40,
     proximity: 80,
     alignment : 'left',
     valign: 'bottom',
     halign : 'center'
    }
   )
  }
 );
 
</script>

菜单为:

<div class="dock" id="dock2">
  <div class="dock-container2">
 
  <a class="dock-item2" href="http://www.autoit.cn/#"><span>首页</span><img src="images/home.png" alt="home" /></a> 
  <a class="dock-item2" href="http://www.autoit.cn/#"><span>联系</span><img src="images/email.png" alt="contact" /></a> 
 
  </div>
</div>

这样,就是如图效果的菜单了。

 

如果需要菜单名字在下面的话,在<body>标签里插入的要替换为:

<script type="text/javascript">
 
 $(document).ready(
  function()
  {
   $('#dock').Fisheye(
    {
     maxWidth: 50,
     items: 'a',
     itemsText: 'span',
     container: '.dock-container',
     itemWidth: 40,
     proximity: 90,
     halign : 'center'
    }
   )
  }
 );
 
 
</script>

菜单为:

<div class="dock" id="dock">
  <div class="dock-container">
 
  <a class="dock-item" href="http://www.autoit.cn/#"><span>首页</span><img src="images/home.png" alt="home" /></a> 
  <a class="dock-item" href="http://www.autoit.cn/#"><span>联系</span><img src="images/email.png" alt="contact" /></a>   
  </div>
</div>

注意区别个 id 及 链接的 css 就可以了。

下载包里提供了单独上,单独下及一页上 上下都有 的 demo 了。

http://www.autoit.cn/index.php/component/option-com_docman/task-doc_details/gid-137/Itemid-33.html

 
文章右侧增加广告的补充与扩展 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2007-08-09 | View Count View: 10295 | Digg Count Digg: 32

开始是这样:[参考:http://www.autoit.cn/index.php/content/view/48/25/]

<!--贴内右侧广告开始 by www.autoit.cn-->
<div style='float:right;'>
<div align='center'>
<!--这里放你的广告代码或者建立一个模块位置,在后台用我的 mod_htmlcode 模块放在这个位置...放你想放的一切!-->
</div>
</div>    
<!--贴内右侧广告结束 by www.autoit.cn-->

如果首页有文章显示的话,而首页[及blog形式页]不想显示这些AD可以前后增加一句变为:

 

<?php if  ($option !="com_frontpage" && !$params->get( 'intro_only' ) && $task != "blogsection") { ?>
<!--贴内右侧广告开始 by www.autoit.cn-->
<div style='float:right;'>
<div align='center'>
<!--这里放你的广告代码或者建立一个模块位置,在后台用我的 mod_htmlcode 模块放在这个位置...放你想放的一切!-->
</div>
</div>    
<!--贴内右侧广告结束 by www.autoit.cn-->
<?php } ?>

当然很多人都需要个随机性的,如果你用 google ad 的话,他默认是随机出现, 在 Google 推荐AD2.0 出现之前, 如果文章里放一推荐 firfox 的话,一直出现总不是很好,这个时候就想 随机的出现 Firefox 及 Adsense 等。[比如 dvbox.cn 的左上角的 推荐], 当然现在 Google 推荐AD2.0 的出现已经弥补了这个问题。 不过,如果更多的人还是要随机的出现多个不同的图片或广告类的。那么 实现方法也是很容易: 定义个数组, 随机输出就可以了。

大概形式为:

<?php 
$autoit = array('a','b','c')
echo $autoit[rand(0,3)];
?>

具体实例例如:

<?php 
$autoit = array('<iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="320" height="80" src="http://u.sl.iciba.com/union/pw/style_587.html?uid=28743&sid=0&adid=587&adtype=11" id="ksu_style_587"></iframe>','<iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="80" height="250" src="http://u.sl.iciba.com/union/pw/style_679.html?uid=28743&sid=0&adid=679&adtype=11" id="ksu_style_679"></iframe>','<iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="320" height="120" src="http://union.wps.kingsoft.com/union/wpsau/style_740.html?uid=28743&sid=0" id="ksu_style_740"></iframe>','<iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="100" height="300" src="http://u.www.duba.net/union/scan/style_407.html?uid=28743&sid=0&adid=407&adtype=42" id="ksu_style_407"></iframe>','<iframe scrolling="no" frameborder="0" marginheight="0" marginwidth="0" width="150" height="25" src="http://union.shop.kingsoft.com/union/shop/style_121.html?uid=28743&sid=0&adid=121&adtype=7" id="ksu_style_121"></iframe>'); 
echo $autoit[rand(0,4)];
?>

将这段直接替换上面的:

<!--这里放你的广告代码或者建立一个模块位置,在后台用我的 mod_htmlcode 模块放在这个位置...放你想放的一切!-->

就可以实现了打开文章后,右侧可以随机出现... Demo可参考: http://huihuiart.gnway.net

在比如:

<?php 
$autoit = array('img_1','img_2','img_3')
echo '<img src="images/'. $autoit[rand(0,3)] .'.jpg';
?>

就是随机的输出 images 目录下的 img_1.jpg , img_2.jpg, img_3.jpg 3个图片。 如果要5个图的话,

<?php 
$autoit = array('img_1','img_2','img_3','img_4','img_5')
echo '<img src="images/'. $autoit[rand(0,4)] .'.jpg';
?>

也可以这样:

<?php 
$autoit = array('img_1.jpg','img_2.jpg','img_3.jpg','img_4.jpg','img_5.jpg')
echo '<img src="images/'. $autoit[rand(0,4)];
?>

灵活用去了...

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

6 - 10 / 109