1 Million Energy Actions

Documentation

Weekly Challenge

Overview

You will log in to the database from WordPress to add and edit Weekly Challenges to appear on the site and apps. This requires access to only one database table, app_challenge.

Adding a Weekly Challenge

  1. Access the Database (Run ARI Adminer): Find the ARI Adminer link in the left column, then choose the first option, Run ARI Adminer. The 1MEA database should appear in the dropdown; click the blue "Run Adminer in Modal Window" button
  2. Create a New Weekly Challenge Series: Find the app_challenge table (at the top of the list) and choose, "Select Data". Choose "New Item" at the top of the page.
  3. Add Content to the Weekly Challenge: The titles of each field makes these self-explanatory - they are the same fields you know from using phpMyAdmin for the polls. You can leave ID blank, but here you are able to specify start and stop date for the series; as well as specify 3 different parameters for each slide:
    • slide_css This field will allow you to specify whether you want the animated gif background to be large and full screen (use "background-size:cover" (no quotes)); for them to repeat as small-ish tiles, you can do something like "background-size:250px;background-repeat:repeat;" and to do larger tiles, just change the background-size value to something larger, like "background-size: 600px;"
    • slide_bg This field is where your path to the GIF goes
    • slide_html This field is where your text goes. We are allowing simple HTML commands so you have control. Most of them use something like this:

      It takes a lot of time and effort to prepare food.

    Which will create a large headline in white type.
  4. Repeat until fields for all 7 slides are complete
  5. Save the Weekly Challenge: You should probably save as you work, but definitely make sure to save your work at the end - button below the table fields.
  6. How to Exit ARI Adminer Click the dark grey areas outside of the Adminer interface.

How to test the appearance of the challenge

Add "?previewID=X" to https://1millionenergyactions.b.wpstage.net/challenge/index.html, where "X" is the ID number of the challenge you've created in the database. So, to see a challenge with an ID of 1, https://1millionenergyactions.b.wpstage.net/challenge/index.html?previewID=1 would display the that challenge.
Polls

Overview

You will log in to the database from WordPress to add and edit polls to appear on the site and apps. The only two data tables you will need to pay attention to are app_poll and app_dates. Please do not change information in the other tables 🙂

Adding a Poll

  1. Access the Database (Run ARI Adminer): Find the ARI Adminer link in the left column, then choose the first option, Run ARI Adminer. The 1MEA database should appear in the dropdown; click the blue "Run Adminer in Modal Window" button
  2. Create a New Poll Item: Find the app_poll table and choose, "Select Data". Choose "New Item" at the top of the page.
  3. Add Content to the Poll: The titles of each field makes these self-explanatory - they are the same fields you know from using phpMyAdmin. You can leave ID blank, but fill in the rest of the fields as previously: number (a number from 1-30 or 31 so you can plan a month-long series); topic (i.e. Water Conservation, Energy, etc.); question (the poll question, please keep to 7-9 words); answer_a and answer_b (please keep text no more than 5 words each); image_a and image_b (the file name for each of these, see adding images below).
  4. Save the Poll: Two options here: Save (brings you back to poll list, ideal if you were just adding one poll) and Save and insert next (returns to a blank poll entry page so you can quickly add a new poll if you are adding more than one poll)
  5. How to Exit ARI Adminer Click the dark grey areas outside of the Adminer interface.

Adding Images

  1. Find the Images: As you write the poll questions, you will have ideas about the types of images that would support each A/B answer. Pexels.com and freepik.com are examples of free, high-quality stock photo sites that have many images suitable for a variety of subject matter. Use those sources first; if you still need to source images, perhaps TEC could get a subscription to Depositphotos, Shutterstock, or Photodune. All are affordable and good quality. We are aiming for a slightly curated, instagram look for the poll answer images.Please make sure you download the highest resolution you can, and also, that the image narrative comes through within the center / top of the image, for alignment across platforms.
  2. Upload the Images: Visit the 1millionenergyactions.org/wp-admin dashboard, and go to Media. Upload the images there - the images will be automatically cropped into dimensions relative to the polls for you.
  3. Add images: Paste the image file names into image_a or image_b fields in Adminer for the relevant poll accordingly.

Editing Polls

  1. Access the Database
  2. Find the Poll and Edit

Assigning Appearance Dates to Polls

  1. Access the Database
  2. Open the app_poll_dates table:
  3. To create a new poll date entry:
  4. To edit an existing poll date entry:

Testing the Polls

Visit https://1millionenergyactions.b.wpstage.net/polls/index.html?previewID=X, where "X" is set to the ID number of the poll you've created in the poll_date database. So, to see a poll with an ID of 5, you would use, https://1millionenergyactions.com/challenge/index.html?previewID=5 would display poll 5