drupal相关
Dec 26
drupal获取指定term下节点
Sat, 12/26/2009 - 14:37 — admin
<UL>
<?php
$result = db_query("select n.nid from {term_node} tn, {node} n where tn.nid = n.nid and tn.tid = 14 ORDER BY nid DESC LIMIT 0,10");
Dec 25
pressflow更新到6.15了
Dec 24
drupal源码分析 转自http://terry831010.blog.163.com/blog/static/6916117120087842611167/
Thu, 12/24/2009 - 08:50 — bbbbbb
说实在的,drupal确实很复杂, 在国内用的人也不多,唯一看的懂的中文技术网站估计就是 drupalchina.org了,
但是对于源代码的分析是少之又少.没有办法,只能自己来从头看起了!
越复杂的东西,往往功能越强大,drupal也是这样的.
Dec 23
获取一个vocabulary下的所有term用区块显示
Wed, 12/23/2009 - 18:46 — bbbbbb
$VID = 2; /* Desired vocabulary term ID */
$result = db_query("SELECT * FROM {term_data} d WHERE d.vid = $VID ORDER BY d.name");
Dec 07
修改drupal索引内容类型
Mon, 12/07/2009 - 18:57 — admin
node.module的1798行
$result = db_query_range("SELECT n.nid FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE n.type = 'news' or n.type = 'life' or n.type = 'og' and d.sid IS NULL OR d.reindex <> 0 ORDER BY d.reindex ASC, n.nid ASC", 0, $limit);
while ($node = db_fetch_object($result)) {
print_r($node);
//exit();
_node_index_node($node);
}