Yearbook database style, Round two
July 18, 2017 6:10 AM   Subscribe

I asked this question before, but have surrendered to the idea that I need some kind of database: "I want to make an online directory that allows me to simply post a large directory of listings featuring a photo, name, and short description (akin to how old year books looked)."

This doesn't change the fact that I don't know how to build databases or make anything like this. One person mentioned "XML + XSLT," but google results frightened me away. If I'm going to try to make this myself, what should I be looking up? What is the easiest way to do this? How can I make this happen?
I can handle css, some jquery, and html. I want people to be able to quickly find entries (by state, city, name, etc), and have the database spit out what looks like yearbook entries (with just a tad more text).

Thanks.
posted by history is a weapon to Computers & Internet (10 answers total) 3 users marked this as a favorite
 
You could also do this with a content management system (CMS) like Wordpress, simply with a nice template and a couple of plugins, possibly writing zero code yourself. Each person could be a post, or you could create a custom data type - I think it would work either way. You could use custom fields to store data like city, state, etc. You could display them all like a yearbook page with a custom gallery-type layout.

I always use WP on my own site (I use dreamhost for hosting and they have an easy one-click install process) and I think that will give you more flexibility with plugins and templates - you might not be able to do it all on wordpress.com (their hosted version).
posted by beyond_pink at 6:17 AM on July 18, 2017 [4 favorites]


Awesome Table lets you take a google spreadsheet and display it on the web in multiple ways. I think the "cards view" template could easily be modified to look like you want.
posted by Sophont at 6:25 AM on July 18, 2017 [4 favorites]


This doesn't change the fact that I don't know how to build databases or make anything like this. One person mentioned "XML + XSLT," but google results frightened me away.

you have chosen wisely
posted by thelonius at 6:29 AM on July 18, 2017 [3 favorites]


Googling "Yearbook theme wordpress" brings up some options that are probably worth investigating.
posted by COD at 6:37 AM on July 18, 2017 [2 favorites]


Is your goal a) to learn some about how a website works, b) to build a massively scalable website that'll handle thousands of hits per second, c) to quickly and easily get a small website up and running, d) other?

If you're choice is 'a', mySql need not frighten you away. Try this tutorial: https://dev.mysql.com/doc/mysql-getting-started/en/ .

If 'b', yeah, lots more discussion required.

If 'c', possibly wordpress, or possibly also msSql if you already know html, css, jquery, etc.
posted by at at 7:44 AM on July 18, 2017


This is basically a CRUD app (create, read, update, delete).

Look at Ruby on Rails, Django, or Phoenix.

You're going to have to learn to program. Rails is probably a decent framework to learn how to program on. It's what I did 10 years ago. There are a million Ruby on Rails tutorials out there. Google around for recent ones that include logins and user profiles.
posted by empath at 8:06 AM on July 18, 2017


I want people to be able to quickly find entries (by state, city, name, etc), and have the database spit out what looks like yearbook entries (with just a tad more text).

I want people

Here's the big question that you haven't specified: Which people? You and your friends? Members of a local organization you belong to? Are you hoping for this site to get the attention of the wider internet and become known to thousands or even millions of people? Who the user is matters. Rails is potentially a good solution for this, but is way overengineering the solution if you don't already know Rails and you only intend it to be used by a couple people--and if you want this to be a big deal, Rails without professional expertise might not be enough.
posted by Sequence at 8:25 AM on July 18, 2017


It's hard to give feedback without a bit more details. Basically what you want to do is simple enough that there are a million ways to do it, but complex enough/special enough that few do it right out of the box.

Other options to look in to might be site generators (like Jekyll or Hugo) with photo gallery plugins, or some kind of self-hosting setup like NextCloud.

As 'at' noted, a lot depends on how you intend for it to be used, and whether you need people to be able to edit it themselves.
posted by ropeladder at 9:43 AM on July 18, 2017


This is a non-trivial undertaking if you're starting from scratch in terms of learning the database/programming side of things. You'd learn a lot but it sounds like learning is not really your priority here... rather than trying to get up to speed with all of the various parts of a MySQL/web programming/Jquery/CMS thing, I'd suggest maybe putting your yearbook-type data into a CSV file and using Jekyll, which is more of an old-school approach; it's a command line program that merges various data with templates to generate plain old HTML files which you can then upload to your site. That includes the ability to use CSV files as a data source.

Caveats:
  • If your directory changes frequently this will be kind of a pain to maintain; each change to the directory would require re-running Jekyll and re-uploading the generated pages.
  • It won't by dynamically searchable/sortable, if that matters.

posted by Funeral march of an old jawbone at 9:43 AM on July 18, 2017


My favorite tool for this sort of thing is Drupal. (It's entirely possible you could do this easily in Wordpress, as beyond_pink says, but Drupal is my personal favorite.)

Here's how you would do it in Drupal:

* download Drupal
* install it using the handy online documentation - note that you will need to CREATE a database (if you have a cPanel, this should be fairly easy) but you won't have to touch it directly after that
* define a new content type (Entry or Person or whatever) at Structure > Content Types > Add Content Type (or use the pre-installed Article content type, which already has a title, body, image, and tags) - Note: I'm assuming here we're going to use the Title field for the person's name; if you don't want to, you can certainly add an additional name field (or two, First and Last)
* if you're defining a new content type, add an image field for the image using Structure > Content Types > Entry (or whatever you called it) > Manage Fields
* start loading up your data using Content > Add Content
* now, set up your listing using Views: go to Structure > View > Add New View
* give your view a name and click Create a Page - enter a title for your page (Yearbook Entries or something) and a path (listing or search-results or whatever); under Display format, change teasers to fields - you can change the Display format if you want, but you'll get to play with that later; then click Save and Edit
* in the Fields section, you should already have Title selected; click Add and add the image and description fields
* in the Filter Criteria section, click Add, then choose Title from the list (you'll want Title > Content, not Title > Content revision), then click Add and configure filter criteria
* in the Configure dialog, click Expose this filter to visitors. You can change the Label if you like (say, using Name instead of Title). Now, change Operator to Contains, then click Apply.
* finally, click Save

You can preview the results of your listing right there at the bottom of the page where you build your view. This lets you play with the output - for example, you could try different Format options, like Grid or Table, instead of Unformatted list.

You mentioned being able to search by state or city - so now go back in to your content type and add fields for state and city, then go back into your view and add those fields as well, both to the Fields section (so the viewer can see them) and to the Filter Criteria section (so the user can filter by those fields).

There's a ton of ways to customize this further, but that should get you started. There are also ways to import data - although importing is a lot more robust in Drupal 7 (using the Feeds module), so if that's how you want to get your data into your system, I recommend Drupal 7 instead of Drupal 8.

Learning how to work directly with databases is huge fun and I highly recommend it - but if all you want to do is get this up and running quickly, this is one way to do that.

Good luck!
posted by kristi at 10:47 AM on July 21, 2017


« Older Beer (and food) in the evening (in London).   |   Betrayal: Films and books with accurate responses... Newer »
This thread is closed to new comments.