Drupal 7

 

 

sqlite DB 位置

sites/default/files/.ht.sqlite

/var/www/sites/default/settings:

$databases = array (
  'default' =>
  array (
    'default' =>
    array (
      'database' => 'sites/default/files/.ht.sqlite',
      'driver' => 'sqlite',
      'prefix' => '',
    ),
  ),
);

 

保護此目錄:

.htaccess

order allow,deny
deny from all

 


 

由 Program 上的角度來看

modules/field/modules/text/text.module

text_summary($text, $format = NULL, $size = NULL)

 

 

  $size = variable_get('teaser_length', 600); ..............................   // Find where the delimiter is in the body   $delimiter = strpos($text, '<!--break-->'); .............................. 

 

 

Parameters

$text The content for which a summary will be generated.

$format The format of the content. If the PHP filter is present and $text contains PHP code, we do not split it up to prevent parse errors. If the line break filter is present then we treat newlines embedded in $text as line breaks. If the htmlcorrector filter is present, it will be run on the generated summary (if different from the incoming $text).

$size The desired character length of the summary. If omitted, the default value will be used. Ignored if the special delimiter is present in $text.

Return value

The generated summary.

 


 

在後台 configure:

Default display

 Administer > Structure > Content types

manage display > Custom display settings> 

裡面可以設定以下不同情況下的 Display

Full content, Teaser, RSS, Search index and Search result.

 

Creative Commons license icon Creative Commons license icon