Posted by jhodgdon on January 16, 2015 at 2:48pm
Start:
2015-02-19 10:00 - 12:00 America/Los_Angeles Organizers:
Event type:
User group meeting
We hope you can join us for the next meeting of the Spokane Day-Time Drupal Learning and Co-Working Group!
- When
- Thursday, February 19, 2015, 10 AM to noon
- Sign up!
- Log in and click the "Sign up" button, if you think you will be coming. You will be reminded the day before. The meeting will be canceled if not enough people sign up by the end of the day the Monday before the meeting. You can always click "Cancel signup" at a later time if your schedule changes and you can no longer come.
- Where
- Spokane County Library - Argonne branch, 4322 N. Argonne Road, Millwood. We meet in the large meeting room - enter from the door out in the hallway before you go into the area with the books
- What
- Learning and "co-working" time - bring your laptop, or watch on the projector screen. Come with a project you're working on, a desire to improve Drupal in some way (documentation, programming, design, marketing etc.), a question about Drupal you would like to get an answer to, or a desire to help others with their projects and questions. Or just come and listen and observe.
- Who
- Everyone is welcome -- the only prerequisite is having some interest in Drupal. This group is usually 5-10 friendly people, with experience levels ranging from novice to expert, so you'll fit right in. Because of the size of the group, you will have time to share something you've learned, or get your questions answered, or both!
Note: If you'd like to have a meeting at another time that is more convenient for you, please feel free to organize it! See http://groups.drupal.org/node/161584 for a Wiki where people have listed when would be convenient for them to have meetings.
Sign up now! Log in and click the "Sign up" button if you plan to come, or probably will come, to ensure the meeting actually takes place. The meeting will be canceled if not enough people sign up by the end of the day the Monday before the meeting.
Comments
Topics?
I was thinking for February's meeting, I could present some of the technicalities of the Drupal 7 and 8 theme system, if people are interested... by which I mean the PHP and (in Drupal 8) Twig side of the theme system, so you can understand better where all the HTML markup (including the CSS IDs and classes) in a Drupal site actually comes from. We could spend 30-60 minutes on that and then have our usual open Q&A for the rest of the time. Any interest?
Drupal programmer - http://poplarware.com
Drupal author - http://shop.oreilly.com/product/0636920034612.do
Drupal contributor - https://www.drupal.org/u/jhodgdon
Two Thumbs Up
I am all for this! Very good idea.
5 stars
It sounds good to me!
Brilliant
I'm very interested! Thanks.
Teach me oh fearless leader!
Teach me oh fearless leader! Thank you for all you do!
Theming notes
Notes about the Drupal Theme System:
theme_something()
or a PHP templatesomething.tpl.php
. In Drupal 8 it is almost always a Twig templatesomething.html.twig
.Documentation on the theme() function for Drupal 7
Documentation on the Theme System topic for Drupal 8
Drupal programmer - http://poplarware.com
Drupal author - http://shop.oreilly.com/product/0636920034612.do
Drupal contributor - https://www.drupal.org/u/jhodgdon
Additional meeting notes
In addition to the Themeing discussion above, here's what we discussed at the meeting:
During the theming discussion: em vs. px measurements in CSS
Jose: asked for maintenance tips (updating modules, how often, etc.)
Jon says: Makes a backup every day (files and database). Jon uses his own methods; most people use the Backup and Migrate module https://www.drupal.org/project/backup_migrate -- and the frequency depends on how often your particular site actually changes. Make sure that the backup is saved OFF SITE, not on your web server only.
Everyone says: Test module updates on the dev site first!
Jose: Unsupported modules messages on the Modules - Available Updates page - what to do?
Advice: Check the project page to see how to update to the new version, if possible. Try it out on your test/development site. If it works, great! Do it on live.
Jose: Had a WSOD (White Screen Of Death)!! Installed a new module called "Find Content". It worked on the dev site, but caused a WSOD on the live site. The PHP version running on the two sites was different. Jose fixed the problem on the live site by following various instructions he found by searching. Don't panic!
Jose: Needs a replacement for the "Find Content" module. We suggest using a View. Set the "Access" to permission "Administer Content" so it is only available to Admins. Use Filters (and set them to "Exposed") to set up searching. There are good videos on how to do this.
Jon: Slideshow/cycle views - Use the Views Slideshow module to may cycling content areas/blocks for a site. https://www.drupal.org/project/views_slideshow
Jose: Forms module advice - Use the Webform module
https://www.drupal.org/project/webform
Shawn: Cron API (PHP Programming)
Drupal runs "cron" jobs periodically. You can define a cron job in a module by using hook_cron() [make a function called mymodule_cron(); if your module is enabled, when Drupal "runs cron", it will call your function.]
Drupal can run cron in several ways:
a) You can set up admin/config/system/cron to run cron every so often. This will piggy-back on page requests on your site, slowing them down, and it will only run when people are accessing the site. This is called "Poor Man's Cron" in earlier versions of Drupal, where it was a contrib module; it's in Core in Drupal 7 and 8.
b) You can go to http://drupal.org/cron and learn how to set up a "Cron job" on your server. Basically, you will tell the server (via your hosting control panel) to hit a particular URL every so often, from outside the site. This does not depend on or piggy back on users visiting your site.
There is also a Queue API:
1. Implement hook_cron_queue_info() to define the different "queues" for your module.
2. Add items to each queue. You may need to do this during your hook_cron(), or from other queue items.
$queue = DrupalQueue::get('name_of_queue');
$queue->create Item(array(... info for the queue item ... ));
Define functions to process items in the queue. The input parameter will be the data you added to the queue in createItem().
Drupal processes all queues during Cron runs.
Drupal programmer - http://poplarware.com
Drupal author - http://shop.oreilly.com/product/0636920034612.do
Drupal contributor - https://www.drupal.org/u/jhodgdon
All of the meetings are
All of the meetings are great! I especially got a ton of great information out of this one! Thank you!