`
rexcn
  • 浏览: 87261 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
首先在field中加入path,把path调到最前面。选中Exclude from display和Use absolute link (begins with "http://") ,然后点中图片或标题的Output this field as a link, link path中写[path],target中写_blank,原来图片或标题的链接要取消。 这样就可以为图片或标题加新窗口链接。
新建文件时同步不正常,但编辑却正常。 drupal.org上的问题也没有解决办法。 http://drupal.org/node/533228
  我们在使用PHP substr截取中文字符的时候,经常会出现乱码的情况,导致程序无法正常运行,这时怎么引起的呢?通过分析,我们知道,主要是substr可能硬生生的将一个中文字符“锯”成两半。解决办法:   1、使用mbstring扩展库的mb_substr截取就不会出现乱码了。   2、自己书写截取函数,但效率不如用mbstring扩展库来得高。   3、如果仅是为了输出截取的串,可用如下方式实现:substr($str, 0, 30).chr(0)。   substr()函数可以分割文字,但要分割的文字如果包括中文字符往往会遇到问题,这时可以用mb_substr()/mb_strc ...
装上token_custom插件 定义一个token为: // For all taxonmoy terms $my_value = array(); foreach ($node->taxonomy as $tid => $term) { $my_value[] = $term->name; } $yourtoken = implode(' ', $my_value); print $yourtoken;
把.htaccess里的 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] 改成 RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA] 可使新建的站正常,但原来的站将失效。
add this function to template.php function phptemplate_preprocess_node(&$vars) { // If we have any terms... if ($vars['node']->taxonomy) { // Let's iterate through each term. foreach ($vars['node']->taxonomy as $term) { // We will build a new array where there will ...
Ping:Ping 是针对 blog内容的提交方式,实时通知搜索引擎blog上有新内容产生。 目前主流的博客程序都支持 ping,您只需要将百度的 ping服务地址 http://ping.baidu.com/ping/RPC2加入博客后台并开启 ping功能即可。 将ping模块下的文件 ...
/* 注释 */ 改成 <?php /* 注释 */ ?> 浏览器就不会下载和解释。
当views从Arguments中动态提取参数的时候,标题用%1,可以动态取到arguments的标题
cck_pager.module中的 function theme_cck_pager_content($content, $element) { return '<div class="cck_pager">'. $content . theme('item_list', $element['#cck_pager_pager'], NULL, 'ul', array('class' => 'pager')) .'</div>'; } 改成: function theme_cck_pager_content($co ...
由 Evance 于 星期一, 2007-12-24 08:54 发表 源文: Customising the full page layout and sections based on node type 翻译: Evance | drupal theme:按照内容类型设计页面布局 说明: 这篇文章介绍如何根据不同的内容类型(content types)进行页面布局(full page layout)。比如说你想让你的blog和books拥有不同的外观。 步骤: 作为一个示例,下面一步一步演示一下如何为网站的blogs,books和首页(front page)拥有不同的页面布局。 首先 ...
IE: <!--[if lte IE 7]> <div>IE7及以下能看到</div> <![endif]--> lt就是小于; gt就是大于; lte就是小于等于; gte就是大于等于; 所以前面这句”if lte IE 7″就是小于等于IE7咯,也就只有IE7及以下的IE6才能看到。 如果你 ...
Fields→按下override→更新。此時針對Fields的所有增刪及修改都不會動到default display的設定,且會出現(新增欄位)及↑↓(欄位排序用)
Copy and paste the theme_links function from theme.inc to your template.php file. change the name of the function to YOURTHEME_links where YOURTHEME is the name of your theme. Add the following code snippet on the second line of the function, after the "$output=' ';" <?php // | del ...
最近在网上看到1个很有意思的CSS扩展,这里介绍给大家。LESS 最早是1个ruby的gem,用于扩展css的语法,用了LESS后,可以在css中使用变量,运算符,include,嵌套规则等等。现在LESS出了js版本,让我们一起来看看LESS能为我们带来什么吧? 使用    1. 下载js: http://lesscss.googlecode.com/ 最新版本好像是 1.0.22    2. 使用less,css文件的后缀名需要改为.less。    3. 在html页面中加入下面代码      <!-- style.less文件就是样式表文件,并且style.less ...
Global site tag (gtag.js) - Google Analytics