I believe that many developers have started exploring drupal8-download and install the beta version of drupal 8. Developers who haven't started to try drupal 8 can clearly tell us that we will have many new concepts to understand, understand, and use. When we try to write a dru
Drupal 8 -- custom permissions, drupal custom Permissions
In project development, I encountered such a requirement that the title field of the node cannot be edited by the edit content role. The title field is automatically generated when the content type is created. Permissions cannot be directly configured in the drupal8 background, so I need to customize a per
is installed by default. to select a version, add the parameter-select.After the installation is successful, download another varnish module.# Go to the drupal DirectoryDrush dl varnishInstall VarnishThe default CentOS is used as an example. because the Varnish version in the CentOS repository is earlier, you need to import a new repo. then, upgrade the yum software library.For more information, see this l
For details about how to create a module, see Drupal 7 module development and establishment.
If you want to support Chinese characters, the file format must be saved as UTF-8, no BOM
------------------------------
Hook_help provides help information for this module. We shoul
Drupal uses the. info file to save the basic data about theme and modules (metadata ).
Encoding: UTF-8 is recommended, that is, BOM (byte order mark) is not included ).
The following is an example of. info.
name = Really Neat Widgetdescription = Provides a really neat widget for your site's sidebar.core = 7.xpackage = Viewsdependencies[] = viewsdependencies[] = panelsfiles[] = tests/example.testconfigure =
Preparing the Environment First install a new Drupal, recommend the use of Drush installation, convenient and rapid. First build a database, remember the user and password. # # #进入mysqlMysql-uroot-pCREATE DATABASE ' mydb ' CHARACTER SET UTF8 COLLATE utf8_general_ci;GRANT all in ' mydb '. * to ' username ' @localhost identified by ' password ';### #退出mysql drush installation Drupal7: Drush DL drupal-7.x; #-
Python module knowledge 2: Time and date Calendar module Time, Datetime, Calendar, pythondatetime
1. time Module
Why did the time start in 1970? Because Linux was used in that year, the time is usually represented by the following methods:
Timestamp: the second after Janu
Original article: http://blog.sina.com.cn/s/blog_48a770da0100gam5.html
Rare and rare Chinese Drupal view detailed tutorial, transferred from http://www.cc.ntu.edu.tw/chinese/epaper/0009/20090620_9009.htm
Author: programming organization for Educational Research Groups at Tang xuanyuan university computer and network-based Education Center
In this article, we will introduce?The large functions and usage of arguments, relationships and sort
For details about how to create a module, see Drupal 7 module development and establishment.
If you want to support Chinese characters, the file format must be saved as UTF-8, no BOM
------------------------------
To create a separate table for your module, you need to useHo
Related article: Drupal module explain-authcache caching principle detailed tutorial
This article is about how to implement the personalized content of a cached page if you modify Authcache's core code.Advanced application authcache-Dynamic loading content tutorial "/>Common cache, more or less to be personalized processing, such as user name display, dynamic loading of user information, user friends and s
The functions of the Calendar module are calendar-related, provide some ways to manipulate dates, and generate calendars.There are three main categories available in the Calendar module:First, calendar. Calendar (firstweekday=0)Th
) Sunday is the beginning of the week#%w Week (0-6), Sunday for the beginning of the week#%W Week of the Year (00-53) Monday is the beginning of the week#%x Local corresponding date representation#%x Local corresponding time representation#%Z The name of the current time zone#percent% of the number itself Print(D.strftime ("%y-%m-%d%p"))#2017-08-06 AM A string#Show English formatPrint(D.ctime ())#Sun 6 11:52:30#Show Calendar (year, Week of the yea
seconds (00-59)
%a Local Simplified Week name
%A Local Full week name
%b a locally simplified month name
%B Local Full month name
%c Local corresponding date representation and time representation
%j Day of the Year (001-366)
%p the equivalent of a local a.m. or p.m.
%u weeks of the year (00-53) Sunday is the beginning of the week
%w Week (0-6), Sunday for the beginning of the week
%W Week of the Year (00-53) Monday is the beginning of the week
%x Loc
(Tupletime)In contrast to Time.gmtime: accepts a time tuple form, returning the time suffix (the number of floating-point seconds elapsed after the 1970 era).
12
Calendar.weekday (Year,month,day)Returns the date code for the given date. 0 (Monday) to 6 (Sunday). The month is 1 (January) to 12 (December).
simple implementation of a specified date calendarCode Implementation# Import Calendar
Create a new module and copy the following two functions. GLGETNL (), STRNL ()
Using in Queries: Select Glgetnl (born) as Nlborn from Empolyee where GLGETNL (born) > "05012" Order by Glgetnl (born)
The above query returns a list of more than May 12 employees for the lunar calendar, sorted by lunar birthday.
(Disclaimer: These two functions are not written from scratch, are modified on the Internet do not kn
in the blanks only, and vice versa, write the date($tabidx Assembled dateif ($monthnow if ($dayecho $ymd = $yearnow. $m. $d;The date information after assembling is compared with the database. Database date format 20150611I'm using the CI framework here.$sql = "Select SignDate from Tb_signinfo where signdate= '". $ymd. "'";$result = $this->db->query ($sql)->num_rows;if ($result! = 0) {$TODAYBG = "class=" Current2 "";}Else{$TODAYBG = "";}Highlighted here today's date with the above check-in disp
:17.170393In [137]: Print A + Datetime.timedelta (Days=1)2014-11-18 20:57:17.170393In [134]: Print a + Datetime.timedelta (hours=-1)2014-11-17 19:57:17.170393In [135]: Print a + Datetime.timedelta (minutes=-1)2014-11-17 20:56:17.170393In [136]: Print A + Datetime.timedelta (seconds=-1)2014-11-17 20:57:16.1703935, two Datetime.datetime object time difference calculationCalculate the difference between seconds or daysin [+]: a = Datetime.datetime.now ()In [181]: B = A + Datetime.timedelta (days=-2
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.