導航:首頁 > 文件管理 > drupal配置文件

drupal配置文件

發布時間:2023-03-20 07:30:41

Ⅰ 如何在Drupal 中設置 Ckeditor模塊 使用Syntaxhighlighter代碼高亮

1,安裝<a href="http://www.drupalla.com/project/ckeditor" class="alinks-link" title="模塊介紹:FCKEditor是用常用的網版的頁文本編輯器, Drupal的FCKEditor模塊也已有很長的歷史了,其與IMCE, Image Browser等模塊結合起來使用也是非常的爽。不過現在,FCKEditor升級了新版本,換了個新皮膚,做了些優化,將名稱更改為:CKEditor。安裝方式和FCKeditor一模一樣,沒有任何變化,而且也可以和IMCE集成。">Ckeditor 模塊。
首先下載 Ckeditor 模塊,並安裝, 然後下載 Ckeditor libraries,解壓到/sites/all/libraries,進入後台設置,
Drupal6:Administer > Site Configuration > Ckeditor
Drupal7:Administer > Config > Content > Ckeditor

配置你准備用到Syntaxhighlighter的配置文件。同時要確保
確保你的用戶角色已獲准訪問這個Ckeditor的配置
確保你的可見性設置正確

2,安裝Syntax Highlighter模塊和庫
下載Syntax Highlighter 模塊,並且安裝
下載Syntax Highlight library,解壓到/site/all/libraries
進入Administation > Site Configuration > Syntax highlighter(Drupal6)或 Administation > Config > Content > Syntaxhighlighter(Drupal7),勾選你想打開的格式。

3,安裝Syntax highlighter Ckeditor plugin
下載Ckeditor plugin解壓到sites/all/mole/ckeditor/plugins/syntaxhighlight
然後編輯/sites/all/moles/ckeditor/ckeditor.config.js
增加28行跟75行
?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

/*
<a href="/project/right" class="alinks-link" title="模塊介紹:可以設定網站整體和單篇內容的著作權/授權聲明。管理者可以設定可選用的著作權種類,呈現在區塊或頁尾里。手冊頁面(Book)可以選擇性地設定所有子頁面為同一著作權聲明,並讓每一份手冊或區域有其自己的著作權聲明。">Copyright</a> (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

/*
WARNING: clear browser's cache after you modify this file.
If you don't do this, you may notice that browser is ignoring all your changes.
*/
CKEDITOR.editorConfig = function(config) {
config.indentClasses = [ 'rteindent1', 'rteindent2', 'rteindent3', 'rteindent4' ];

// [ Left, Center, Right, Justified ]
config.justifyClasses = [ 'rteleft', 'rtecenter', 'rteright', 'rtejustify' ];

// The minimum editor width, in pixels, when resizing it with the resize handle.
config.resize_minWidth = 450;

// Protect PHP code tags (<?...?>) so CKEditor will not break them when
// switching from Source to <a href="/project/wysiwyg" class="alinks-link" title="模塊介紹:「What You See Is What You Get」 的首字母縮寫,即有「所見即所得」的意思。 Drupal 默認只提供簡單的文本框,並未載入任何編輯器。這對於大多數干接觸 Drupal 的國內用戶來講,真是十分的不方便 :D WYSIWYG 是用於集成「所見即所得」編輯器的介面,通過使用 WYSIWYG 模塊,能夠為 Drupal 集成數十種國內外流行的所見即所得編輯器,管理員可根據自己的喜好來選擇不同的編輯器。 目前用得比較多的編輯器有:CKEditor, TinyMCE, FCKE">WYSIWYG</a>.
// Uncommenting this line doesn't mean the user will not be able to type PHP
// code in the source. This kind of prevention must be done in the server
// side
// (as does Drupal), so just leave this line as is.
config.protectedSource.push(/<\?[\s\S]*?\?>/g); // PHP Code
config.protectedSource.push(/<code>[\s\S]*?<\/code>/gi); // Code tags
config.extraPlugins = '';
config.extraPlugins += (config.extraPlugins ? ',syntaxhighlight' : 'syntaxhighlight' );

// Define as many toolbars as you need, you can change toolbar names and remove or add buttons.
// List of all buttons is here: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.toolbar_Full

// This toolbar should work fine with "Filtered HTML" filter
config.toolbar_DrupalFiltered = [
['Source'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],
['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
['<a href="/project/image" class="alinks-link" title="模塊介紹:讓有特定許可權的用戶可以上傳圖片到網站里,並且會自動產生縮圖。圖片可以使用在文章里(例如透過tinymce編輯工具進行選取),或是作成簡單的網路相簿。">Image</a>','Flash','Table','HorizontalRule','<a href="/project/smiley" class="alinks-link" title="模塊介紹: 讓文本編輯器支持表情">Smiley</a>','SpecialChar'],
['Maximize', 'ShowBlocks'],
'/',
['Format'],
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiRtl','BidiLtr'],
['<a href="/project/link" class="alinks-link" title="模塊介紹:與 File Field 和 Image Field 類似,Link 也為 CCK 增加了一種擴展類型,即鏈接欄位。通過使用鏈接欄位,用戶可以向節點中添加鏈接,鏈接包括 URL,標題及可選的 target 屬性。">Link</a>','Unlink','Anchor','<a href="/project/linkit" class="alinks-link" title="模塊介紹:通過使用一個自動完成欄位,使節點、用戶、視圖和術語支持內部鏈接。">Linkit</a>','LinkToNode','LinkToMenu'],
['DrupalBreak', 'DrupalPageBreak']
];

/*
* DrupalBasic will be forced on some smaller textareas (if enabled)
* if you change the name of DrupalBasic, you have to update
* CKEDITOR_FORCE_SIMPLE_TOOLBAR_NAME in ckeditor.mole
*/
config.toolbar_DrupalBasic = [ [ 'Format', 'Bold', 'Italic', '-', 'NumberedList','BulletedList', '-', 'Link', 'Unlink', 'Image' ] ];

/*
* This toolbar is dedicated to users with "Full HTML" access some of commands
* used here (like 'FontName') use inline styles, which unfortunately are
* stripped by "Filtered HTML" filter
*/
config.toolbar_DrupalFull = [
['Source'],
['Cut','Copy','Paste','PasteText','PasteFromWord','-','SpellChecker', 'Scayt'],
['Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'],
'/',
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiRtl','BidiLtr'],
['Link','Unlink','Anchor','Linkit','LinkToNode', 'LinkToMenu'],
'/',
['Format','Font','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks'],
['DrupalBreak', 'DrupalPageBreak', 'Code']
];

/*
* Append here extra CSS <a href="/project/rules" class="alinks-link" title="模塊介紹:可以設置一些規則,當某事件發生時,自動執行某些動作。比如有人回復就自動給作者發信等等。drupal自帶的trigger太簡單,這個功能比較全,用起來還挺方便。">rules</a> that should be applied into the editing area.
* Example:
* config.extraCss = 'body {color:#FF0000;}';
*/
config.extraCss = '';
/**
* Sample extraCss code for the "marinelli" theme.
*/
var themeName = Drupal.settings.ckeditor.theme;
if (typeof themeName == "object") {
themeName = Drupal.settings.ckeditor.theme[0];
}
if (themeName == "marinelli") {
config.extraCss += "body{background:#FFF;text-align:left;font-size:0.8em;}";
config.extraCss += "#primary ol, #primary ul{margin:10px 0 10px 25px;}";
}
if (themeName == "newsflash") {
config.extraCss = "body{min-width:400px}";
}

/**
* CKEditor's editing area body ID & class.
* See http://drupal.ckeditor.com/tricks
* This setting can be used if CKEditor does not work well with your theme by default.
*/
config.bodyClass = '';
config.bodyId = '';
/**
* Sample bodyClass and BodyId for the "marinelli" theme.
*/
if (themeName == "marinelli") {
config.bodyClass = 'singlepage';
config.bodyId = 'primary';
}
};

Ⅱ 為什麼drupal安裝後點擊任何一個連接都會回到Index of /drupal-7.7這個頁面

修改下apache配置文件中的conf文件。將AllowOverride None改為AllowOverride All。薯鏈問題絕讓解並手局決。
http://user.qzone.qq.com/250779544/infocenter#!app=2&via=QZ.HashRefresh&pos=1373360457

Ⅲ 在Drupal7中的默認主題配置文件是哪個

同下,系統默認主題都是放在 themes文件夾下的,裡面有個.info後綴名的文件就是了。

Ⅳ drupal無法開啟pdo擴展.

php.ini文件中的pdo擴展庫打開了嗎? extension=php_pdo.dll 這個模塊,

Ⅳ 如何在Drupal7中配置Memcache

Memcache的配置就不多說,drupal由於模塊較多,資料庫調用頻繁,因此memcache是drupal站點中必備的配置,本文大概列一塌孫下Drupal7中關於memcache的配置情察晌況,以方便大家查閱。
1. 安裝memcache服務以及啟動memcached。
2. 安裝drupal的memcache模塊。(http://drupal.org/project/memcache)
3. 配置settings.php

$conf['cache_backends'][] = 'sites/all/moles/memcache/memcache.inc';
// The 'cache_form' bin must be assigned no non-volatile storage.
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['memcache_key_prefix'] = 'something_unique';

注意,需要將memcache.inc的文件路徑寫正確,如Drupal模塊目錄組織方式總結中提到,團沒鏈我們一般將memcache模塊會放置在contrib文件夾下面,因此路徑可能是 sites/all/moles/contrib/memcache/memcache.inc。
此外memcache_key_prefix最好設置一下。
4. 多個memcachd服務。
默認情況下,如果不配置memcache_servers以及memcache_bins的話,Drupal會認為只有一個server,即127.0.0.1:11211,如果有多個memcache實例的話,需要添加如下配置。
$conf['memcache_servers'] = array(
'10.1.1.1:11211' => 'default',
'10.1.1.1:11212' => 'default',
'10.1.1.2:11211' => 'default',
'10.1.1.3:11211' => 'cluster2',
'10.1.1.4:11211' => 'cluster2'
);
$conf['memcache_bins'] = array(
'cache' => 'default',
'cache_filter' => 'cluster2',
'cache_menu' => 'cluster2'
);

一切就緒。
最後講解一下單台機器如何配置多個memcache實例,即單台機器的memcache集群搭建。
我們需要修改2個文件,一個是啟動腳本/etc/init.d/memcached-multi,另一個是配置文件/etc/sysconfig/memcached。
/etc/sysconfig/memcached是用來配置多個memcache實例的大小
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="512"
OPTIONS=""
MULTIBUCKET="2"
CACHESIZEARRAY[1]="1024"
CACHESIZEARRAY[2]="128"

/etc/init.d/memcached-multi是用來啟動memcache集群。(start、stop、restart)
#! /bin/sh
#
# chkconfig: - 55 45
# description: The memcached daemon is a network memory cache service.
# processname: memcached
# config: /etc/sysconfig/memcached
# pidfile: /var/run/memcached/memcached.pid

# Standard LSB functions
#. /lib/lsb/init-functions

# Source function library.
. /etc/init.d/functions

PORT=11211
USER=memcached
MAXCONN=1024
CACHESIZE=64
OPTIONS=""
MULTIBUCKET=""

if [ -f /etc/sysconfig/memcached ];then
. /etc/sysconfig/memcached
fi

[ -z "$MULTIBUCKET" ] && MULTIBUCKET=1

# Check that networking is up.
. /etc/sysconfig/network

if [ "$NETWORKING" = "no" ]
then
exit 0
fi

RETVAL=0
prog="memcached"

start () {
echo -n $"Starting $prog: "
# insure that /var/run/memcached has proper permissions
if [ "`stat -c %U /var/run/memcached`" != "$USER" ]; then
chown $USER /var/run/memcached
fi

for i in `/usr/bin/seq 1 $MULTIBUCKET`; do
THISCACHESIZE=$CACHESIZE
[ ${#CACHESIZEARRAY[*]} -gt 0 -a ${CACHESIZEARRAY[$i]:-0} -gt 0 ] && THISCACHESIZE=${CACHESIZEARRAY[$i]}
daemon --pidfile /var/run/memcached/memcached.pid memcached -d -p $PORT -u $USER -m $THISCACHESIZE -c $MAXCONN -P /var/run/memcached/memcached-$i.pid $OPTIONS
let RETVAL=$RETVAL+$?
let PORT=$PORT+1
done
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/memcached
}
stop () {
echo -n $"Stopping $prog: "
for i in `/usr/bin/seq 1 $MULTIBUCKET`; do
killproc -p /var/run/memcached/memcached-$i.pid /usr/bin/memcached
let RETVAL=$RETVAL+$?
done
echo
if [ $RETVAL -eq 0 ] ; then
rm -f /var/lock/subsys/memcached
rm -f /var/run/memcached.pid
fi
}

restart () {
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
echo "Warning: This status check is laughable. Inspect netstat or ps output manually."
status memcached
;;
restart|reload|force-reload)
restart
;;
condrestart)
[ -f /var/lock/subsys/memcached ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
exit 1
esac

exit $RETVAL

Ⅵ 如何進行drupal更新

第一步、由於伺服器上的程序除了sites/default文件夾下的settings.php以及其下的files文件夾與本地的程序不相同,其他都是一樣的,所以先將本次程序打包保存。
但是UPGRADE.txt文件中特別強調要備份sites目錄下的的文件,包含你的配置文件、新添加的模塊和主題、以及站點上傳文件,所以費了很大勁兒還是把
sites/default/settings.php和sites/default/files目錄down下來了並再次將sites目錄打包保存。

這里我們不討論新站點的安裝和多站點的配置。

備份伺服器上的資料庫並將本地資料庫更新為最新數據。

第二步、如果可以的話,使用userId為1的賬號登錄,這個賬號有執行update.php文件的許可權,不要關閉瀏覽器直到最後的更新步驟的完成。

第三步、在「站點維護」中設置站點為「離線」模式,為了使數據更新不會中斷並且避免使用戶在更新過程中看到錯誤信息

第四步、如果使用的是自定義主題或者第三方貢獻主題,請換回drupal的核心主題,比如Garland 或者Bluemarine

第五步、停止所有的自定義模塊或者第三方模塊

第六步、移除drupal安裝目錄下的所有舊文件及目錄

第七步、解壓新的文件目錄到drupal的安裝目錄

第八步、拷貝files目錄、sites目錄、以及.htaccess文件和robots.txt文件到drupal安裝目錄下

第九步、驗證新的配置文件,以確保它具有正確的信息

第十步、在瀏覽器中執行根目錄下的update.php文件,這一步將為新的drupal更新核心數據表。如果 你沒有執行update.php的許可權,請做如下操作:打開settings.php文件找到一行顯示:$update_free_access = FALSE;改變$update_free_access = TRUE;當update.php執行完畢,請立即將settings.php改回原狀

第十一步、進行自定義和第三方模塊版本的更新操作

第十二步、重新開啟自定義和第三方模塊,並再次執行update.php來更新這些模塊的數據表

第十三步、返回舊的主題,但要確保該主題是適合你的drupal的新版本的

第十四步、開啟站點重新「上線」模式

Ⅶ 如何使用drupal直接操作postgres資料庫

Drupal是主流的CMS系統之一。因此具備Drupal技能的開發人員有很多。

考慮這樣的情況,如果你有一個現有的非Drupal系統,然後有一個Drupal開發團隊,你希望這個Drupal團隊幫你擴展應用。

那麼這個時候,Drupal應用就應該設計成是支持多資料庫的。

在Drupal中使用多數據,也很簡單。

1、首先在配置文件(Settings.php)中把默認的資料庫配置項改成數組形式:

<?php
$db_url['default'] = 'mysql://drupal:drupal@localhost/drupal';
$db_url['jigo'] = 'mysql://user:pwd@localhost/jigo';
?>

注意這里的資料庫格式必須是一樣的。即不能一個是mysql,另外一個是pgsql。
而且默認的必須是drupal自己的資料庫。

2、然後在程序中動態切換:
<?php
global $db_url; // 資料庫鏈接的內部變數
if (!is_array($db_url)) {
$default_db = $db_url;
$db_url = array('default' => $default_db);
}
//也可以動態設置新的資料庫,這里注釋掉,因為我們已經寫在配置項中
//$db_url['jigo'] = 'mysql://user:pwd@localhost/jigo';

db_set_active('jigo'); // activation & execution same as explained above
$results = db_query($sql); //sql represents the query to be executed
db_set_active('default'); // set back to original
?>
regards,
iefreer

Ⅷ drupal settings.php 修改後要重啟php嗎

如果修改的是PHP伺服器的配置鍵宏文件就要重啟apache才生效,你修改的是PHP腳本那陸緩是不用重啟apache的,只要保存好,在瀏覽器裡面調試就早亮模可以看到結果了。

Ⅸ drupal8怎麼安裝ueditor

請自己下載ueditor版本(本人是PHP版本 UFT-8版,不包含_examples、_src等文件夾及文件)。下載完成後,會得到以下這樣的目錄結構的:

ueditor文件說明:
dialogs 是存放各個彈出窗口應用功能的文空橘件,包含html,js
lang 是存放編輯器語言的文件,有中文和E文
php 是存放文件上傳、塗鴉、遠程圖片、在線圖片管理,添加視頻的php源碼文件,可以按自己的需求修改
themes 當然就是主題樣式圖片存放的地方
third-party 是第三方插件文件存放地方。
editor.all.js 此文件是所有_src里的js源碼的合集
editor.all.min.js 此文件是editor_all.js的壓縮芹老版
editor.config.js 此文件是UE的配置斗首團文件
editor.parse.js 此文件是UE的解析文件
editor.parse.min.js 此文件是UE的解析壓縮文件

Ⅹ rpal7 如何得知項目資料庫名

每個項野基目根目錄都會有config/config.php配悄做置文件的,你打開該文件就自然會知道資料庫啟脊衡配置了!

閱讀全文

與drupal配置文件相關的資料

熱點內容
maya粒子表達式教程 瀏覽:84
抖音小視頻如何掛app 瀏覽:283
cad怎麼設置替補文件 瀏覽:790
win10啟動文件是空的 瀏覽:397
jk網站有哪些 瀏覽:134
學編程和3d哪個更好 瀏覽:932
win10移動硬碟文件無法打開 瀏覽:385
文件名是亂碼還刪不掉 瀏覽:643
蘋果鍵盤怎麼打開任務管理器 瀏覽:437
手機桌面文件名字大全 瀏覽:334
tplink默認無線密碼是多少 瀏覽:33
ipaddgm文件 瀏覽:99
lua語言編程用哪個平台 瀏覽:272
政采雲如何導出pdf投標文件 瀏覽:529
php獲取postjson數據 瀏覽:551
javatimetask 瀏覽:16
編程的話要什麼證件 瀏覽:94
錢脈通微信多開 瀏覽:878
中學生學編程哪個培訓機構好 瀏覽:852
榮耀路由TV設置文件共享錯誤 瀏覽:525

友情鏈接