Making WordPress.org

Opened 5 years ago

Last modified 6 weeks ago

#262 assigned enhancement

Automate WordCamp Gravatar Badge Creation

Reported by: iandunn Owned by:
Milestone: Priority: high
Component: WordCamp Site & Plugins Keywords: needs-patch good-first-bug


The process for creating Gravatar badges for WordCamp attendees is kind of clunky and is more work for organizers than it should be. There are steps of the process that we can automate to make it easier for them.

Basically, we should make it so that all they have to do is visit a page in the Admin Panels, enter a few options, and then hit submit. Then they should get a .zip file containing everything they need to take into InDesign.

1) Generate better CampTix attendee CSV, that only has the data needed. Let them customize which data fields to include.
2) Take the generated CSV and runs the script to slurp Gravatars and generate the final CSV. Prompt for the filesystem path they want to use. Send zip file.

After this is done, the documentation should be updated to reflect the new process.

In terms of architecture, my initial thought would be to build an independent plugin that extends the CampTix_Addon class.

Attachments (2)

patch_262_meta.diff (21.4 KB) - added by bansod_deven 4 years ago.
Patch for #262 Meta
262.2.diff (8.6 KB) - added by iandunn 2 years ago.

Download all attachments as: .zip

Change History (17)

#1 @bansod_deven
4 years ago

  • Keywords needs-testing dev-feedback added

Patch Added

Changed Steps will be :

  1. Go to Tickets > Tools > Export Selected Columns
  2. Select Columns to Export from all Columns
  3. Select Questions to Export from all Questions (Blank if the ticket does not have that question)

Here, the fields needed in InDesign Badge making (i.e. Columns 'first_name', 'last_name', 'email', 'twitter') are checked by default.

  1. If you want to fetch the Gravatars of the attendees too, then check the Checkbox.(checked by Default)
  2. Select the Folder where Temporarily ZIP file contents can be stored on the server. (Should have adequate permissions.)
  3. Click Generate CSV/ ZIP. This generates a CSV if the Gravtars checkbox is not checked. Or else generates a ZIP containing the CSV for InDesign and the Gravatar Images that were pulled using the Email IDs.

Testing and Feedback needed though. Any Changes that the past organizers would like to suggest, please post them here, I will surely try to include them.

4 years ago

Patch for #262 Meta

#2 @bansod_deven
4 years ago

Have made out the Patch with the above mentioned Process as a Plugin available at :
Camptix - Fetch and Export Addon

Have submitted it for Plugin Review too.

Also, can anyone please confirm if I am moving in the right direction or suggest any changes regarding the patch as well as the new process.

#3 @iandunn
4 years ago

  • Keywords good-first-bug added; needs-testing dev-feedback removed
  • Owner set to iandunn
  • Status changed from new to accepted

That's awesome, you've made great progress on this :)

Here's what I think the next steps are:

  1. PHP doesn't come with ZipArchive activated by default, so we should display an error message on the page if it's not available.
  2. A lot of the columns would never be used on a badge, so we should only have options for the relevant ones:
    • First and Last name
    • E-mail Address
    • Ticket Type
    • WordPress.org Username
    • Coupon
  3. We don't need an option to 'Include Gravatars', since the whole goal of this ticket is to get them.
  4. If a camp has hundreds or thousands of attendees, the script will take a very long time to run, so we shouldn't make the user wait that whole time.

    Instead, after they submit the form, we should display a message saying that the script is running, and to check back in a few minutes. Then, we can fire off an asynchronous process to generate the zip file.

    Once that's done, we'll show the user a link to download the file through their browser, rather than the pending message. This is also more user-friendly than asking them to download the zip file over s/FTP.

    We can't store the zip file in wp-content, though, because that would expose any private information (like e-mail addresses). So, instead the file should be stored in get_temp_dir(), and then the download link will actually be a form submission, and the function that handles the POST will just output the zip file contents as a download, similar to how the regular Export tool works.
  5. The plugin should usleep( 100000 ) just like the CLI script did, so that Gravatar.com isn't flooded with requests.

#4 @valeriosza
4 years ago

  • Cc valeriosza@… added

#5 @iandunn
3 years ago

The script has had some updates lately, so those will need to be incorporated into the patch too.

#6 @iandunn
3 years ago

Related: https://make.wordpress.org/community/2016/02/12/name-badges-are-hard-to-make-and-confusing-for-organizers/

One idea that came up there was using the Customizer so organizers could design the badge colors, fonts, etc

#7 @iandunn
3 years ago

There's a new tool for creating badges in HTML/CSS, so the InDesign script should be integrated with that, rather than being a separate plugin.

#8 @iandunn
2 years ago

In 4316:

CampTix Badge Generator: Move attendee data functionality to common.php

This makes it accessible by both the HTML module and the InDesign module.

See #262

#9 @iandunn
2 years ago

In 4326:

CampTix Badge Generator: Add core functions for generating InDesign badges

See #262

2 years ago

#10 follow-up: @iandunn
2 years ago

  • Priority changed from normal to high

r4326 merged and improved the core functions from the old bin script, so this just needs UI now.

262.2.diff contains a notes and stubs to establish a direction for that.

#11 in reply to: ↑ 10 @cwittie
22 months ago

Replying to iandunn:

r4326 merged and improved the core functions from the old bin script, so this just needs UI now.

262.2.diff contains a notes and stubs to establish a direction for that.

Can you confirm that by UI, you just need a PNG mock-up of a badge design?

This ticket was mentioned in Slack in #community-events by bph. View the logs.

21 months ago

#13 @iandunn
21 months ago

No, this plugin doesn't actually interact with the InDesign file, it just generates the CSV file that gets imported into InDesign's data merge tool.

The UI that's needed is the interface for the plugin itself, within wp-admin. Right now, the only interface available is WP-CLI commands that only a few people have access to run.

#14 @iandunn
18 months ago

  • Owner iandunn deleted
  • Status changed from accepted to assigned

#15 @iandunn
6 weeks ago

At this point, I'd probably discard 262.2.diff and start from scratch with a React/REST based solution, since this page will benefit greatly from interactive flow, and

Conventions for that are still being established, though, so it'd be good to get feedback early-and-often as the patch develops.

Note: See TracTickets for help on using tickets.