What's New in Drupal 7 - Code4Lib [PDF]

2 downloads 98 Views 4MB Size Report
Page 10 ... IA along the top. User specific admin ... Enables designers to create CSS-only themes without touching PHP. •! .... but potenPally web services, etc.) •!
!"#$%&'()*' +,'-./0#1'2' 3#.4'56.76,' 8")'3")..4'9+11'36:0#,4' ";0"+11>6?>6:''

!"6':#@)&'-./0#1' •! A.6B)>$'1)#7' –! -.+)&'C/4$#).$'

•! C.#,>"':#+,$#+,).' –! D,E)1#'C4.6,'F-./0#1'2G' –! 5HI6.'96B$&4'F-./0#1'JG' –! ()+11'-./::'F-./0#1'KG'

•! 36,$.+I/$6.&'

Committers

Changes for Users

-2LM'

http://www.d7ux.org/

()*'N,O6.:#P6,'D.>"+$)>$/.)' •! ()*'ND'&)0#.#$)&'#7:+,+&$.#PQ)'$#&@&' +,$6'R>6,$)S$&T6,$),$?' –! N%:'I/+17+,E'6/$'&+$)'&$./>$/.)?' –! N%:'>"#,E+,E':4'&+$)%&'#00)#.#,>)?' –! N%:':#,#E+,E'$")'0)601)'*"6'>6:)'$6':4' &+$)?' –! N%:'>6,UE/.+,E':67/1)&'#,7'&)V,E&?'

Drupal 6

-)O#/1$'O.6,$'0#E)'

Drupal 7

9)10'

L&).&'>#,'>#,>)1'6*,'#>>6/,$&'

W7+$'+,'01#>)'

D7:+,'8"):)#1'$#I&' Drupal 6

Drupal 7

\67/1)'&>.)),'

A).:+&&+6,'&>.)),'

-)O#/1$=\+,+:#1'A.6U1)'

8+:)]6,)'#,7'36/,$.4'&/006.$'

New Minimum Requirements

5.0 5.2 8.3

Changes for site builders

\+S'#,7'\#$>"'A/I1+>'#,7'A.+Q#$)'U1)&'

N,$).,#P6,#1+]#P6,' •! ()*'$.#,&1#P6,'+,$).O#>)' •! X)#.>"':67/1)'&/006.$&'1#,E/#E)^ #*#.)'&)#.>")&' •! N,7+Q+7/#1'U)17&'>#,'I)':#.@)7' $.#,&1#$#I1)=/,$.#,&1#$#I1)' •! X/006.$'O6.':)&&#E)'>6,$)S$&'F:&E>$S$G' $6':#@)'$.#,&1#P6,'6O'&"6.$'*6.7&'1+@)' R[+)*T':/>"')#&+).?'

()*'$.#,&1#P6,'+,$).O#>)'

(#PQ)'+:#E)'"#,71+,E'

X)>/.+$4' •! A.6:0$)7'O6.')^:#+1',6PU>#P6,&'6O' &)>/.+$4'/07#$)&'/06,'+,&$#11#P6,?' •! A9A'U1$).':67/1)',6*'E16I#1'R@+11^&*+$>"T' O6.'R),$).'&6:)'A9A'").)T'O/,>P6,#1+$4?' •! 3.6,?0"0'.)_/+.)&'@)4'+,'L`a'$6'I)'./,?' •! ()*'0).:+&&+6,'O6.'./,,+,E'&+$)'/07#$)&?'' •! a+:+$'16E+,'#;):0$&b'I);).'c667'>6,$.61?' •! X$.6,E).b'01/EE#I1)'0#&&*6.7'"#&"+,E' #1E6.+$":?'

d+)17'LN'F,))'33eG'

d+)17'840)&'+,'36.)' •! •! •! •! •! •! •! •!

C661)#,' -)>+:#1=d16#$=N,$)E).' d+1)' N:#E)' a+&$' 8)S$=8)S$#.)#' 8#S6,6:4'$).:' (67)'C674'F16,E'$)S$'#,7'&/::#.4G'

d+)17&'#0014'$6$&'O.6:'>6,$.+I/$)7':67/1)&'

L07#$)'\#,#E).'

Install and update modules and themes from drupal.org!

Changes for designers and front-end developers

Z17'$#I1)^I#&)7'$"):)&' .):6Q)7'O.6:'>6.)'

\#,4'0#E)')1):),$&'#&&+E,#I1)'

`)^Q#:0)7'f?$01?0"0'

`)^Q#:0)7'f?$01?0"0'

`)^Q#:0)7'f?$01?0"0'

•! •! •! •! •!

Re-engineered XHTML structure to facilitate CSS-only design. Standard, semantic class/ID names (.section, #navigation, etc.) Improved consistency throughout Enables designers to create CSS-only themes without touching PHP No more box.tpl.php

X$#.@6,$),$'E6)&':)#,&'I)+,E' .)&06,&+I1)'O6.'f#11f'0#.$&'6O'>6,$),$' •! X)>/.+$4'#Q).&)' •! WQ),'>6::),$&'#.)'+,'$"+&':+S'

5.#,/1#.'$"):+,E'6O'>6,$),$' Drupal 7

...

•! g>6,$),$'+&',6*'#,'#..#4'6O'0#E)' 0.60).P)&'$"#$'@))0&'$.#>@'6O'*"#$%&' I)),'0.+,$)7'&6'O#.?' •! X)1)>PQ)14'"+7)'0#.$&'/,P1'46/%.)'.)#74' $6'0.+,$'$"):'*").)'hZL'*#,$?'

`-d#' Default mapping for nodes:

i#Q#X>.+0$'+:0.6Q):),$&' •! Bj/).4'k?lb'Bj/).4'd6.:&'m?mb'Bj/).4'LN'k?2' •! 7./0#1n#77n1+I.#.4FG'O6.'#77+,E'.)1#$)7'B&= >&&'U1)&' •! ()*'DiDM'O.#:)*6.@'FO.6:'>8661&G'+,'>6.)' •! 7./0#1n#77nB&=>&&FG'+:0.6Q)7' •! L&)'Bj/).4'#16,E&+7)'6$").'iX'O.#:)*6.@&'' •! d6.:'DAN'7)0),7),>+)&'F&"6*'I6S'C'*"),' I6S'D'+&'>")>@)7G'

Changes for coders

X+:01)8)&$'

$)&P,E?7./0#1?6.E' •! RA#$>"'F>67)',))7&'.)Q+)*GT'#,7'RA#$>"' F.)Q+)*)7'Y'$)&$)7'I4'>6::/,+$4GT' &$#$/&)&'>#,',6*'I)'$./&$)7?' •! `)Q+)*).&',6'16,E).'E)V,E'>#.0#1'$/,,)1' >1+>@+,E'$".6/E"'#11'$")'I#&+>'&$/o?' •! `/,,+,E'$")'O/11'$)&$'&/+$)'$#@)&'#'16,E' P:)p'1)$'#'>6:0/$).'76'+$'O6.'46/q' •! (6PU)&'#/$"6.'*+$"+,'mr'"6/.&'+O'0#$>"' ,6'16,E).'#001+)&'6.'I.)#@&'$)&$&?'

Database

The next genration

8")'*"6'+,'$")'*"#$',6*s' •! -#$#I#&)'#I&$.#>P6,'1#4).'/P1+]+,E'A9A%&' -#$#'ZIB)>$&'FA-ZG' •! 8")6.)P>#1'&/006.$'O6.'#,4'A9A' &/006.$)7'7#$#I#&)' •! :4&_1b'&_1+$)b'#,7'0E&_1'7.+Q).&'+,>1/7)7' •! X/006.$'O6.':#&$).=&1#Q)'.)01+>#P6,b' $.#,&#>P6,&b':/1P^+,&).$'_/).+)&b'7)1#4)7' +,&).$&b'#,7'6$").'O)#$/.)&'

X$#P>'X)1)>$'j/).+)&' Drupal 6:

$result = db_query("SELECT nid, title FROM {node} ! WHERE type = '%s' AND nid = %d", array($type, $nid));" $node = db_fetch_object($result);" Drupal 7:

$node = db_query('SELECT nid, title FROM {node} ! WHERE type = :type AND nid = :nid', array(':type' => $type, ':nid' => $nid))->fetchObject();"

-4,#:+>'X)1)>$'j/).+)&' Drupal 6: $result = pager_query(db_rewrite_sql('SELECT n.nid FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), variable_get('default_nodes_main', 10));"

Drupal 7: $select = db_select('node', 'n')" ->fields('n', array('nid'))" ->condition('promote', 1)" ->condition('status', 1)" ->orderBy('sticky', 'DESC')" ->orderBy('created', 'DESC')" ->extend('PagerDefault')" ->limit(variable_get('default_nodes_main', 10))" ->addTag('node_access');"

Drupal 6:

"66@n_/).4n#1$).FG'

function hook_db_rewrite_sql($query, $primary_table, $primary_field, $args) {! switch ($primary_field) {! case 'nid':! $return = array();! if ($primary_table != 'n') {! $return['join'] = "LEFT JOIN {node} n ON $primary_table.nid = n.nid";! }! $return['where'] = 'created >' . time() - 3600;! return $return;! break;! }!

Drupal 7: function hook_query_alter(&$query) {! if ($query->hasTag(‘node_access’)) {! $query->condition(‘created’, time() - 3600, ‘>’);! }! }!

http://flickr.com/photos/bunny/

d+1)'X4&$):'

d+1)'DAN'+:0.6Q):),$&' •! d+1)&'#.)',6*'U.&$^>1#&&'6IB)>$&' •! "66@nU1)n16#7FGb'"66@nU1)n&#Q)FGb' "66@nU1)n:6Q)FGb')$>?' •! d+1)&'#.)':#,#E)7'#/$6:#P>#114p',6' ,))7'$6'7)#1'*+$"'tU1)&u'$#I1)'46/.&)1O' •! "66@nU1)n/.1n#1$).FG'O6.'3-('&/006.$'

X$.)#:'*.#00).'&/006.$' •! `#$").'$"#,'.)O).),>+,E'U1)&'I4'0#$"b'46/' ,6*'.)O).),>)'$"):'I4'L`N"):#$6.4'*+$"6/$'#'7#$#I#&)'/07#$)?' •! 0/I1+>#,'#1&6'>.)#$)' &l?'

APIs

DAN&' •! •! •! •! •!

`61)&=A).:+&&+6,&'DAN' d+1$).=d6.:#$'DAN' 3),$.#1+])7'&$#P>'>#>"+,E':)>"#,+&:' a6>@+,E'O.#:)*6.@' i6I'_/)/)'

d+)17'DAN' •! (6$',67)^&0)>+U>' •! -)>1#.)'#,4'),P$4'+,'-./0#1'#&'RU)17#I1)T' •! X*#00#I1)'&$6.#E)'I#>@^),7&'F>/..),$14b'Xja' I/$'06$),P#114'*)I'&).Q+>)&b')$>?G' •! X/006.$&'$.#,&1#$#I1)'>6,$),$?'

N:#E)'DAN' •! N:#E)'$661@+$&',6*'+:01):),$)7'#&' :67/1)&b'.#$").'$"#,'?+,>'U1)&'$"#$'/&).&' ,))7'$6'>604'6Q).?' •! X/006.$&'+:#E)':#,+0/1#P6,')o)>$&.60b'.)&+])b'.6$#$)???' •! 3#,'>6:I+,)'$")&)'+,$6'R+:#E)'&$41)&T'$"#$' >#,'I)'#001+)7'$6'#,4'+:#E)'F/&).'0+>$/.)&b' U1)'/016#7&???G'

`)E+&$.4' •! D/$6^0#.&)&'#,7'>#>")&'1+&$'6O'#11' O/,>P6,&b'>1#&&)&b'#,7'+,$).O#>)&'+,'#11' U1)&' •! d#>+1+$#$)&'O#&$).'"66@'>#11&p'6,14'1660' $".6/E"':67/1)&'$"#$'+:01):),$'#' "66@'

31#&&'.)E+&$.4' •! D/$6^0#.&)&'#,7'>#>")&'1+&$'6O'#11'>1#&&)&''#,7' +,$).O#>)&'+,'#11'U1)&' •! D116*&'46/'$6'76@'.)_/+.):),$&' –! -6*,16#7'-./0#1'2' –! 3.)#$)'7#$#I#&)' –! N,&$#11' –! D77'$"):)&'Y':67/1)&'O.6:'+,$).O#>)'

•! W#&+).'$6'I/+17'6/$'

–! N:0.6Q)7'#7:+,+&$.#P6,' –! 8"):).'O.+),714'

•! W#&+).'$6'7)Q)160'

–! \6.)'>6,&+&$),$'#,7'c)S+I1)'

•! W#&+).'$6'+,$)E.#$)' –! `-d#'

8"#,@&'$6T' D,E)1#'R*)I>"+>@T'C4.6,' O6.':#,4'6O'$")'&1+7)&q'

3#.4'56.76,' 8")'3")..4'9+11'36:0#,4' a6&'D,E)1)&b'3#1+O6.,+#' ";0"+11>6?>6:' >E6.76,v>"+11>6?>6:' FlkwG'lx2^mxxx'