
drupal
iteye_520
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Boost模块
boost将动态的php页面在服务器上生成对应的静态的HTML页面,再有用户访问的时候,就会直接访问这些HTML页面,完全省去了php执行、数据库查询的步骤,可以极大地提升访问速度。不太完美的是boost只对匿名用户有效,登陆用户总是获得的动态内容。默认的boost不会对非英文路径的页面生成HTML缓存,使用pathauto模块的需要在admin/settings/performance/...原创 2010-09-08 21:57:30 · 368 阅读 · 0 评论 -
i18n Synchronization 及 image_fupload的问题
新建文件时同步不正常,但编辑却正常。drupal.org上的问题也没有解决办法。http://drupal.org/node/533228原创 2010-09-08 22:19:14 · 87 阅读 · 0 评论 -
views中为图片或标题加新窗口链接的最好办法
首先在field中加入path,把path调到最前面。选中Exclude from display和Use absolute link (begins with "http://") ,然后点中图片或标题的Output this field as a link, link path中写[path],target中写_blank,原来图片或标题的链接要取消。这样就可以为图片或标题加新窗口链接...原创 2010-09-08 22:19:41 · 100 阅读 · 0 评论 -
使用Flag来标记精华评论(转)
flag模块是一个灵活的标记模块,使用这个模块可以标记任意的节点、评论、用户等内容,可以通过这个模块将节点标记为精华、垃圾或者你想做的任何标记.flag模块还可以和views2进行整合进行操作,同时flag还支持action.在官方网站上有非常详细的文档.下面我就讲讲利用Flag模块,给评论加个精华。安装Flag模块和所有模块一样,下载,在模块设置中进行安装.配...原创 2010-09-09 14:08:20 · 270 阅读 · 0 评论 -
taxonomy 模块有个隐藏的路径
taxonomy 模块有个隐藏的路径,“taxonomy/term/1+2” 是 AND 的操作,表示同时在1 和2 目录。 “taxonomy/term/1,2” 是 OR 的操作,表示 1 或者2 目录。原创 2010-09-10 11:17:07 · 197 阅读 · 0 评论 -
Drupal系统.htaccess文件的设置 (转)
对很多站长而言,做301重定向是一个非常麻烦的事,尤其是对广大使用虚拟主机的个人站长。而我们选用的Drupal系统则在这个方面领先了所有的CMS系统,只需要对.htaccess文件进行修改,就可以做好301重定向了。什么是301重定向? 为什么要做301重定向呢?原因很简单,如果你做了正常的域名解析,一般会将带www的域名和不带www的域名都指向首页,搜索引擎的蜘蛛或机器...原创 2010-09-11 21:15:40 · 456 阅读 · 0 评论 -
上传出错
more than likely eveyone who is having a problem here has been developing on their local computer, then are tryng to migrate their system to a remote server. When you do this, you are probably moving ...原创 2010-09-12 01:07:06 · 221 阅读 · 0 评论 -
filefield在firefox下上传文件出错http0error的解决办法
/* '#ahah' => array( // with JavaScript 'path' => 'filefield/ahah/'. $element['#type_name'] .'/'. $element['#field_name'] .'/'. $element['#delta'], 'wrapper' => $element['#id'] .'...原创 2010-09-16 15:46:33 · 377 阅读 · 0 评论 -
更改imagefield的图片的alt和title值为terms和desrction
imagefield_formatter.inc // For all taxonmoy terms $node = $element['#node']; $my_value = array(); foreach ($node->taxonomy as $tid => $term) { $my_value[] = $term->name; } ...原创 2010-09-17 17:07:58 · 169 阅读 · 0 评论 -
内部用Drupal/PHP开发规范1.2
前言常言道,“没有规矩,不成方圆”。良好的编程风格与规范对开发者以及项目管理人员都是非常重要的。当一个软件项目尝试着遵守公共一致的标准时,可以使参与项目的开发人员更容易了解项目中的代码、弄清程序的状况。使新的参与者可以很快的适应环境,防止部分参与者出于节省时间的需要,自创一套风格并养成终生的习惯,导致其它人在阅读时浪费过多的时间和精力。而且在一致的环境下,也可以减少编码出错的机会。缺陷是由...原创 2011-07-19 22:11:01 · 150 阅读 · 0 评论 -
列出所有terms的token
装上token_custom插件 定义一个token为:[code="php"]// For all taxonmoy terms$my_value = array();foreach ($node->taxonomy as $tid => $term) { $my_value[] = $term->name;}$yourtoken = implod...原创 2010-09-08 22:17:39 · 184 阅读 · 0 评论 -
同一drupal多站点,clean url不工作
把.htaccess里的[code="php"]RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]改成RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA][/code] 可使新建的站正常,但原来的站将失效。原创 2010-09-08 22:16:53 · 119 阅读 · 0 评论 -
在theme里区别显示一般分类与freetag标签
add this function to template.php [code="php"]function phptemplate_preprocess_node(&$vars) { // If we have any terms... if ($vars['node']->taxonomy) { // Let's iterate through each te...原创 2010-09-08 22:15:48 · 265 阅读 · 0 评论 -
用boost模块加速你的drupal站(转)
boost模块可以对 html, xml, ajax, css, javascript进行缓存,极大提升游客访问的速度,几乎可以和静态页面媲美。下载boost http://drupal.org/project/boost使用前你需要设置好drupal的cron.如果你的服务器不支持。可以使用Poormanscron 1.1 or 2.0 http://drupal.org/project/...原创 2010-09-08 21:59:45 · 202 阅读 · 0 评论 -
computed_field的使用
Computed Code:[code="php"]if (is_null($node->field_photo[0]['fid'])){$node_field[0]['value'] = 0;}else{$node_field[0]['value'] = count($node->field_photo);}[/code]Compute...原创 2010-09-08 22:01:10 · 375 阅读 · 0 评论 -
Zen 初始化主题的安装ZZZ
1.下载最新版的zen( http://drupal.org/project/zen)2.解压缩至你的themes目录下(sites/all/themes)3.拷贝zen目录下的STARTERKIT文件夹到sites/all/themes目录下。4.重命名该文件夹(例如:mytheme)和info文件,只允许小写字母感和下划线。5.编辑info文件,修改name和d...原创 2010-09-08 22:02:04 · 162 阅读 · 0 评论 -
drupal在导航菜单中加上|字符
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 cod...原创 2010-09-08 22:07:47 · 135 阅读 · 0 评论 -
drupal views中page内容和default不同的办法
Fields→按下override→更新。此時針對Fields的所有增刪及修改都不會動到default display的設定,且會出現(新增欄位)及↑↓(欄位排序用)原创 2010-09-08 22:08:30 · 136 阅读 · 0 评论 -
drupal theme:按照内容类型设计页面布局
由 Evance 于 星期一, 2007-12-24 08:54 发表 源文: Customising the full page layout and sections based on node type翻译: Evance | drupal theme:按照内容类型设计页面布局说明:这篇文章介绍如何根据不同的内容类型(content types)进行页面布局(full pag...原创 2010-09-08 22:09:55 · 139 阅读 · 0 评论 -
cck pager中的号码从只有下方改成上下都有
cck_pager.module中的 [code="php"]function theme_cck_pager_content($content, $element) { return ''. $content . theme('item_list', $element['#cck_pager_pager'], NULL, 'ul', array('class' => '...原创 2010-09-08 22:11:54 · 94 阅读 · 0 评论 -
drupal中views标题的动态写法
当views从Arguments中动态提取参数的时候,标题用%1,可以动态取到arguments的标题原创 2010-09-08 22:12:45 · 169 阅读 · 0 评论 -
修改drupal的ping模块以便ping中文搜索引擎
Ping:Ping 是针对 blog内容的提交方式,实时通知搜索引擎blog上有新内容产生。目前主流的博客程序都支持 ping,您只需要将百度的 ping服务地址http://ping.baidu.com/ping/RPC2加入博客后台并开启 ping功能即可。 将ping模块下的文件中的ping_ping()模块作如下修改:function ping_pin...原创 2010-09-08 22:14:38 · 123 阅读 · 0 评论 -
drupal_get_path_alias($_GET['q'])获得当前路径
drupal_get_path_alias($_GET['q'])可以获得当前页面的路径别名原创 2011-05-01 02:48:22 · 156 阅读 · 0 评论