[[TranslatedPages]] == Who we are? == http://gripuqam.org We are french speaking so this page will be translated unsing the advise in [wiki:/faq/translate/pages] == Wiki page we read or collaborate to write @ mayfirst == * [wiki:/faq/translate/pages] * WikiFormatting * http://trac.edgewall.org/wiki/TracSyntaxColoring * Trac Syntax Coloring Example {{{ {{{#!sh }}} {{{#!application/x-shellscript }}} }}} {{{#!sh path$ echo "World" ; ls ; cd ; help # comment }}} {{{#!comment {{{#!application/x-shellscript path$ echo "World" ; ls ; cd ; help # comment }}} }}} {{{ {{{#!json }}} {{{#!application/json }}} }}} {{{#!json { "name": "drupal7", # comment forbidden in json "private": true // no coma here! } }}} {{{#!comment {{{#!application/json { "name": "drupal7", # comment forbidden in json "private": true # no coma here! } }}} }}} * #!diff * #!yml * #!text/x-yaml * #!application/x-yaml * #!xml * #!application/xml-dtd ... * #!html //Insert custom HTML in a wiki page.// * #!text/html //The result will be syntax highlighted HTML code// * #!text/html+twig * #!application/x-twig * #!application/x-httpd-php5 * #!python * #!php * #!text/x-php * #!text/css * #!js * #!text/javascript ... * #!sql * #!text/x-sql * #!text/x-sqlite3-console * #!text/x-postgresql-psql ... * #!text/x-mysql * #!text/x-diff * #!text/x-trac-wiki * #!application/x-sh-session **No macro or processor named 'application/x-sh-session' found** * [wiki:TracQuery#UsingtheTicketQueryMacro TicketQuery Macro] (tagging tickets) examples: * [wiki:tzk:choices] * [wiki:support-team/dkg] * https://support.mayfirst.org/tags * http://trac.edgewall.org/wiki/TicketQuery * http://trac.edgewall.org/wiki/TracQuery * There is somewhere a useful cloud of tags. [wiki:/faq/wordpress/WordPressInstall] * Tag for Debian packages `[DebianPackage:python-whoosh]`[DebianPackage:python-whoosh] == Tickets we follow == === Taged with GRIP-UQAM === [[TicketQuery(max=10,keywords~=GRIP-UQAM,order=changetime,desc=1,format=table,col=changetime|resolution|owner|summary)]] === Taged with python, tendenci, django, pyramid, php, drupal7, drupal, golang, fastcgi, chelsea, ossie === [[TicketQuery(max=10,keywords~=python|tendenci|django|pyramid|php|drupal7|drupal|golang|fastcgi|chelsea.mayfirst.org|ossie.mayfirst.org,order=changetime,desc=1,format=table,col=changetime|resolution|owner|summary)]] === Reported by us === [[TicketQuery(reporter=https://id.mayfirst.org/gripuqam|https://id.mayfirst.org/gripuqamweb|https://id.mayfirst.org/essais)]] === Drupal requirements === * Drupal 8.0.5 needs Postgresql >= 9.1.2 instead of 8.4.20 #11587, #11522 === Taged with GRIP-UQAM with description === [[TicketQuery(max=1,keywords~=GRIP-UQAM,format=table,col=changetime|resolution|owner|summary,rows=description)]] == Development Tool == * [wiki:/faq/setup-development-workstation] * [wiki:/setup_virtual_machine] == Pages we may need one day == * [wiki:apachesolr] * [wiki:faq/drupal/update-module] * [wiki:create_mysql_database] * [wiki:phpmyadmin_link] * [wiki:support-team] == Some PostgreSQL commands == * $ psql postgres --command="\l" # do see DB on server and parameters * postgres:~$ createuser -D -R -S * postgres:~$ createdb -O * $ pg_dump -Fc --verbose --file= * $ pg_restore --verbose --no-owner --no-privileges --dbname= # restore the data base as a different user eg. to clone a Drupal website == Javascript: from npm to bower == * $ nice -n 127 ionice --class=idle npm install bower --save * $ nice -n 127 ionice --class=idle npm update #update! * or (like there is something to check here) * $ nice -n 127 ionice --class=idle npm update bower #update! * .bowerrc * $ nice -n 127 ionice --class=idle nodejs node_modules/bower/bin/bower init # to start a new empty bower.json * Install some libraries... * $ nice -n 127 ionice --class=idle nodejs node_modules/bower/bin/bower update --production #update! == Example .bowerrc for Drupal 7 == {{{#!json { "directory" : "../../web/sites/all/libraries" } }}} == Install Javascript libraries with Bower package manager {{{#!sh #$ nodejs node_modules/bower/bin/bower install --save "jquery#1.4.4" # Drupal 7 version # or (good idea (checked)) nodejs node_modules/bower/bin/bower install --save jquery#~1.4.4 # Drupal 7 version nodejs node_modules/bower/bin/bower install --save jquery-colorbox # depends on jquery nodejs node_modules/bower/bin/bower install --save ckeditor#full/stable }}} * https://github.com/npm/node-semver#ranges (valid for Bower) * $ ls bower_components/ * or * $ ls ../../web/sites/all/libraries * https://packagist.org/packages/ckeditor/ckeditor * Supported Editors Matrix https://www.drupal.org/node/596966 * jquery version for Drupal 7 https://www.drupal.org/node/171213 * same with jQuery Update module https://www.drupal.org/project/jquery_update * https://packagist.org/packages/kraksoft/colorbox * https://github.com/Spea/SpBowerBundle == Example bower.json for Drupal 7 == {{{#!json { "name": "drupal7", "private": true, "ignore": [ "**/.*", "node_modules", "bower_components", "../../web/sites/all/libraries", "test", "tests" ], "dependencies": { "jquery": "~1.4.4", "jquery-colorbox": "^1.6.3", "ckeditor": "#full/stable" } } }}} == Example composer.json for Drupal 7 == {{{#!json { "require": { "drush/drush": "^8.0", "ezyang/htmlpurifier": "^4.7", "kraksoft/colorbox": "^1.5", "pelago/emogrifier": "^1.0", "tinymce/tinymce": "^3.5", # remove this line, this version is not available through composer! "ckeditor/ckeditor": "^full/4.5.1" } } }}} * http://docs.drush.org/en/master/install/ * https://packagist.org/packages/ezyang/htmlpurifier * http://htmlpurifier.org/download * https://packagist.org/packages/pelago/emogrifier * https://www.drupal.org/project/emogrifier * php composer target directory == Some Composer commands == * $ ./composer.phar self-update * $ ./composer.phar update == Cron == * Consider output to an (even empty) file a good practice allowing to check last time the command has been executed. This is because some subtle errors may prevent execution of cron commands, eg. see #11534 {{{#!sh ... &> cron/results/ }}} * Consider nice and ionice to give priority to interactive tasks {{{#!sh nice -n 127 ionice --class=idle ... }}} == Some Drush commands == * drush -v help * drush -v status * drush -v core-status * drush -v status-report * drush -v elysia-cron * drush -v core-cron * drush -v pm-refresh * drush -v rf * drush -v pm-download * drush -v dl * drush -v pm-updatecode * drush -v upc * drush -v pm-update * drush -v up * drush -v pm-list * drush -v pml * drush --status=enabled pm-list * drush pm-info * drush pm-enable * drush pm-disable * drush -v updatedb * drush -v updb * drush libraries-list * drush -v l10n-update-status * drush -v cache-clear * drush -v bam-sources * use --uri="http://example.org" then sending mail for simplenews https://www.drupal.org/node/1776536 * nice... == Installing Drupal 7 or 8 with [https://en.wikipedia.org/wiki/Composer_(software) Composer] (on a development server outside MayFirst) == {{{#!sh $ composer create-project "drupal-composer/drupal-project" }}} * [https://www.drupal.org/node/2471553 Composer in relation to Drush Make] * https://github.com/drupal-composer/drupal-project/tree/8.x * https://packagist.org/packages/drupal-composer/drupal-project * https://packagist.org/packages/drupal/core * [https://github.com/derhasi/composer-preserve-paths Composer preserve paths] === Using symlinks to avoid duplication of code and save server memory === * locally clone repositories using git (see below: {{{git}}} for Drupal) * https://getcomposer.org/doc/05-repositories.md#path * https://discuss.flarum.org/d/1608-extension-development-using-composer-repositories-path It looks like {{{*}}} is accepted... {{{#!json { #... "repositories": [ { "type": "path", "url": "workbench/*/" } ], #... } }}} * spot larger libraries (and the one used more often) {{{#!sh .../vendor$ du */* -sch | sort -h }}} {{{#!sh .../vendor$ du */* -sc | sort -n }}} == Installing Drupal 7 or 8 with [https://github.com/drush-ops/drush Drush] (on a development server outside MayFirst) == {{{#!sh $ drush help site-install $ drush dl drupal-7 $ cd drupal-7.43/ $ drush site-install minimal --db-url=sqlite://sites/default/files/.ht.sqlite $ drush rs }}} == {{{git}}} for Drupal == {{{#!sh $ git ls-remote --tags | sort --key=2 --version-sort | less $ git clone --branch }}} * branch may evolve (devel) like 8.0.x * tag are frozen, like stable releases as in 8.0.5 * directory may be {{{.../share/url//}}} , {{{.../share/vendor///}}} or {{{.../share/latest/...}}} . {{{#!sh .../share/url$ git clone --branch 8.0.5 "https://git.drupal.org/project/drupal.git" git.drupal.org/project/drupal/8.0.5 .../share/url$ cd git.drupal.org/project/drupal/8.0.5 ; git branch -v * (aucune branche) d918ae1 Drupal 8.0.5 }}} {{{#!sh $ git ls-remote --tags https://github.com/drupal-composer/drupal-core | sort --key=2 --version-sort | less .../share/url$ git clone --branch 8.0.5 "https://github.com/drupal-composer/drupal-core" github.com/drupal-composer/drupal-core/8.0.5 .../share/url$ cd github.com/drupal-composer/drupal-core/8.0.5 ; git branch -v * (aucune branche) da4c151 Drupal 8.0.5 }}} * https://www.drupal.org/project/drupal/git-instructions * [https://www.drupal.org/node/1066342 Creating a branch or tag in Git] * https://www.drupal.org/project/git_deploy * [https://www.drupal.org/node/1314752 Versioned dependencies and Git] * [https://git-scm.com/book/tr/v2/Git-Internals-Git-References 10.3 Git Internals - Git References] == CKEditor for Drupal 7 == Lets'use wysiwyg module * Supported Editors Matrix https://www.drupal.org/node/596966 * $ drush dl --select wysiwyg * $ drush dl wysiwyg-2.x-dev * $ drush en wysiwyg * $ drush status-report * .../sites/all/libraries$ ln -s .../bower_components/ckeditor/ . Does not work! Brobably because of symbolic links... better use .bowerrc to set target directory as suggested above. http://cdn.ckeditor.com/4.5.4/full-all == Useful Debian Packages (Chelsea) == * [DebianPackage:apache2-mpm-worker](debian 8 jessie [DebianPackage:apache2] which uses mpm_event by default) * http://httpd.apache.org/docs/2.4/ * http://httpd.apache.org/docs/2.4/mpm.html * http://httpd.apache.org/docs/2.4/mod/event.html * http://httpd.apache.org/docs/2.4/mod/worker.html * [DebianPackage:apache2-suexec-custom] (also debian 8 jessie [DebianPackage:apache2-suexec-pristine] or debian 7 wheezy [DebianPackage:apache2-suexec]) * [DebianPackage:libapache2-mod-fcgid] * [DebianPackage:php5-cgi] * since february 2016 MayFirst uses mod_proxy_fcgi + php5-fpm == Note Altern-C == * Altern-C seems to use [DebianPackage:libapache2-mpm-itk](debian 7 wheezy [DebianPackage:apache2-mpm-itk]) == To keep in mind == [ticket:4875] [query:id=4875] [[TicketQuery(id=4875)]] [[TicketQuery(id=5580)]] [[TicketQuery(id=5605)]] [[TicketQuery(id=6287)]] * http://servers.mayfirst.org/ == drupal.org followup == * https://localize.drupal.org/comment/51445#comment-51445 == PHP Libraries == === [https://packagist.org/packages/hybridauth/hybridauth Hybridauth] === http://hybridauth.sourceforge.net/userguide.html {{{#!sh $ composer require hybridauth/hybridauth }}} Google:: * easy [http://hybridauth.sourceforge.net/userguide/IDProvider_info_LinkedIn.html LinkedIn]:: * easy OpenID:: * easy (no secret information needed) [http://hybridauth.sourceforge.net/userguide/IDProvider_info_Yahoo.html Yahoo OpenID]:: * https://github.com/hybridauth/hybridauth/tree/master/additional-providers/hybridauth-yahoo-openid * http://hybridauth.sourceforge.net/userguide/tuts/specific-provider-wrapper.html * https://login.yahoo.com/ * a mobile phone number is required to register a new account * yahoo Application consumer key [http://hybridauth.sourceforge.net/userguide/IDProvider_info_Live.html Microsoft Live]:: * Not clear if the domain root URL can be used as redirect URI * Using the domain root URL as redirect URI results in an error at the time of clicking the icon on the registered web site * It is not possible to register inside Microsoft developper website a redirect URI similar to the one used for Google, because some caracteres are not accepted. * one could try to make a simpler redirection URI which would redirect to the one simililar to the one used for Google. * microsoft oauth2 application id * [https://msdn.microsoft.com/en-us/library/bb676626.aspx Getting Your Client ID for Web Authentication] * https://account.live.com * [https://account.live.com/developers/applications/index Mes applications] [http://hybridauth.sourceforge.net/userguide/IDProvider_info_Facebook.html Facebook] * https://developers.facebook.com/apps needs a phone number (sound or text) or a credit card == Drupal Modules == * [[span(title="", )]] * [[span(title="Admin Toolbar improve...", [https://www.drupal.org/project/admin_toolbar Admin Toolbar])]] * [[span(title="""Admin Toolbar improve...""", [https://www.drupal.org/project/admin_toolbar Admin Toolbar])]] * [https://www.drupal.org/project/admin_toolbar [[span(title="Admin Toolbar improve...", Admin Toolbar)]] ] * [https://www.drupal.org/project/admin_toolbar [[span(title="Admin Toolbar improve...", Admin Toolbar)]]] * [[span(title=Tooltip 1, Tooltip example 1)]] {{{#!span title="Tooltip 2b" Tooltip example 2b }}} {{{#!span title="""Tooltip 2h""" Tooltip example 2h }}} {{{#!span title= "Tooltip 2g" Tooltip example 2g }}} {{{#!span title= "Tooltip 2h" Tooltip example 2h }}} {{{#!span title="Tooltip\\2e" Tooltip example 2e }}} {{{#!span title="Tooltip[[br]]2f" Tooltip example 2f }}} {{{#!span title=`Tooltip 2c` Tooltip example 2c does not work }}} {{{#!span title=`Tooltip 2d multiline` Tooltip example 2d }}} {{{#!html }}} Tooltip example 4a {{{#!html }}} {{{#!span title="Tooltip 2a" Tooltip example 2a}}} {{{#!span title="Tooltip 3a multiline tooltip" Tooltip example 3a }}} {{{#!span title={{{Tooltip 3b multiline tooltip }}} Tooltip example 3b }}} ||= **D7 ordered** =|| Drupal 8 || || Drupal 7 ||= **D8 ordered** =|| || || || ||||= **Core** =|| || [[span(title="", )]] || [[span(title="", )]] || || [[span(title="", )]] || [[span(title="", )]] || || || || || || Actions || || || || || || Activity Tracker || || || || || || Aggregator || || || || || || Automated Cron || || || || || || Ban || || || || || || Block || || || || || || Book || || || || || || || || || || ||||= **Administration** =|| || || || || [https://www.drupal.org/project/admin_menu Administration menu] || [https://www.drupal.org/project/admin_toolbar Admin Toolbar] || || || || || || [https://www.drupal.org/project/admin_toolbar Admin Toolbar Extra Tools] || || || || || || || || || || || || || || || || || || || === [https://www.drupal.org/project/hybridauth Hybridauth] === http://cgit.drupalcode.org/hybridauth/tree/README.txt?id=refs/heads;id2=7.x-2.x == Inside Drupal == === Entities === * Introduced in Drupal 7 * [https://www.drupal.org/node/1261744 An Introduction to Entities] * [https://www.drupal.org/node/878784 Entity API Tutorial] * [http://joshaust.in/wp-content/uploads/2012/06/Entities-and-Bundles-in-Drupal-7.pdf Enties and Bundles in Drupal 7] * [https://www.drupal.org/node/1649688 Understanding entity terminology] * [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?] * https://www.drupal.org/project/bean