Project:Navigation Galleries

From CoMakingSpace Wiki

(Redirected from Navigationsgalerien)

ProjectInfoBox

Galleries for Visual Wiki Navigation

Project gallery.png
Status: ongoing
(restart of Project:Multi-Photo Imagemaps
with a much more practical approach)
Release Date: semi-automated: 2019
automated: 2021
Initiator: Lukas
Team: Martin, Rudy, Stefanr
Materials Used: photos
Tools Used: cameras, e.g. DSLR
Software Used: MediaWiki, Semantic MediaWiki,
Python (legacy)
Approx. Cost: 0 €


Let's try to improve visual navigation through this wiki, but in a much easier way than originally tried with Project:Multi-Photo Imagemaps!

Imagemaps of multiple photos did solve some problems, but are still too hard to modify for anyone to actually do it - you'd have to download the original GIMP files, add a new photo (or better several ones so it would still look okay), upload everything again, overhaul the embedding code, ...blah.

Instead, let's use the photos we already have (e.g. in InfoBoxes) in automatable "Navigation Galleries"!

There's a little template for easy linking to this documentation page: just insert {{NavGal}} on any relevant page.

Manual Assembly

We already had a few such navigation galleries before "opening" this project, e.g. disambiguation pages or Lukas' project overview.

It's definitely possible and not too difficult to make the galleries by hand in slowly evolving cases like these!

Simply use the gallery syntax and make sure you include a link to the page you want to direct readers to, so they don't just see the page with photo information:

<gallery mode=packed-hover heights=150 caption="optional 'headline' - enter what you want">
File:example1.JPG|link=[[Example Tool]]|here's room for a photo-specific caption...
File:example2.JPG|link=[[Different Example Tool]]|...and here you put the next photo's caption!
</gallery>

The exact formatting here is just an example of course, whatever works will surely be appreciated by the next page visitor!

Advantages of the manual approach are mainly A) ease of use (requires nothing but a wiki account) and B) the flexibility to assemble the gallery out of any photos and captions you like.

Pages in Need

Here are some of our pages where such a gallery would be nice (feel free to add more):

Automated Assembly (SMW)

We can automatically generate nice galleries with Semantic MediaWiki! For good results, all pages should have ONE value for each of these properties:

  • Has image
  • Has German [not used for projects]
  • Has caption

All of these values are usually set automatically by the MachineInfoBox or ToolInfoBox (parameters image, german, and the page name) or ProjectInfoBox (parameters image and project title [no second language]).

Examples

Overriding InfoBox Automation

InfoBoxes may generate poor gallery elements if...

  • there are multiple InfoBoxes on a page
  • the page name is not a good English caption
  • ..?

You can therefore inhibit the influence of any such InfoBox on the page's SMW parameters by adding a value for the extrabox parameter. The box will appear just the same to a reader of the page, but its image/caption/German caption will not appear in SMW galleries.

If you turn all InfoBoxes on a page into "extraboxes", the page will only look nice in galleries if you set the properties by hand, e.g. at the very bottom of the page:

{{#set: 
|Has image=File:Metabo BS 1638 W.jpg
|Has caption=Bandsaw (Wood)
|Has German=Bandsäge (Holz)
}}

Outsourcing Parts of a Page

There may be cases where we want to have several InfoBoxes on the same page, but also have several of them appear in galleries. An example of this were our bandsaws that are located in two different areas (wood and metal) and it was later proposed to expand this structure to all machines. For details, see this and the following comment on the corresponding issue - in short, here's what to do:

  1. split the page into one page per section
  2. start each sub-page with a heading in target format (usually == h2 ==)
  3. set a common property for the sub-pages (e.g. MachineType) and end with <br clear=all>
  4. insert an embedding query for pages with this property, making sure to include an explanatory comment for other editors and to use embedonly=yes and a leading <br clear=all> tag (not always necessary, but better safe than sorry)


Here's an example (from "Bandsaws")
a) end of each sub-page:

<br clear="all" />
{{#set: 
MachineType=Bandsaw
|Has caption=Bandsaw (Wood)
|Has German=Bandsäge (Holz)
|Has image=File:Metabo BS 1638 W.jpg
}}

b) on the summarizing page:

<br clear="all" />
<!--  NOTE: The following block "imports" content from separate pages - please don't change the code! To edit the actual information, please go back and click "edit" next to the section headline you are interested in :-)  -->
{{#ask:
 [[MachineType::{{PAGENAME}}]]
 |order=ascending
 |format=embedded
 |embedonly=yes
}}

Semi-Automated Assembly (Python Script)

Lukas started and never really continued once results got okay to develop a script (using Martin's "wikicrawler" for our QR code printouts as a starting point) that automatically goes through certain wiki pages and gives out the wiki code for a large navigation gallery when you run it.

A first example was the "Project:" namespace, which is quickly filling up with awesome members' projects that were unfortunately not very visible before generating such a gallery on the Projects page (check out how this looked before we fully automated it). In general, many namespaces or categories could benefit from such a possibility!

This approach is not really in use anymore since we figured out the fully automatic way.

  • advantage: customizable aesthetics (more "modes" than the SMW approach allows so far)
  • disadvantage: manual execution and copy/pasting required for each update

(Planned) Features

  • project gallerizer
    • filtering of insufficient pages (no ProjectInfoBox, default image, no image) ✔
    • alphabetical gallery generation ✔
    • randomized gallery generation ✔
    • "recently updated" gallery generation
    • topic-based gallery generation, e.g. "woodworking projects"
  • (later) equipment gallerizer
    • e.g. all power tools

The current code can be found on GitHub: comakingspace/Navigation-Galleries.

Further information & discussion in issue #96 (closed)