drupal

drupal运行在nginx下时候301 loop问题的解决方法

用nginx反响代理给apache来跑drupal。每个站点的首页都显示正常,其它任何页面,静态文件没有问题,但页面不行,出 301 redirect permanant 过多一直到浏览器报错和白屏。

我用的nginx配置文件时omega8cc的,不可能有错误。而且同样的配置,如果proxy给后台的fastcgi就不出这个问题。

所以我开始猜测是apache那边trailing slash设置问题,也不断地修改nginx的conf。但都不行。再排除boost。

今天突然想到了global redirect,发现如果停了global redirect就一起正常。但我不想停那个模块。看它的代码,开始想关掉deslasing这个功能,不行,最后找到问题在 Non-clean to Clean: 这个开关,关了就好了

>Non-clean to Clean:
>关闭
>进行中

drupal: theme中禁止某页或者某种内容类型显示页面标题

http://drupal.org/book/export/html/426482

  <?php
  function THEMENAME_preprocess_page(&$vars) {

    // Titles are ignored by content type when they are not desired in the design.
    $vars['original_title'] = $vars['title'];
    if (!empty($vars['node']) && in_array($vars['node']->type, array('page', 'story'))) {
      $vars['title'] = '';
    }

  }
  ?>


  <?php
  function THEMENAME_preprocess_page(&$vars) {

    // Titles are ignored on the front page.
    $vars['original_title'] = $vars['title'];
    if ($vars['is_front']) {
      $vars['title'] = '';
    }

  }
  ?>

drupal: can best answer module merges with best reply ?

http://drupal.org/project/bestreply
Best reply module allows node authors to mark a particular comment as the best reply. It aims to encourage quality comments and to give some recognition to people posting quality responses.

Version 6.x-6.0 +
User points integration

drupal faq module

http://drupal.org/project/faq_ask
This module is an add-on to the FAQ module that allows users with the new 'ask question' permission to create a question which will be queued for an 'expert' to answer.

For more about why this module exists, please read "Ask the Expert" or Advice Column.

drupal上哪些模块最受欢迎

http://drupal.org/project/usage 按下载次数排名从高到低

drupal: Links and IMG

Yes, you can link between pages in Drupal. It's the same as not having Drupal, except the name may be weird if you're not using the Path module (URL Aliasing).

The biggest mistake people make is not knowing that there needs to be a leading slash ("/"). Omitting this will probably cause a "404:Page not found" error and, depending on which browser you're using, additional problems, like being logged out.

For example, if your home page on a site is node #4, a link to it would look like this: Home, but with URL aliasing turned on, you can also code it like this: Home

A picture could be embedded with this tag:
http://drupal.org/book/export/html/124931

http://drupal.org/handbook/site-recipes

drupal中让整个站点根目录下的所有东西都需要用http auth来验证用户

Secure Site
View
CVS instructions
Revisions
Modules · User access/authentication
Darren Oh - April 28, 2005 - 13:41

This module allows you to authenticate users with a browser-based password (HTTP Auth). You can restrict access to the site by role and choose to secure restricted pages or the entire site. This means the site will be inaccessible to search engines and other crawlers, but you can still allow access to certain users.
http://drupal.org/project/securesite

在drupal中有时候启用聚合css会造成某些css规则丢失,这可能是因为某个css有没有封闭的括号之类错误

>推测:在drupal中的CSS优化是先检查是不是符合语法要求,有借就不做CSS优化,所以整个CSS样式才会丢失,不启用CSS优化时,浏览器自动忽略错误之后的信息.所以在少}之后的CSS都不启作用.
>http://joom.net.ru/content/mo-ban-css-quan-bu-shi-xiao

Syndicate content