documentation: http://drupal.org/handbooks glossary: http://drupal.org/glossary why drupal does not use classes: http://drupal.org/node/547518 install: http://drupal.org/documentation/install importing language takes too much time change max_execution_time in php.ini need to wait quite some time restart: remove all tables from db and go to install.php multi-site: http://drupal.org/node/251040 group: http://groups.drupal.org/multisite multisite manager module: http://drupal.org/project/multisite_manager doesn't work in drupal 7.x! video: http://gotdrupal.com/videos/multisites-vs-multiple-sites use virtual host document root: is the same for all sites! new site manually: create a new db mkdir sites/sitename sitename can be example.com, sub.example.com, example.com.subdir, 8080.example.com subdirs: ln -s drupaldir subdir local: sitename is localhost.subdir cp sites/default/default.settings.php sites/newsite/settings.php adjust rights site-specific modules and themes: create themes and modules dirs in site dir admin login: /user (?q=user) philosophy/basics: http://drupal.org/documentation/understand all is nodes every node has exactly one path all commentable (2nd class citizens) has a content type content types: core: article basic page blog entry book page comment (comment) forum poll add: administer > structure > content types structure: menus, views, blocks flow: template user permissions admin/people/permissions blocks & menus modules data (nodes etc) admin: http://drupal.org/getting-started/7/admin user 1: give it only to a developer dashboard overlay: overlay is a really cool thing shortcuts can be put off line! registration: disallow via config/people/accounts not in the rights backup: modules: http://drupal.org/node/417192 backup and migrate module: http://drupal.org/project/backup_migrate backup the db, the core files, the non-core files backup scripts: backup: http://drupal.org/node/59373 restore: http://drupal.org/node/59377 multisite: http://drupal.org/node/310948 upgrade/update core: minor versions: http://drupal.org/node/1223018 UPGRADE.txt remove all files except 'sites' and custom rm -r !(sites) rm -r !(test|backup|sites|favicon.ico) yes, modules are preserved anyway, somehow unzip new version /update.php if necessary: in settings.php $update_free_access = TRUE; .htaccess and robots.txt will need to be rechanged afterwards favicon.ico (if you don't use favicon module) check permissions try to restore all the core hacks :) migration/local/remote/go live: http://drupal.org/node/776864 maybe there's a module for this? document all the php/mysql/apache installation differences server checklist: http://drupal.org/node/333675 old: document used modules: http://drupal.org/project/sitedoc off line, update turn off clean urls: admin/config/search/clean-urls clear cache tables, export db upload drupal code, files, sql data modify settings.php, .htaccess log on, change site information, adjust modules check status report, adjust performance parameters set on line set up cron job: http://drupal.org/cron is configurable via backend set the dns security: http://drupal.org/security/secure-configuration structure: http://drupal.org/documentation/structure node reference/content reference fields/user reference fields: need references module : http://drupal.org/project/references backreferences/back reference: corresponding node reference: http://drupal.org/project/cnr book module: for structured documents comments: can add fields for a content type menu: collections of links for navigation modify via admin/structure/menu add to page via admin/structure/block can add dropdown menus: http://drupal.org/node/206653 modules: http://drupal.org/node/627128 content type display/display modes/display type/content type view modes/node view modes/custom view mode: default: full, teaser custom display/add more: http://mearra.com/blogs/juha-niemi/drupal-7-custom-node-view-modes hook_entity_alter: function niki_entity_info_alter(&$entity_info) { $entity_info['node']['view modes']['integrated'] = array( 'label' => t('Integrated full'), 'custom settings' => TRUE, ); } in templates check $view_mode workarounds: http://stackoverflow.com/questions/2248592/add-another-node-display-like-teaser-full-node-to-drupal use preprocessing use the given variables (see [[#template variables]]) views: module: http://drupal.org/project/views ctools: http://drupal.org/project/ctools help: admin/advanced_help/views concepts: fields, relationships, sort criteria, filters displays: page display block display header, footer, empty text arguments/contextual filters will be accessible via $view->args insert views programmatically/include views in code: http://drupal.org/node/48816 $display = views_get_view(name)->execute_display(display_id, args); print $display; sometimes: print $display['subject']; print $display['content']; alter view sql query/custom sql for views: http://drupal.org/node/409808 hook_views_pre_execute(&$view) $view->build_info['query'] it's an object, alter with [[#orm]] $view->build_info['query_args']; modules: http://drupal.org/node/264141 check gallery/slideshow: the problem (my post): http://drupal.org/node/1248314 my choice: colorbox module field slideshow: http://drupal.org/project/field_slideshow colorbox module: http://drupal.org/project/colorbox very good tutorial: http://vimeo.com/19122850 http://vimeo.com/19386122 http://vimeo.com/26411524 uses cool style for field slideshow views slideshow module: http://drupal.org/project/views_slideshow config/media/image_styles galleriffic: http://drupal.org/node/758724 creating a view from galleriffic template produces a php error rotating banner: http://drupal.org/project/rotating_banner slideshow: http://www.bentedder.com/2011/05/create-an-easy-jquery-slideshow-in-drupal-7/ media gallery: http://drupal.org/project/media_gallery display block: http://drupal.org/project/ddblock galleria: http://drupal.org/project/galleria tips: http://drupal.org/node/431846 entity views attachment: http://drupal.org/project/eva blocks: admin/structure/blocks boxes of contents that can be displayed in regions regions: depend on theme throttle module: hide blocks during high server loads php snippet for visibility: http://drupal.org/node/60317 links/related content: modules: http://drupal.org/node/645794 users: profiles can be extended: http://drupal.org/documentation/modules/profile taxonomy: admin/user/user_terms mobile: http://drupal.org/node/646294 panels: http://drupal.org/node/627126 languages: http://drupal.org/node/324602 date: http://drupal.org/project/date build: http://drupal.org/documentation/build use test sites drupal folder: can be moved without problems remote: put in a subfolder modify sites/default/settings.php $base_url to link to root redirect from root: RewriteEngine on RewriteRule (.*) drupa.l/$1 [L] actions: http://drupal.org/node/206811 workflows/revisioning: http://drupal.org/node/417694 commerce/ads: http://drupal.org/node/206719 other sites/systems/data: http://drupal.org/node/627270 content display: http://drupal.org/node/206776 content: http://drupal.org/node/206786 faq content recommendations: http://drupal.org/node/1207628 dates/events: http://drupal.org/node/627222 distributions/installation profiles: http://drupal.org/documentation/build/distributions documentation tools: http://drupal.org/node/779268 email/messagging: mask email addresses: spamspan module: http://drupal.org/project/spamspan forms geographic information input formats media and files file module: http://drupal.org/documentation/modules/file images: gallery module: does not work in 7.x image field: part of core insert module: http://drupal.org/project/insert image in the node body text admin/config/content/formats/filtered_html and full_html add convert media tags into markup in filtered_html allow doesn't really display them correctly watermark: imagecache actions imagecache can't change the original private files/protect original images: http://drupal.org/documentation/modules/file create private filesystem change field config content access module: http://drupal.org/project/content_access imagecache actions module: http://drupal.org/project/imagecache_actions search search engine optimization site building social networking/collaboration user-generated content utility howtos: to check site recipes: to check home page: http://www.apaddedcell.com/custom-home-page-drupal-7-views default: blog style teaser listing php page snippets: http://drupal.org/node/23220 activate php filter module theme/theming: http://drupal.org/documentation/theme contributed themes: http://drupal.org/project/themes http://themegarden.org theming videos: http://drupal.org/node/136502 settings: admin/appearance/settings/themename advanced: http://drupal.org/node/177868 theme folder: http://drupal.org/node/171194 location: sites/all/themes/example contains: example.info defines block regions defines styles is cached: need to clear the cache on change comments: ; Comment values: key = value or "value" name = The theme name description = The description of the theme [screenshot = screenshot.png] core = 7.x engine = phptemplate base theme = parent in subthemes regions: regions[identifier] = Region name default 7.x: regions[header] = Header regions[highlighted] = Highlighted regions[help] = Help regions[content] = Content mandatory in all themes regions[sidebar_first] = Left sidebar regions[sidebar_second] = Right sidebar regions[footer] = Footer manually add block into a region: drupal_set_content(regionname, blockstring) inside page.tpl.php: check if region is occupied: $page[regionname] display a region/render a region: print render($page[regionname]) find content type of node: node_type_get_type($node)->type features/theme settings: can be toggled on and off on config page default 7.x: features[] = logo features[] = name features[] = slogan features[] = node_user_picture features[] = comment_user_picture features[] = favicon features[] = main_menu features[] = secondary_menu stylesheets: stylesheets[all][] = style.css all, screen, projection, print via the api: drupal_add_css, drupal_get_css browser-specific: http://drupal.org/node/744328 scripts: scripts[] = myscript.js add javascript: http://drupal.org/node/171213 [php = 5.2] default: DRUPAL_MINIMUM_PHP style.css html.tpl.php page.tpl.php region.tpl.php block.tpl.php node.tpl.php comment-wrapper.php comment.tpl.php template.php for preprocessors custom functions overriding theme functions must start with name functions: hooks: page, node, comment, block attributes: (&$variables) template_preprocess[_hook] modulename_preprocess[_hook] enginename_preprocess[_hook] themename_preprocess[_hook] also drop_preprocess(&$variables, $hook) performance: http://wimleers.com/article/improving-drupals-page-loading-performance theme cache/theme registry: clear in admin/config/development/performance or visit admin/appearance rebuild automatically: checkbox in admin/appearance/settings/themename theming webform: http://drupal.org/node/1157306 css classes: .menu .block .links lists of links .node wrapper div around any node including title .node-title .content body of a node .terms taxonomy terms, also .links and .inline .inline ul items into horizontal line .feed-icon .clearfix right to left (rtl) languages: http://drupal.org/node/222782 overriding module html: have to look for the themable output in the module directory override tpl.php: copy it to theme dir override preprocess function: and copy the function to your tpl.php change the function name: theme_xxx to mytheme_xxx modify the copied code refresh theme cache override order: core, modules, theme engine, theme customize login/register/password: http://drupal.org/node/350634 core blocks: block-forum-active block-profile-author-information block-book-navigation block-locale-language-switcher plock-poll-recent block-system-navigation block-forum-new block-statistics-popular block-system-powered-by block-blog-recent block-comment-recent block-search-form block-node-syndicate block-user-login block-user-new block-user-online menu theming: http://drupal.org/node/988842 main menu: is integrated in layout, no need to add it as block custom entities: http://drupal.org/node/1238606 theming modules: developer: http://drupal.org/project/devel_themer parts of pages show functions/templates that outputted it color module: http://drupal.org/node/108459 allows admin to change the color scheme colors: base color, link color, top header, bottom header, text color color theme subfolder base.png should be a layered file color.inc makes color picker appear on theme's settings a partial php file preview.css preview.png live css, custom node template, formatted title, sections, signwriter, skinr, typeface documentation, noie6, recommended target browser, create screenshots scaffold: http://drupal.org/node/864912 looks cool! theme editor: http://drupal.org/project/theme_editor admin/theme_editor semantics: http://drupal.org/node/44072 starter themes: http://drupal.org/node/323993 zen: http://drupal.org/project/zen docs: http://drupal.org/node/193318 create a subtheme: http://drupal.org/node/1010576 layout: http://drupal.org/node/201428 main { content, navbar, sidebar-left, sidebar-right } the order of the elements is for search engines and accessibility the elements are reordered visually with negative right margins best practices: http://drupal.org/node/341707, http://drupal.org/node/37156 use test site, write secure code, deploy by role switchtheme module: http://drupal.org/project/switchtheme only certain roles can switch theme conventions: http://drupal.org/node/1965 2 spaces per indent distinguish between html and php indentation prefer php in html and not the opposite separate logic from presentation always put semicolon accessibility: http://drupal.org/node/464472 try on different browsers validate howtos: http://drupal.org/node/22803 snippets: http://drupal.org/node/45471 core themes: bartik, seven, stark, garland breadcrumbs: remove: need to do in page.tpl.php background images: url relative to css sheet favicon module: http://drupal.org/project/favicon doesn't really work for me (development version) develop: http://drupal.org/documentation/develop environment: test site: is recreated as needed as a copy of the production site how I do it: with multi-sites I just copy the database, keep the rest, do my tests, redo on production site how they explain it: http://drupal.org/creating-drupal-test-sites needed: shell access, two mysql databases create test site: copy files and db edit settings.php base_url, db_url, site_name perform tests go live: redo actions on production or copy the test site into production remove the test site local mail: http://drupal.org/node/201981 synch: http://drupal.org/node/120617 devel modules: http://drupal.org/node/206773 vim config: http://drupal.org/node/29325 create .vimrc-drupal alias vid="vim -u ~/.vimrc-drupal" drupal for firebug: http://drupal.org/project/drupalforfirebug custom module/module development: http://drupal.org/developing/modules module name must be unique also among themes sites/all/modules/modulename modulename.module no .php extension start with use hooks: modulename_functionname() hooks are cached, empty it modulename.info name = Module name description = description core = 7.x files[] = example.test dependencies[] = modulename package = grouping string comments: doxygen /** * @file * File description */ show errors: http://drupal.org/node/1056468 settings.php: error_reporting(-1); $conf['error_level'] = 2; ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); api: http://drupal.org/developing/api link: l(text, alias) automatically finds unique id simpletest: http://drupal.org/simpletest drupal's testing framework standards: http://drupal.org/node/360052, http://drupal.org/ui-standards installation profiles: http://drupal.org/node/159730 database/sql/mysql: http://drupal.org/node/559302 database api/orm: http://drupal.org/node/310069 dynamic queries: http://drupal.org/node/310075 $query = db_select('node', 'n', $options); ->fields('n'); ->fields('u', array('uid', 'name', 'status', 'created', 'access')) ->addField('n', 'title', 'my_title'); ->condition('u.uid', 0, '<>') ->join(table, 'u', 'n.uid = u.uid AND u.uid = :uid', array(':uid' => 5)); join, innerjoin, leftjoin, rightjoin table can be tablename or select object ->distinct() ->addExpression('COUNT(uid)', 'uid_count'); ->addExpression('created - :offset', 'uid_count', array(':offset' => 3600)); ->orderBy('title', 'DESC'); ->orderRandom(); ->groupBy('uid'); ->range(0, 50); $result = $query->execute(); conditions: http://drupal.org/node/310086 ->condition($field, $value = NULL, $operator = '=') ->where($snippet, $args = array()) ->condition('myfield', array(1, 2, 3), 'IN'); ->condition('myfield', array(5, 10), 'BETWEEN'); ->isNull('myfield') ->isNotNull('myfield'); nested: ->condition(db_or()->condition(... db_and() db_or() db_xor() subselects: ->condition(SelectQuery object, ... node nid, vid, type, language, title, uid, status, created, changed, comment, promote, sticky, tnid, translate field_data_field_fieldname entity_type, bundle, deleted, entity_id, revision_id, language, delta, field_fieldname_nid error reporting: http://2paisasbyviggy.wordpress.com/2009/10/29/how-to-enable-error-reporting-in-drupal/ at the beginning of index.php error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); modules: lists: http://drupal.org/project/modules http://drupal.org/documentation/modules/contributions top10: http://drupal.org/node/1182798 views, token, admin menu, date, IMCE, google analytics, webform, chaos tool suite token: http://drupal.org/project/token transliteration pathauto: http://drupal.org/project/pathauto better urls automatically, requires token and transliteration wysiwyg: http://drupal.org/project/wysiwyg in config activate wanted buttons don't activate: bbcode in admin/config/content/formats/filtered_html allow

tag http://drupal.fckeditor.net/filters comparison: http://drupal.org/node/266179 http://groups.drupal.org/similar-module-review core: content construction kit (cck): http://drupal.org/project/cck is in core (kinda) taxonomy: categories contextual links add new: http://drupal.org/node/1089922 location: http://drupal.org/project/location associate geographic locations with nodes contact module: http://drupal.org/documentation/modules/contact main page/home page/front page: block only on front page: in block settings, pages use tag front page module: http://drupal.org/project/front different page at beginning google maps: http://drupal.org/project/gmap