Reflection-Mod Photoblog Theme Changelog
Changes in Reflection-Mod 1.2 (January 31, 2009)
- Lightbox (SlimBox) effects can be enabled for Category/Tag archive galleries: New in version 1.2 is an option in the admin panel to enable a lightbox effect for quickly browsing through images in your category/tag archives.
- Disable/Enable automatic display of Shot Info (Post Text) with Photoblog Image: Admin panel option to enable or disable the automatic display of your Shot Info/Post text along with the photoblog image. Gives you this option depending on whether the image is of utmost importance or whether you prefer to display both the text and image as a single combined entity.
- Enable/Disable EXIF link in Photoblog
- Latest Theme Version Box in Admin Panel: The theme admin panel now displays the latest available version of Reflection-Mod with a link to the download page. Now you will always know if you have the latest version of the theme without having to actively check my site.
Changes in Reflection-Mod 1.1 (January 24, 2009)
- Implemented a multi-level CSS drop down menu: capable of displaying multiple levels of pages in the navbar.
- Improved compatibility with older versions of PHP: Introduced an option in the Admin panel to turn of AJAX browsing of images which should make the theme compatible with practically all webhosts and PHP versions.
- Ability to change image quality: Implemented an admin menu option enabling the user to specify the image quality of images. Higher quality images will take longer to download. Can be optimized for a given webhost’s speed/performance.
- Support for a lower navbar: Make a separate unordered list in header.php with an id of “navbar2″ to create a second set of hard coded links in the lower row of the navbar. Can be useful for integrating the photoblog with a regular text-blog running the Refractal theme.
Changes in Reflection-Mod 1.0.4 (July 26, 2009)
- Improved PHP Compatibility: Added JSON encoding function to help with AJAX compatibility for people with PHP version 4.
- Disable Mosaic Grouping by Year: Added an extra option in the Admin menu to disable the grouping of thumbnails by year. They are still ordered chronologically but will be presented without any sub-grouping.
- Fixed a minor bug with the dynamic loading of comments. Previously, the homepage would load comments in a chronologically ascending order while the dynamic comment loading was in the reverse order. This has been fixed so that comments are always loaded in Ascending order so that the latest comments are at the end.
Changes in Reflection-Mod 1.0.3 (July 05, 2009):
- Fixed a bug with the Enable/Disable function for “Latest Page” hyperlink display in the header. Thanks to Tuan for pointing it out.
Changes in Reflection-Mod 1.0.2 (June 26, 2009):
- Enable/Disable Reflection Effect: Added a checkbox in the Admin menu to disable the image reflection effect in the theme. This is for the people who prefer a simple look with just the image displayed.
- Minor tweak with Sidebar dimension/positioning. The previous version had a slight bug which made the “Info” hyperlink a little difficult to click since part of the hyperlink was being masked by the sidebar.
Changes in Reflection-Mod 1.0.1 (May 22, 2009):
- The Tag and Category archive has an upper limit on the number of posts to be displayed. This can be set in your WordPress Dashboard->Settings->Reading->”Blog pages show at most”. See the thumbnail below:
- The original theme (1.0) did not have an in-built pagination feature if you wished to limit the tag archive display to a smaller number (for example: 49 thumbnails). I have built this in so you will have navigation hyperlinks popup below the thumbnails if there are any more thumbnails within the tag/category archive. Check the thumbnail below to see how it looks (I set max thumbs to 4 to demo it on my photoblog)
Thanks to Martin Klein for bringing this to my attention.
Changes in Reflection-Mod 1.0 (May 19, 2009):
- Enabled Category listings. When browsing images in a category, Prev/Next image links allow you to browse single images within the same category. I think this is a key feature missing in almost all WordPress photoblog themes (Even Pixelpost). Note: You need fancy permalinks enabled in WordPress for this to work. If you have the default permalink structure, in-category browsing will not work.
- Enabled Tags listings. While you can browse an archive thumbnail page for all images with the same tag, you cannot browse within the same Tag archive by clicking on Prev/Next. This is currently a limitation of the WordPress hooks for getting posts by Tags.
- Widget ready sidebar included in the theme. While I prefer to have a completely uncluttered look, I have enabled it to show how it looks. You can use any widget you like.
- Random images hyperlink now displays a slick slider that pops down with 7 thumbnails of random images from your archive. This allows the user to select an interesting image out of an assortment of random images.
- Comments and Image Info are now dynamically loaded while browsing and are hidden by default. Clicking on Comments/Infos hyperlinks invokes a slider animation which displays the comments/Image info.
- Modified Fonts/Font sizes for a better/slicker look (IMHO)
- Neat slider animations (Javascript – MooTools 1.11) for the Category and Tags listings
- AJAX effects are persistent throughout the browsing process. In the original theme, clicking on Archives/Comments, etc would break the AJAX browsing mode and would switch to regular page loading.
- All pages are automatically listed in the NavBar on the top-right.
- New Admin Menu for theme: Now you can control a host of options from the Admin menu such as Copyright Information, enabling/disabling tags, categories, sidebar, etc. This means you shouldn’t have to meddle with the actual theme code.
- Support for IE6: Although the Prev/Next Overlay on images is broken in IE6, the panel above the image is positioned correctly and the viewer can still browse the AJAXified site by using the << Prev | Next >> Hyperlinks. IE6 support is still broken in Reflection 1.1. Unfortunately I’m not entirely sure about which of all the changes that I made fixed this issue for me so I can’t help Dave fix it for Reflection 1.1. However if anyone prefers to use Reflection 1.1, they can feel free to compare the index.php code from Reflection-Mod and Reflection 1.1 to figure it out.
- Downloadable Photoshop Template for creating customized header logo for the theme.
Disabling Comments and EXIF info in Reflection-Mod Theme
If you would prefer disabling the Comments and EXIF hyperlinks for whatever reasons, then it is fairly straightforward to do so. Open up index.php in your themes/reflectionmod folder and delete the lines below:
<li><a id="comment" href="#"><?php comments_number('0 comments','1 comment','% comments');?></a></li>
<li><a class="panel" id="exif" href="">Exif</a></li>
Re-save the file and clear out your browser cache. Reload your website and the Comments and EXIF hyperlinks should be disabled.
Removing Inline Date in Reflection-Mod Photoblog Theme
By default, the Reflection-Mod theme displays the date of an image post above the image (next to the image title). If you would prefer to not display the date, then you will need to perform a couple of code edits by hand. Unfortunately I can’t enable this as a simple option in the theme administration menu at this time.
First open up index.php in reflectionmod folder and delete the line below:
<span id="inlinedate" style="display:inline;font-size:10px;font-variant:normal;text-transform:uppercase;vertical-align:10%;"><?php the_date('jS F Y');?></span>
After deleting this line, resave the file. Make sure you don’t delete anything else. Now you need to open up blog.js in your reflectionmod/js folder. Find the line below:
$('texttitle').innerHTML = '<a href="' + this.imageinfo.permalink + '">' + this.imageinfo.post_title + '</a><span id="inlinedate" style="display:inline;font-size:10px;font-variant:normal;text-transform:uppercase;vertical-align:10%;">' + this.imageinfo.post_date + '</span>';
Delete that line and replace it with the following line:
$('texttitle').innerHTML = '<a href="' + this.imageinfo.permalink + '">' + this.imageinfo.post_title + '</a>';
Re-save blog.js. Make sure to delete your browser cache and all temporary internet files so that your browser loads up the new blog.js file. You should now have your photoblog without the date stamp on each post showing up.
Removing Mosaic Page Year Groupping in Reflection-Mod Photoblog Theme
Update – This is now implemented as an option within the Admin menu of the Reflection-Mod theme. I have left the information up for those interested in how this was achieved.
In my Reflection-Mod Photoblog theme for WordPress, the Mosaic page defaults to grouping all your photoblog thumbnails by year. If you would prefer not having any such grouping and would just like a simple display of all your thumbnails all you need to do is edit mosaic.php in the reflectionmod folder and delete the lines below:
$this_postyear = intval(substr($post->post_date, 0, 4));
if ($this_postyear != $postyear) {
$postyear = $this_postyear;
echo '<h2 class="mosaicheader">'.$postyear.'</h2>';
}
That’s it! Enjoy your tweaked photoblog
How to setup Low-tech Planted Aquariums
Click Here if you are looking for my guide on Low Tech Planted Tanks. If you are looking for my article on Low Tech+Excel tanks, click here. I hope you found my article on setting up a low-tech planted tank to be helpful. If you have any questions/comments/thoughts or suggestions, please leave me a comment on this page and I can get back to you. Don’t feel intimidated by the massive wall of text in the article. Planted tanks really aren’t all that complicated. The hardest part is putting all the information together, reading it and understanding the basics and science of planted tanks. That hard works been done by me
so read the article and go setup your Planted masterpiece!
Lastly, it might give you more confidence to know that the tank pictured above is my very first planted tank (and only my second attempt at keeping an aquarium ever)! Good luck!
Restricting Access to WordPress pages only after login
This post describes how you can modify the wp_list_pages() function of WordPress so that it lists normally hidden pages if the user is logged in (You can hide pages from the administrator panel, or more easily using the excellent Pagemash plugin). Thus you can restrict access to certain pages on your site unless the user is logged in. What is also great about this method is that since we modify the wp_list_pages function it also hides these restricted pages in the navigation bar/ pages widget of your site (Assuming they generate the list using wp_list_pages, which is usually the case). The wp_list_pages function is in the file post-template.php which can be found in the wp-include folder of your WordPress installation. Rename the current file as post-template-old.php or something similar in case something goes wrong.
Now all you have to do is open the file and look for the following block of code:
// Allow plugins to filter an array of excluded pages
$r['exclude'] = implode(‘,’, apply_filters(‘wp_list_pages_excludes’, explode(‘,’, $r['exclude'])));
What this code is doing is basically setting the exclude variable with a list of the page IDs of the pages listed as hidden in the administrator section of WordPress. What we want to do is modify this so that these pages are excluded (i.e. hidden) only if the viewer is someone who isn’t logged in. If the person is logged in then we would like for all the hidden pages to be displayed. To do this replace this block of code with the following:
if (is_user_logged_in()) {
$r['exclude'] = ”;
}
else {
$r['exclude'] = implode(‘,’, apply_filters(‘wp_list_pages_excludes’, explode(‘,’, $r['exclude'])));
}
All we are doing is using the is_user_logged_in function to either set none of the pages to be excluded (for the case that the person is logged in) or we exclude the pages marked as ‘hidden’ from the sight of regular visitors. So to use this method to make pages only visible to logged in visitors you will want to hide all these pages. I would also recommend setting them as ‘private’ to prevent someone from guessing the page ID and accessing the restricted pages. I would highly recommend complementing this method with use of the Sidebar login widget. This widget creates a nice login panel in your sidebar. Once the user logs in, your newly reloaded page will automatically update the navigation bar and the page widget in your sidebar to list the previously restricted pages.
The main drawback here is that now you cannot have other pages that are hidden from logged in visitors. However it shouldn’t be too hard to modify the if->else statements above to tailor it to your requirements. Please my knowledge of PHP is absolutely zero and I only figured this out because it required a very simple piece of code. Also, this technique obviously won’t work with blog posts. However it shouldn’t be too hard to make similar if->else statements in your PHP files so that some posts/post categories remain hidden from users who aren’t logged in.
If there are any php-gurus out there who read this, please do chip in with some ideas on how you can extend this to do more complex stuff. I would be especially interested in how one might go about using a similar method to hide posts and categories from regular site visitors.
Edit – Turns out there is a plug-in for doing similar stuff called page-restrict. While it does restrict page access to logged in users it doesn’t seem to hide these restricted pages from the view of visitors who are not logged in. Personally I’m not a big fan of letting users know what the title of the restricted pages are, and also having them know that I am intentionally excluding them from some content on my site.





