Featuring my favorite pictures
(featuring a keyword gallery)
I wanted to have a section on my home page which featured my favorite pictures… but I didn’t want to go through the labor of duplicating each picture into a new gallery to feature. After doinking with CSS for a while (and coming up very empty handed) I stumbled across David’s automatic “recent” featured gallery. Brilliant! As a result, I give all credit to David since I really just trimmed and modified his code for this. Basically I modified David’s code to show a keyword gallery instead of a timeline gallery. You could, of course, use this for any keyword you choose.
You can see it in action on my site.
Instructions
Requirements: A smugmug power user account and a sense of adventure.
Steps:
- Download the two pre-made smugmug files for this:
- for the custom JS field: forJavaScriptSection.txt
- for the footer field: forFooterSection.txt
- Log into your smugmug site (sure, obvious)
- Click the control panel link
- In the “organize & customize” section, click the “customize” link.
- Open smugmug file “a” using notepad (Windows) or TextEdit (Macintosh)
- Copy all the text from smugmug file “a” (forJavaScriptSection.txt) and paste it into the javascript section of the customization settings page
- Modify the second-to-last line of the text you just pasted to include your own gallery title, description, keyword and thumbnail
i.e. Change the variables for the function “addKeywordFeatured” - Copy all the text from smugmug file “b” (forFooterSection.txt) and paste it into footer section of the customization settings page
- Modify the footer section to change the square brackets ([ ]) to angle brackets (< >)
i.e. [script] becomes <script> - Click the “Update” button at the bottom of the customize page
- Finally, make sure you have at least one of your galleries featured. The technique I used requires the featured section to exist.
Note: If you don’t want to have featured galleries and would, instead, like to have your favorites gallery included in the “gallery categories” section I’ve created a separate set of JavaScript you should instead use in step 6: forJavaScriptSection-Gallery.txt.