| 1 | == Some Drush commands == |
| 2 | * drush -v help |
| 3 | * drush -v status |
| 4 | * drush -v core-status |
| 5 | * drush -v status-report |
| 6 | * drush -v elysia-cron |
| 7 | * drush -v core-cron |
| 8 | * drush -v pm-refresh |
| 9 | * drush -v rf |
| 10 | * drush -v pm-download |
| 11 | * drush -v dl |
| 12 | * drush -v pm-updatecode |
| 13 | * drush -v upc |
| 14 | * drush -v pm-update |
| 15 | * drush -v up |
| 16 | * drush -v pm-list |
| 17 | * drush -v pml |
| 18 | * drush --status=enabled pm-list |
| 19 | * drush pm-info <admin_menu|...> |
| 20 | * drush pm-enable |
| 21 | * drush pm-disable |
| 22 | * drush -v updatedb |
| 23 | * drush -v updb |
| 24 | * drush libraries-list |
| 25 | * drush -v l10n-update-status |
| 26 | * drush -v cache-clear |
| 27 | * drush -v bam-sources |
| 28 | * use --uri="http://example.org" then sending mail for simplenews https://www.drupal.org/node/1776536 |
| 29 | * nice... |
| 30 | == Drupal installation profile (minimal or standard) == |
| 31 | * [https://www.drupal.org/node/1127786 Built-in Installation Profiles (Drupal 7)] |
| 32 | * https://github.com/drupal-composer/drupal-core/tree/8.0.x/profiles |
| 33 | * http://cgit.drupalcode.org/drupal/tree/profiles/minimal?h=7.x (does not allow to see files) |
| 34 | == Installing Drupal 7 or 8 with [https://en.wikipedia.org/wiki/Composer_(software) Composer] (on a development server outside MayFirst) == |
| 35 | {{{#!sh |
| 36 | $ composer create-project "drupal-composer/drupal-project" <directory> |
| 37 | }}} |
| 38 | * [https://www.drupal.org/node/2471553 Composer in relation to Drush Make] |
| 39 | * https://github.com/drupal-composer/drupal-project/tree/8.x |
| 40 | * https://packagist.org/packages/drupal-composer/drupal-project |
| 41 | * https://packagist.org/packages/drupal/core |
| 42 | * [https://github.com/derhasi/composer-preserve-paths Composer preserve paths] |
| 43 | * https://packagist.org/packages/theodo/drupal8-bundle |
| 44 | === Drupal 7 specificities of Composer install |
| 45 | ==== Inactivate Drush download |
| 46 | * Inspired by "drupal-composer/drupal-project" for Drupal 8 |
| 47 | * Install Drush policy |
| 48 | * https://github.com/drupal-composer/drupal-project/blob/8.x/drush/policy.drush.inc |
| 49 | * https://github.com/drush-ops/drush/blob/8.x/examples/policy.drush.inc |
| 50 | * Needs a recent version of Drush, 5.10, the one on Debian 8 Jessie is too old and the package is orphaned 2016-05-10 https://packages.qa.debian.org/d/drush.html |
| 51 | {{{#!sh |
| 52 | $ drush cache-clear drush |
| 53 | 0 $ drush up |
| 54 | This codebase is assembled with Composer instead of Drush. Use `composer update` and `composer [error] |
| 55 | require` instead of `drush pm-updatecode` and `drush pm-download`. You may override this error by |
| 56 | using the --pm-force option. |
| 57 | 1 $ |
| 58 | }}} |
| 59 | === Using symlinks to avoid duplication of code and save server memory === |
| 60 | * locally clone repositories using git (see below: {{{git}}} for Drupal) |
| 61 | * composer version inference from git repositories is not reliable today with Composer version 1.0.0-beta2 2016-03-27 |
| 62 | * https://getcomposer.org/doc/05-repositories.md#path |
| 63 | * https://discuss.flarum.org/d/1608-extension-development-using-composer-repositories-path It looks like {{{*}}} is accepted... |
| 64 | {{{#!json |
| 65 | { |
| 66 | #... |
| 67 | "repositories": [ |
| 68 | { |
| 69 | "type": "path", |
| 70 | "url": "workbench/*/" |
| 71 | } |
| 72 | ], |
| 73 | #... |
| 74 | } |
| 75 | }}} |
| 76 | * spot larger libraries (and the one used more often) |
| 77 | {{{#!sh |
| 78 | .../vendor$ du */* -sch | sort -h |
| 79 | }}} |
| 80 | {{{#!sh |
| 81 | .../vendor$ du */* -sc | sort -n |
| 82 | }}} |
| 83 | * https://getcomposer.org/doc/articles/troubleshooting.md |
| 84 | * http://fr.slideshare.net/fabrice.bernhard/integrating-drupal-8-into-symfony-2 |
| 85 | * |
| 86 | == Installing Drupal 7 or 8 with [https://github.com/drush-ops/drush Drush] (on a development server outside MayFirst) == |
| 87 | {{{#!sh |
| 88 | $ drush help site-install |
| 89 | $ drush dl drupal-7 |
| 90 | $ cd drupal-7.43/ |
| 91 | $ drush site-install minimal --db-url=sqlite://sites/default/files/.ht.sqlite |
| 92 | $ drush site-install standard --locale=fr # worked after using the web interface to configure the database. |
| 93 | $ drush site-install standard --locale=fr --db-url="pgsql:/host=/var/run/postgresql" # worked note the "/"!(?) |
| 94 | $ drush rs |
| 95 | $ drush site-install minimal --db-url="pgsql:host=/var/run/postgresql;dbname=infolettre-alici-webadmin;user=infolettre-alici-webadmin" # reade "ost" instead of "host" |
| 96 | }}} |
| 97 | * Not sure if an ; at the end of PostgreSQL db-url changes something... |
| 98 | * Try more than once! |
| 99 | * It may be easier with web interface. |
| 100 | * Considere drush site-install after a web install and database reinitialization. |
| 101 | * Installation with --local may take considerably more time (d7, d8) |
| 102 | == {{{git}}} for Drupal == |
| 103 | {{{#!sh |
| 104 | $ git ls-remote --tags <repository> | sort --key=2 --version-sort | less |
| 105 | $ git clone --branch <branch or tag> <repository> <directory> |
| 106 | }}} |
| 107 | * branch may evolve (devel) like 8.0.x |
| 108 | * tag are frozen, like stable releases as in 8.0.5 |
| 109 | * directory may be {{{.../share/url/<URL>/<version>}}} , {{{.../share/vendor/<vendor>/<package>/<version>}}} or {{{.../share/latest/...}}} . |
| 110 | {{{#!sh |
| 111 | .../share/url$ git clone --branch 8.0.5 "https://git.drupal.org/project/drupal.git" git.drupal.org/project/drupal/8.0.5 |
| 112 | .../share/url$ cd git.drupal.org/project/drupal/8.0.5 ; git branch -v |
| 113 | * (aucune branche) d918ae1 Drupal 8.0.5 |
| 114 | }}} |
| 115 | {{{#!sh |
| 116 | $ git ls-remote --tags https://github.com/drupal-composer/drupal-core | sort --key=2 --version-sort | less |
| 117 | .../share/url$ git clone --branch 8.0.5 "https://github.com/drupal-composer/drupal-core" github.com/drupal-composer/drupal-core/8.0.5 |
| 118 | .../share/url$ cd github.com/drupal-composer/drupal-core/8.0.5 ; git branch -v |
| 119 | * (aucune branche) da4c151 Drupal 8.0.5 |
| 120 | }}} |
| 121 | * https://www.drupal.org/project/drupal/git-instructions |
| 122 | * [https://www.drupal.org/node/1066342 Creating a branch or tag in Git] |
| 123 | * https://www.drupal.org/project/git_deploy |
| 124 | * [https://www.drupal.org/node/1314752 Versioned dependencies and Git] |
| 125 | * [https://git-scm.com/book/tr/v2/Git-Internals-Git-References 10.3 Git Internals - Git References] |
| 126 | == Drupal 8 requirements and particularities == |
| 127 | * Drupal 8.0.5 needs Postgresql >= 9.1.2 instead of 8.4.20 #11587, #11522 |
| 128 | * Drupal 8.0.5 works with Postgres, but not {{{drush site-install}}} |
| 129 | * keywords: drupal 8 postgresql |
| 130 | * [https://www.drupal.org/node/2157455 Make Drupal 8 work with PostgreSQL or remove support from core before release] |
| 131 | * [https://www.drupal.org/node/1060476 Multiple issues when PostgreSQL is used with non-public schema] |
| 132 | == CKEditor for Drupal 7 == |
| 133 | Lets'use wysiwyg module |
| 134 | * Supported Editors Matrix https://www.drupal.org/node/596966 |
| 135 | * $ drush dl --select wysiwyg |
| 136 | * $ drush dl wysiwyg-2.x-dev |
| 137 | * $ drush en wysiwyg |
| 138 | * $ drush status-report |
| 139 | * .../sites/all/libraries$ ln -s .../bower_components/ckeditor/ . |
| 140 | Does not work! Brobably because of symbolic links... better use .bowerrc to set target directory as suggested above. |
| 141 | |
| 142 | http://cdn.ckeditor.com/4.5.4/full-all |
| 143 | |
| 144 | |
| 145 | == Drupal Modules == |
| 146 | * [[span(title="", )]] |
| 147 | * [[span(title="Admin Toolbar improve...", [https://www.drupal.org/project/admin_toolbar Admin Toolbar])]] |
| 148 | * [[span(title="""Admin Toolbar improve...""", [https://www.drupal.org/project/admin_toolbar Admin Toolbar])]] |
| 149 | * [https://www.drupal.org/project/admin_toolbar [[span(title="Admin Toolbar improve...", Admin Toolbar)]] ] |
| 150 | * [https://www.drupal.org/project/admin_toolbar [[span(title="Admin Toolbar improve...", Admin Toolbar)]]] |
| 151 | * [[span(title=Tooltip 1, Tooltip example 1)]] |
| 152 | |
| 153 | {{{#!span title="Tooltip 2b" |
| 154 | Tooltip example 2b |
| 155 | }}} |
| 156 | |
| 157 | {{{#!span title="""Tooltip 2h""" |
| 158 | Tooltip example 2h |
| 159 | }}} |
| 160 | |
| 161 | {{{#!span title= |
| 162 | "Tooltip 2g" |
| 163 | Tooltip example 2g |
| 164 | }}} |
| 165 | |
| 166 | {{{#!span title= |
| 167 | "Tooltip 2h" |
| 168 | Tooltip example 2h |
| 169 | }}} |
| 170 | |
| 171 | {{{#!span title="Tooltip\\2e" |
| 172 | Tooltip example 2e |
| 173 | }}} |
| 174 | |
| 175 | {{{#!span title="Tooltip[[br]]2f" |
| 176 | Tooltip example 2f |
| 177 | }}} |
| 178 | |
| 179 | {{{#!span title=`Tooltip 2c` |
| 180 | Tooltip example 2c does not work |
| 181 | }}} |
| 182 | |
| 183 | {{{#!span title=`Tooltip 2d |
| 184 | multiline` |
| 185 | Tooltip example 2d |
| 186 | }}} |
| 187 | |
| 188 | {{{#!html |
| 189 | <span title="Tooltip 4a"> |
| 190 | }}} |
| 191 | Tooltip example 4a |
| 192 | {{{#!html |
| 193 | </span> |
| 194 | }}} |
| 195 | |
| 196 | {{{#!span title="Tooltip 2a" Tooltip example 2a}}} |
| 197 | |
| 198 | {{{#!span title="Tooltip 3a |
| 199 | multiline tooltip" |
| 200 | Tooltip example 3a |
| 201 | }}} |
| 202 | |
| 203 | {{{#!span title={{{Tooltip 3b |
| 204 | multiline tooltip |
| 205 | }}} |
| 206 | Tooltip example 3b |
| 207 | }}} |
| 208 | |
| 209 | ||= **D7 ordered** =|| Drupal 8 || || Drupal 7 ||= **D8 ordered** =|| |
| 210 | || || || ||||= **Core** =|| |
| 211 | || [[span(title="", )]] || [[span(title="", )]] || || [[span(title="", )]] || [[span(title="", )]] || |
| 212 | || || || || || Actions || |
| 213 | || || || || || Activity Tracker || |
| 214 | || || || || || Aggregator || |
| 215 | || || || || || Automated Cron || |
| 216 | || || || || || Ban || |
| 217 | || || || || || Block || |
| 218 | || || || || || Book || |
| 219 | || || || || || || |
| 220 | || || || ||||= **Administration** =|| |
| 221 | || || || || [https://www.drupal.org/project/admin_menu Administration menu] || [https://www.drupal.org/project/admin_toolbar Admin Toolbar] || |
| 222 | || || || || || [https://www.drupal.org/project/admin_toolbar Admin Toolbar Extra Tools] || |
| 223 | || || || || || || |
| 224 | || || || || || || |
| 225 | || || || || || || |
| 226 | === [https://www.drupal.org/project/hybridauth Hybridauth] === |
| 227 | http://cgit.drupalcode.org/hybridauth/tree/README.txt?id=refs/heads;id2=7.x-2.x |
| 228 | === [https://www.drupal.org/project/simplenews simplenews] === |
| 229 | * https://backdropcms.org/project/simplenews |
| 230 | == Inside Drupal == |
| 231 | === Training === |
| 232 | * https://www.youtube.com/results?search_query=drupal+8+under+the+hood |
| 233 | * http://knpuniversity.com/screencast/drupal8-under-the-hood |
| 234 | * https://drupalize.me/blog/201408/new-php-tutorials-symfony-experts-knp-labs |
| 235 | * https://www.youtube.com/results?search_query=drupal8 |
| 236 | === Entities === |
| 237 | * Introduced in Drupal 7 |
| 238 | * Something different : Symfony Entity |
| 239 | * [https://www.drupal.org/node/1261744 An Introduction to Entities] |
| 240 | * [https://www.drupal.org/node/878784 Entity API Tutorial] |
| 241 | * [http://joshaust.in/wp-content/uploads/2012/06/Entities-and-Bundles-in-Drupal-7.pdf Enties and Bundles in Drupal 7] |
| 242 | * [https://www.drupal.org/node/1649688 Understanding entity terminology] |
| 243 | * [https://evolvingweb.ca/blog/drupal-7-entities-what-are-they-and-what-are-they-good Drupal 7 Entities: What are they, and what are they good for?] |
| 244 | * https://www.drupal.org/project/bean |
| 245 | * https://api.backdropcms.org/api/backdrop/core!modules!entity!entity.api.php/1 |
| 246 | * drupal 8 entity |
| 247 | * https://www.drupal.org/developing/api/entity |
| 248 | * https://www.drupal.org/node/2192175 |
| 249 | * http://www.drupalcontrib.org/api/drupal/drupal!core!vendor!symfony!validator!Symfony!Component!Validator!Tests!Fixtures!Entity.php/8 |
| 250 | === Drupal 8 === |
| 251 | * http://www.garfieldtech.com/presentations/sflportland-drupal8-symfony2 |