Spokane Day-time Learn/Co-Work Group Feb 19

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
jhodgdon's picture
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?

jhodgdon's picture

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?

Two Thumbs Up

dmsid's picture

I am all for this! Very good idea.

5 stars

denuevojose's picture

It sounds good to me!

Brilliant

Momseekingbalance's picture

I'm very interested! Thanks.

Teach me oh fearless leader!

CProfessionals's picture

Teach me oh fearless leader! Thank you for all you do!

Theming notes

jhodgdon's picture

Notes about the Drupal Theme System:

  • Fundamental idea of Drupal theming:
    • Drupal systems (Core, Contrib Modules, Custom modules) decide what data to display (text, images, etc.) on each page of the site.
    • The Theme decides how to display the data: HTML markup and CSS.
  • Modules should provide the "what" in the form of a render array -- see https://www.drupal.org/node/930760
  • The Drupal rendering system takes the render array and processes it in a hierarchical way:
    • Passes each render array item through one or more preprocessing and processing functions provided by Drupal Core and modules.
    • Then sends it to the theme for transformation into HTML. In Drupal 7, this is done by a theme function theme_something() or a PHP template something.tpl.php. In Drupal 8 it is almost always a Twig template something.html.twig.
    • Drupal Core or modules provide default processing/theme functions/templates. The theme can override these defaults.
    • The modules and the theme can also add CSS and JS files to the page during processing.
    • The lowest-level output (for example, individual form elements) is passed into the next-lowest level processing (for example, a group of elements in a Fieldset), and then the next, and so on (the form, the content area of the page, the entire page). Each level has its own processing and theming.
    • The final output is sent to the browser, including all the attached CSS and JS files in the header.
  • Figuring out the processing going into a given page or page subset, and how to update it:
  • For more: https://www.drupal.org/documentation/theme

Additional meeting notes

jhodgdon's picture

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 ... ));
  1. Define functions to process items in the queue. The input parameter will be the data you added to the queue in createItem().

  2. Drupal processes all queues during Cron runs.

All of the meetings are

CProfessionals's picture

All of the meetings are great! I especially got a ton of great information out of this one! Thank you!

Spokane, WA

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week