Tag Archives: Blogging

Simple Way To Display Medium Images In TDO Mini Forms

I am in the process of building a new web site and wanted a way to let visitors submit photos and videos to the site via a submission form and have that form create a draft post that I could later moderate and publish in WordPress. I found a WordPress plugin that had all the functionality I was looking for in TDO Mini Forms. This plugin allows you to customize forms for your website that will allow non-registered users and/or subscribers to submit and edit posts and pages. The submissions can be kept as drafts or published automatically.

I built a form with the plugin that lets visitors upload a file, add a title, description, tags and categories, and then verifies that they are human with reCaptcha. When submit is clicked it sends the post off to WordPress to be moderated. The only problem I had was that I could only get the post to display the thumbnail of the image submitted and not the medium or large size image that is generated by WordPress when you upload an image. After a while of poking around forums and messing with code I came up with a simple way to display the large image in the post and even have it link to a larger image displayed with Lightbox without modifying any code.

Here are the settings I used in the Upload Files Widget in TDO Mini Forms. The two important ones you need to have checked are “Insert Uploaded Files as Attachments on post” and “Add thumbnail as download link to post content“.

tdo1

Since I had no need for thumbnails on the site I’m building I decided I could change the setting for the thumbnail size to be a medium size and eliminate the medium size altogether. (At first I tried to change to thumbnail size to zero and force TDO Mini Forms to use the medium image, but it inserts a height=”0″ attribute into the image tag which, in effect, displays nothing.) These settings are in your WordPress dashboard, click Settings > Media. I changed them to: Thubmail 600×600, Medium 0x0, Large 1024×1024. Continue reading Simple Way To Display Medium Images In TDO Mini Forms

Now Mobile Optimized

StrykerOnline now has a mobile version of the site optimized for viewing on mobile phones.  Since mobile devices typically have smaller screens and less bandwidth then a PC,  having a simpler mobile version of a site can make the site more legible and load quicker for mobile users.  You can view the site on your mobile device using the URL m.strykeronline.com or use StrykerOnline.com, but the website will detect your mobile browser and redirect you to the mobile site automatically.  You can always switch back using the links at the bottom of the page.

This is a 2D-barcode containing the address of the  mobile site.   If your mobile phone has a QR barcode reader,  simply snap this bar code with the camera and launch the site.  For more info on mobile tagging check out this Wikipedia article.

Website Redesign

I have redesigned the web site with a whole new look and some new features, built in font resizing, hiding menus and drop down navigation. It’s a bit lighter and hopefully more readable. This layout has only one column on the right side so I could better use the main content area without trying to squeezing the content in. The new layout should make navigation easier as well. Have a look around and let me know what you think by leaving a comment.

Also, a new update to the photo album coming soon.

WP-PageNavi & Posts_Nav_Link in WordPress

I’ve been using the built in posts_nav_link tag in WordPress now for a while to do paged navigation. It will provide links for next and previous pages wherever you place it in your theme but will do nothing more, ie: (&#171 previous next &#187). I wanted something that would provide better pagination and found a great plugin called WP-PageNavi by Lester Chan which provides a more advanced paging navigation, ie: (Page 1 of 10: [1] 2 3 4 » … Last »).

The problem was I wanted to use the WP-PageNavi plugin but be able to fall back to Post_Nav_Link if the plugin was disabled or not running for whatever reason so the site wouldn’t be without navigation. The solution is using both tags in an if/else statement and placing it in your theme wherever you want the navigation to appear. Below is the code I am using to do it, hopefully someone can get some use of it.

<?php if (function_exists('wp_pagenavi')) { wp_pagenavi(); } 
else {echo '<div class="alignleft">';posts_nav_link('','','&laquo; Previous Entries'); 
echo '</div><div class="alignright">';posts_nav_link('','Next Entries &raquo;',''); 
echo '</div>'; } ?>