Nguyen Tien Si

Topic “Drupal 6”

Ghi chú ngắn gọn về cấu trúc thông tin ở Drupal

1. Quá khứ (Drupal 6)

  • Các loại dữ liệu chính: Node, User, Comment, Taxonomy term (mỗi loại dữ liệu này đều có key (hay còn gọi là property - thuộc tính) và data).
  • Dữ liệu quản lý theo cách khác nhau, ví dụ Node có cách tương tác của node (hook_nodeapi), User có cách tương tác của user (hook_user).
  • Truy xuất theo cách khác nhau.
  • Lưu trữ theo cách khác nhau.
  • Dẫn đến truy xuất/mở rộng/chia sẽ khó khăn.
  • Hầu như dữ liệu mở rộng đều phụ thuộc vào node (vậy có loại dữ liệu mới phải phụ thuộc rất nhiều vào workflow cũng như cách tương tác của node).

Biến page_cache_fastpath và hàm page_cache_fastpath ở đâu trong Drupal 6.

Trong file bootstrap.inc

<?php
function _drupal_bootstrap($phase) {
  global
$conf;

  switch (
$phase) {

    case
DRUPAL_BOOTSTRAP_CONFIGURATION:
     
drupal_unset_globals();
     
// Start a page timer:
     
timer_start('page');
     
// Initialize the configuration
     
conf_init();
      break;
    case
DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE:
     
// Allow specifying special cache handlers in settings.php, like
      // using memcached or files for storing cache information.
     
require_once variable_get('cache_inc', './includes/cache.inc');
     
// If the page_cache_fastpath is set to TRUE in settings.php and
      // page_cache_fastpath (implemented in the special implementation of
      // cache.inc) printed the page and indicated this with a returned TRUE
      // then we are done.
     
if (variable_get('page_cache_fastpath', FALSE) && page_cache_fastpath()) {
        exit;
      }
      break;
?>

Những thay đổi ở theme D7 so với D6

1. CSS ID đặt tên thân thiện hơn

Recent blog posts
Old CSS ID (Drupal 6): block-blog-0
New CSS ID (Drupal 7): block-blog-recent

Book navigation
Old CSS ID (Drupal 6): block-book-0
New CSS ID (Drupal 7): block-book-navigation

Recent comments
Old CSS ID (Drupal 6): block-comment-0
New CSS ID (Drupal 7): block-comment-recent

Active forum topics
Old CSS ID (Drupal 6): block-forum-0
New CSS ID (Drupal 7): block-forum-active

New forum topics

Old CSS ID (Drupal 6): block-forum-1

Syndicate content