How to Add Bootstrap Multi-level Dropdown Submenu in Drupal

Download and install a Bootstrap theme. Modify the following at bootstrap/templates/menu/system/form-element.func.php: /** * Overrides theme_form_element(). */ function bootstrap_form_element(&$variables) { $element = &$variables['element']; $name = !empty($element['#name']) ? $element['#name'] : FALSE; $type = !empty($element['#type']) ? $element['#type'] : FALSE; $checkbox = $type && $type === 'checkbox'; $radio = $type && $type === 'radio'; // Create an attributes array for the wrapping container. if (empty($element['#wrapper_attributes'])) { $element['#wrapper_attributes'] = array(); } $wrapper_attributes = &$element['#wrapper_attributes']; // This function is invoked as theme wrapper, but the rendered form element // may not necessarily have been processed by form_builder(). $element += array( '#title_display' => 'before', );
Download and install a Bootstrap theme. Modify the following at bootstrap/templates/menu/system/form-element.func.php: /** * Overrides theme_form_element(). */ function bootstrap_form_element(&$variables) { $element = &$variables['element']; $name = !empty($element['#name']) ? $element['#name'] : FALSE; $type = !empty($element['#type']) ? $element['#type'] : FALSE; $checkbox = $type && $type === 'checkbox'; $radio = $type && $type === 'radio'; // Create an attributes array for the wrapping container. if (empty($element['#wrapper_attributes'])) { $element['#wrapper_attributes'] = array(); } $wrapper_attributes = &$element['#wrapper_attributes']; // This function is invoked as theme wrapper, but the rendered form element // may not necessarily have been processed by form_builder(). $element += array( '#title_display' => 'before', );
Posted on 2015-05-11 by admin |

How to setup Apache SSL (Self-signed Certificate) on Ubuntu 9.04

  1. Install openssl
    # sudo apt-get install openssl
  2. Create a serect key (e.g. server.key)
    # sudo openssl genrsa -out server.key 4096 (e.g. no password - do not use 2048 byte key)
    # sudo openssl genrsa -des3 -out server.key 4096 (do not use 2048 byte key)
  3. Alternative: Skip (invalidate) a password (e.g. server.key)
    # sudo  openssl genrsa -out server.key 4096
  4. Create a public key (e.g. server.csr)
    # sudo openssl req -new -key server.key -out server.csr
  5. Create a signed certificate(e.g. server.crt / Expiration is ten (10) years)
    # sudo openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
  6. Copy the keys to an appropriate directory (Note a permission to copy destination)
    # sudo cp server.crt /etc/ssl/certs/; sudo cp server.key /etc/ssl/private/
    1. Install openssl
      # sudo apt-get install openssl
    2. Create a serect key (e.g. server.key)
      # sudo openssl genrsa -out server.key 4096 (e.g. no password - do not use 2048 byte key)
      # sudo openssl genrsa -des3 -out server.key 4096 (do not use 2048 byte key)
    3. Alternative: Skip (invalidate) a password (e.g. server.key)
      # sudo  openssl genrsa -out server.key 4096
    4. Create a public key (e.g. server.csr)
      # sudo openssl req -new -key server.key -out server.csr
    5. Create a signed certificate(e.g. server.crt / Expiration is ten (10) years)
      # sudo openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
    6. Copy the keys to an appropriate directory (Note a permission to copy destination)
      # sudo cp server.crt /etc/ssl/certs/; sudo cp server.key /etc/ssl/private/

Ubuntu 9.04 で、Apache2 の SSL を有効にする(オレオレ証明の設定方法)。

手順としては次の通り。
  1. openssl をインストール。
    # sudo apt-get install openssl
  2. 秘密鍵を作る(仮に server.key としよう)。
    # sudo openssl genrsa -out server.key 4096 (パスワードなしの場合、2048 バイトのキーは弱すぎて証明書としてはもはや無効)
    # sudo openssl genrsa -des3 -out server.key 4096(パスワードありの場合、2048 バイトのキーは弱すぎて証明書としてはもはや無効)
  3. 公開鍵を作る(server.csr としよう)。
    # sudo openssl req -new -key server.key -out server.csr
  4. 署名付の証明書を作る(server.crt としよう。有効期間はオレオレなので 10年くらいでいいだろう^^;)。
    # sudo openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
  5. 手順としては次の通り。
    1. openssl をインストール。
      # sudo apt-get install openssl
    2. 秘密鍵を作る(仮に server.key としよう)。
      # sudo openssl genrsa -out server.key 4096 (パスワードなしの場合、2048 バイトのキーは弱すぎて証明書としてはもはや無効)
      # sudo openssl genrsa -des3 -out server.key 4096(パスワードありの場合、2048 バイトのキーは弱すぎて証明書としてはもはや無効)
    3. 公開鍵を作る(server.csr としよう)。
      # sudo openssl req -new -key server.key -out server.csr
    4. 署名付の証明書を作る(server.crt としよう。有効期間はオレオレなので 10年くらいでいいだろう^^;)。
      # sudo openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt

CentOS 5.3 で、yum が python 失敗する。

次のようなエラーでお嘆きのあなたは、
  --> Missing Dependency: /usr/lib64/python2.4 is needed by package libxml2-python-2.6.26-2.1.2.8.x86_64 (updates)
libxslt-python-1.1.17-2.el5_2.2.x86_64 from installed has depsolving problems
  --> Missing Dependency: /usr/lib64/python2.4 is needed by package libxslt-python-1.1.17-2.el5_2.2.x86_64 (installed)
gamin-python-0.1.7-8.el5.x86_64 from installed has depsolving problems
  --> Missing Dependency: /usr/lib64/python2.4 is needed by package gamin-python-0.1.7-8.el5.x86_64 (installed)
Error: Missing Dependency: /usr/lib64/python2.4 is needed by package libxslt-python-1.1.17-2.el5_2.2.x86_64 (installed)
Error: Missing Dependency: /usr/lib64/python2.4 is needed by package gamin-python-0.1.7-8.el5.x86_64 (installed)
Error: Missing Dependency: /usr/lib64/python2.4 is needed by package libxml2-python-2.6.26-2.1.2.8.x86_64 (updates)
yum clean metadata してメタデータをきれいにすれば解決!
次のようなエラーでお嘆きのあなたは、
  --> Missing Dependency: /usr/lib64/python2.4 is needed by package libxml2-python-2.6.26-2.1.2.8.x86_64 (updates)
libxslt-python-1.1.17-2.el5_2.2.x86_64 from installed has depsolving problems
  --> Missing Dependency: /usr/lib64/python2.4 is needed by package libxslt-python-1.1.17-2.el5_2.2.x86_64 (installed)
gamin-python-0.1.7-8.el5.x86_64 from installed has depsolving problems
  --> Missing Dependency: /usr/lib64/python2.4 is needed by package gamin-python-0.1.7-8.el5.x86_64 (installed)
Error: Missing Dependency: /usr/lib64/python2.4 is needed by package libxslt-python-1.1.17-2.el5_2.2.x86_64 (installed)
Error: Missing Dependency: /usr/lib64/python2.4 is needed by package gamin-python-0.1.7-8.el5.x86_64 (installed)
Error: Missing Dependency: /usr/lib64/python2.4 is needed by package libxml2-python-2.6.26-2.1.2.8.x86_64 (updates)
yum clean metadata してメタデータをきれいにすれば解決!