php:drupal
Differences
This shows you the differences between two versions of the page.
php:drupal [2015/05/16 14:09] – [custom theme node base on content type] admin | php:drupal [2022/10/29 16:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1469: | Line 1469: | ||
</ | </ | ||
===== Multisite Configuration ===== | ===== Multisite Configuration ===== | ||
- | === Steps to create new site === | + | ==== Understand about multisite in drupal ==== |
+ | refer: | ||
+ | * https:// | ||
+ | If you are running **more than one Drupal site**, you can simplify management and upgrading of your sites by using the **multi-site feature**. Multi-site allows you to share a single Drupal installation including: | ||
+ | * core code | ||
+ | * contributed modules | ||
+ | * and themes | ||
+ | This is particularly useful for managing the code since **each upgrade only needs to be done once**. Each site will have: | ||
+ | * Its own database | ||
+ | * and Its own configuration settings | ||
+ | so each site will have its own content, settings, enabled modules, and enabled theme. However, the sites are sharing a code base and web document root, so there may be security concerns with multiple administrators | ||
+ | ==== Steps to create new site ==== | ||
To create a new site using a shared Drupal code base you must complete the following steps: | To create a new site using a shared Drupal code base you must complete the following steps: | ||
* **Create a new database for the site** (if there is already an existing database you can also use this by defining a prefix in the installation procedure). | * **Create a new database for the site** (if there is already an existing database you can also use this by defining a prefix in the installation procedure). | ||
Line 1477: | Line 1488: | ||
* Make symbolic links if you are using a subdirectory such as example.com/ | * Make symbolic links if you are using a subdirectory such as example.com/ | ||
* In a Web browser, navigate to the URL of the new site and continue with the standard Drupal installation procedure (if you get an infinite redirection loop, check if the file install.php exists the document root). | * In a Web browser, navigate to the URL of the new site and continue with the standard Drupal installation procedure (if you get an infinite redirection loop, check if the file install.php exists the document root). | ||
- | === Option: Edit directory alias for site in sites/ | + | ==== Option: Edit directory alias for site in sites/ |
If you want using www1.babies.vn and www2.babies.vn to access the configuration of sites/ | If you want using www1.babies.vn and www2.babies.vn to access the configuration of sites/ | ||
$sites[' | $sites[' | ||
Line 1492: | Line 1503: | ||
php scripts/ | php scripts/ | ||
</ | </ | ||
- | ==== change | + | ==== Change |
- Step1: Generate password hash< | - Step1: Generate password hash< | ||
php scripts/ | php scripts/ | ||
Line 1513: | Line 1524: | ||
php ./ | php ./ | ||
</ | </ | ||
- | ===== Drupal | + | ===== Drupal |
- | ==== fix Errors | + | ==== Drupal editor |
- | - PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: Edit my.ini< | + | Editor with eclipse: [[php: |
- | [mysqld] | + | |
- | max_allowed_packet = 16M | + | Editor with notepad++: |
+ | - Step1: Go to **Settings -> Style Configurator** | ||
+ | - Step2: Then select Language **PHP** to edit **User ext** to values below:< | ||
+ | module install inc engine | ||
</ | </ | ||
+ | {{: | ||
+ | |||
==== Update default theme in database ==== | ==== Update default theme in database ==== | ||
<code sql> | <code sql> | ||
Line 1551: | Line 1567: | ||
|page|Basic page|node_content|node| | |page|Basic page|node_content|node| | ||
=== create custom field Term Taxonomy(Category) for article content type === | === create custom field Term Taxonomy(Category) for article content type === | ||
- | * Required: Install module taxonomy | + | Required: Install module |
- | * Create custom field Term Taxonomy for article content type | + | |
+ | Step1: Go to Structure -> Taxonomy to add new **Vocabulary** name article_tags with list terms: Xã Hội, Kinh Tế ...\\ | ||
+ | Step2: | ||
{{: | {{: | ||
=> from label **tags** will auto create below information: | => from label **tags** will auto create below information: | ||
* machine name **field_tags** | * machine name **field_tags** | ||
* talbe **field_data_field_tags** | * talbe **field_data_field_tags** | ||
+ | Next you click **Term reference** and select Vocabulary with name **article_tags** for contenty Article | ||
Below are content of tables from database: | Below are content of tables from database: | ||
* table **field_data_field_tags** | * table **field_data_field_tags** | ||
Line 1598: | Line 1617: | ||
* Click to Check **Use the administration theme when editing or creating content** | * Click to Check **Use the administration theme when editing or creating content** | ||
- | ==== change basic informations(site information(site name, email, | + | ==== change basic informations(site name, email, |
All basic Informations will be updated in **Configuration menu** | All basic Informations will be updated in **Configuration menu** | ||
- change site information(site name, e-mail address, slogan, default front page(homepage), | - change site information(site name, e-mail address, slogan, default front page(homepage), | ||
Line 1643: | Line 1662: | ||
- field--field-name.tpl.php | - field--field-name.tpl.php | ||
- field--field-type.tpl.php | - field--field-type.tpl.php | ||
- | ===== drupal | + | ===== Drupal |
==== drupal custom fields ==== | ==== drupal custom fields ==== | ||
=== Field (core) and Field UI (core) === | === Field (core) and Field UI (core) === | ||
Line 1696: | Line 1715: | ||
* Clear cache in **configuration-> | * Clear cache in **configuration-> | ||
* In view, you go to **Advanced-> | * In view, you go to **Advanced-> | ||
- | ==== page manager and panels ==== | + | ==== Page manager and panels ==== |
The Page manager and Panels modules used to be one and the same project, originally created as an **alternative to Drupal' | The Page manager and Panels modules used to be one and the same project, originally created as an **alternative to Drupal' | ||
* **Page manager** is a tool for **defining new, arbitrary paths** on your Drupal site, and configuring how that page should look and work. It is possible not only to define new paths, but also to **override some of the paths defined by other modules**. One important part of the Page manager functionality is to **collect and send contexts, contextual information that may affect the page**. | * **Page manager** is a tool for **defining new, arbitrary paths** on your Drupal site, and configuring how that page should look and work. It is possible not only to define new paths, but also to **override some of the paths defined by other modules**. One important part of the Page manager functionality is to **collect and send contexts, contextual information that may affect the page**. | ||
* **Panels** is a tool for **splitting the main content on a Drupal site into several regions** and **defining what content each region should contain**. | * **Panels** is a tool for **splitting the main content on a Drupal site into several regions** and **defining what content each region should contain**. | ||
- | ==== features | + | ==== Features |
We use features module to export and import features of drupal. Below are step by step to action: | We use features module to export and import features of drupal. Below are step by step to action: | ||
- Step1 **Export**: Go to structure-> | - Step1 **Export**: Go to structure-> |
php/drupal.1431785359.txt.gz · Last modified: 2022/10/29 16:15 (external edit)