Responsive CSS Timeline

responsive-css-timeline-scr

What is it?

Create beautiful and simple timelines with the Responsive CSS Timeline. It works on all screen sizes and adapts to browser font size settings. It is easy to integreate and will not conflict with existing css and html. Check out the demo and download now. Feel free to leave a comment if anything is unclear

Read More

Superboxes – Beautiful Content With CSS

superboxes-scr

Centering elements with css

Centering elements with css is not as easy as it should be. For example, centering a heading in the middle of a div can actually be quite frustrating. Vertical align will not work in a standard div. However, the simple technique in this article can be used to build lots of cool stuff. Let’s first look at the basics, and then build some beautiful css boxes using this technique. (You can download all the examples in this article and use in any way you want. Scroll down to see examples). I call them Superboxes. Please share if you like, and comments are always welcome. Enjoy!

Read More

Tormek T-4 Review

tormek-t4This is a quick review of the Tormek T4 sharpening machine. This machine comes in three models T-3, T-4 and T-7. The T-4 is an enhanced model of the T-3, and the T-7 is a bigger machine.

Read More

Custom Post Type in WordPress

This WordPress function will add a custom post type using default categories to your admin panel (change values as preferred)

Paste this code in functions.php:

function mega_articles_init() {
$args = array(
'label' => 'Mega Articles',
'public' => true,
'public_queryable' => true,
'menu_position' => 5,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => array('slug' => 'articles'),
'query_var' => true,
'menu_icon' => 'dashicons-book-alt',
'has_archive' => true,
'taxonomies' => array('category', 'post_tag'),
'supports' => array(
'title',
'editor',
'excerpt',
'trackbacks',
'custom-fields',
'comments',
'revisions',
'thumbnail',
'author',
'avatar',
'page-attributes',
)
);
register_post_type( 'mega-article', $args );
}
add_action( 'init', 'mega_articles_init' );

// use default categories and tags with custom post types
add_action('init','add_categories_to_articles');
function add_categories_to_articles(){
register_taxonomy_for_object_type('category', 'mega-article');
}

Get Metadata From Photos in WordPress

This code snippet pulls out metadata from photos automatically. If no ISO metadata is found the code assume that the metadata is stripped out from the photo, and nothing will be displayed.

Use this code in image.php or attachment.php where you want to display the metadata:

<!-- Metadata from photo -->

<?php $meta = wp_get_attachment_metadata($id);

// Display metadata only if iso value is greater than 0
if (($meta[image_meta][iso] != 0)) {

echo "<div style='border-top: 1px solid #ddd;clear:both;margin-top: 20px;padding-top: 20px'>";

echo "<p>".$meta[width]." x ".$meta[height]." px</p>";
echo "<p>".$meta[image_meta][camera]."</p>";
echo "<p>".$meta[image_meta][focal_length]." mm &commat; f/".$meta[image_meta][aperture]."</p>";
echo "<p>ISO  ".$meta[image_meta][iso]." &commat; ";

// shutter speed handler
if ((1 / $meta['image_meta']['shutter_speed']) > 1) {
echo "1/";
if (number_format((1 / $meta['image_meta']['shutter_speed']), 1) ==  number_format((1 / $meta['image_meta']['shutter_speed']), 0)) {
echo number_format((1 / $meta['image_meta']['shutter_speed']), 0, '.', '') . ' sec';
} else {
echo number_format((1 / $meta['image_meta']['shutter_speed']), 1, '.', '') . ' sec';
}
} else {
echo $meta['image_meta']['shutter_speed'].' sec';
}
echo "</p>";

$timestamped = $meta[image_meta][created_timestamp];
$created_timestamp = date("F j, Y, g:i a", $timestamped);
echo "<p>".$created_timestamp."</p>";
echo "<p>&copy;  ".$meta[image_meta][copyright]."</p>
</div> <!-- /image-metadata -->
";
}

else { // echo nothing or custom text
echo "";
};
?>

</div> <!-- /post-meta -->

WordPress: Show Content to Logged in Users Only

Paste the code below in functions.php

add_shortcode( 'member', 'member_check_shortcode' );

function member_check_shortcode( $atts, $content = null ) {
	 if ( is_user_logged_in() && !is_null( $content ) && !is_feed() )
		return $content;
	return 'Sorry, you must be logged in to view this content';
}

Shortcode to show content only to logged in users

[member]

Only logged in users can see this content

[/member]

Read More

Buddypress Force Login

If you have a Buddypress site and want your visitors to register to get access to your site simply add this code to your functions.php

// stop guests from accessing the site, forces them to join
function bp_guest_redirect() {
global $bp;
if ( bp_is_activity_component() || bp_is_groups_component() || bp_is_blogs_component() ||     bp_is_page( BP_MEMBERS_SLUG ) ) {
// enter the slug or component conditional here
if(!is_user_logged_in()) { // not logged in user
wp_redirect( get_option('http://yoursite.com/') . '/register/' );
} // user will be redirect to any link to want
}
}
add_filter('get_header','bp_guest_redirect',1);

How to Make Great Winter Photos

437

Winter is a great time for photographers, with snow and ice transforming the landscape. Winter gives you a lot of creative options and you don’t need an expensive digital SLR camera to take great winter photos. Creativity is more important than photographic equipment. These tips will help you to get more out of your winter photos.

Read More

Lens Compression is a Myth

536

I have seen so many articles and videos trying to explain “Lens Compression”, and  even many experienced and respected photographers can’t seem to get this right. There is a lack of understanding among many photographers on how lenses really work. The lens compression myth never seems to die. Just to make it clear: Lenses does not “compress” anything!

Read More

Building a Large Format Camera in Plywood

_MG_6935-Edit-lys

In these videos I wanted to take my Shapeoko 3 a little beyond carving and making signs. I have built large format cameras before but never with a cnc machine and never in plywood. Birch plywood is beautiful, light weight and affordable. I do use several other tools as well but the main structure of the camera is cut using the Shapeoko cnc. This is also the first time I try to cut brass with the Shapeoko, and it was no problem (even with a tiny 1.8mm bit).

Read More

Page 0 of 2

Powered by WordPress & Theme by Dieter Schneider