element box.
Hidden
The content is trimmed and the rest is invisible.
Scroll
The content is trimmed, but the browser displays a scroll bar to view other content.
Auto
If the content is trimmed, the browser displays a scroll bar to view other content.
Inherit
Specifies that the overflow attribute value should be inherited from the parent element.
QuickTabsThe outer block of the module usesoverflow: hiddenAttribute
When the
Example of drupal File Upload form
Copy codeThe Code is as follows: function upload_form (){
$ Form = array ();
// If this # attribute is not present, upload will fail on submit
$ Form ['# attributes'] ['enablesype '] = 'multipart/form-data ';
$ Form ['file _ upload'] = array (
'# Title' => t ('upload file '),
'# Type' => 'file ',
);
$ Form ['submit _ upload'] = array (
'# Type' => 'submit ',
'# Value' => 'submit'
);
Return $ form;
}
Function upload_s
After url_alter is enabled, two hooks are implemented: hook_url_inbound_alter and hook_url_outbound_alter. they are used to rewrite the URL and must be implemented by the third-party URL rewriting module. Drupal
The following is an example:
The code is as follows:
/*
* Convert the pseudo address to the original address (url_alter)
*/
Function example_url_inbound_alter ( $ path, $ original_path, $ path_language)
{
If (preg_match ('| ^ articl
As we all know, PHP cURL extensions can be used to simulate form submission. Drupal has the drupal_http_request function to execute an HTTP request. It can send a file via POST, but it is not as convenient as cURL. Here we will mainly explain how to Post a file to a remote server address in Drupal.Webpage Form The code is as follows:Copy code The preceding form contains the text box, password, check box, and file submission.Drupal cURL simulate
Views in Drupal provide many functions by default, and we usually use some simple functions.Here is a problem. We usually add a title field in Views to make a list, but the title attribute is not added by default. I just studied it, the discovery can also be achieved through configuration.This still requires us to be familiar with Views.1. Originally, we only had the title and date fields. Here we need to add an nid field.2. Click the Title field. Do
One of the new functions provided by Drupal 7 is the ability to use the Query Builder and Query Objects Query Builder to construct Query Objects without the need to write original SQL statements in the code, one is to improve code readability, and the other is to be compatible with all databases.Insert a single record The code is as follows: Copy code Db_insert ("table"
Drupal site can use Gmail mailbox to send mail to users, the implementation of similar functions have SMTP or Phpmailer module, I use the Phpmailer module, the following is the process of my configuration, posted for your reference.1. Download Phpmailer moduleHttp://drupal.org/project/phpmailer2, enable the Phpmailer module, in the "Site Settings" point "Phpmailer" settings, the page will be error "Class ' Phpmailer ' not found in .... Phpmailer.class
.
scroll
content will is trimmed, but the browser displays scroll bars to see the rest of the content.
auto
If the content is Trimmed, the browser displays scroll bars to see the rest of the content.
inherit
regulations The value of the overflow property should be inherited from the parent element.
QuickTabsThe outer block of the module uses overflow: hidden attributesWhen the inner element "
Label:The error message is as follows: pdoexception:sqlstate[42000]: Syntax error or Access violation:1071 Specified key was too long; Max key length is 3072 bytes:create TABLE {start_zero_order} (' ID ' int. unsigned not NULL auto_increment COMMENT ' The Ord ER id. ', ' username ' varchar ($) NOT null COMMENT ' xxx ', ' order ' varchar (4096) null DEFAULT null COMMENT ' xxx. ', PRIMARY KE Y (' id '), UNIQUE KEY ' username ' (' username '), INDEX ' order ' (' Order ')) ENGINE = InnoDB DEFAULT CH
Basic permission (permission)
Based on the experience gained from RBAC, you can consider those started with _ as permission permits, while others as roles. In this way, other objects such as people/groups and dynamic objects can use either of them
Action
One action (Operation, Action, action) indicates a parameterized unit of work that can be applied to a node.
The nature of an action is similar to that of a class. However, the implementation mechanism of action is more flexible. You can
$response->send ();is to call the header some variablesSetcookieEcho $contentAnd so on some operations$autoloader = Require_once ' autoload.php ';Gets the Load class object$kernel = new Drupalkernel (' prod ', $autoloader);Get Drupalkernel
Add a function to the template/sites/all/themes/liuzhiliang.com/template.php file
The code is as follows
Copy Code
/*** Mynodeprevnext* Article on an article next* $nid-Node ID* $type-node type*/function Mynodeprevnext ($
Release date:Updated on:
Affected Systems:Drupal Video moduleDescription:--------------------------------------------------------------------------------Bugtraq id: 57525 Drupal is an open-source content management platform. Drupal Video 7.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.