Had the oddest thing happen today; The spacebar and option keys stopped working while I was using Illustrator CS4. I did a little searching and testing and found that Firefox (v3.6) was the culprit. I quit FF and the spacebar/hand tool/option keys were back! I was able to restart Firefox and everything is still working fine with both programs running. I'm sure other programs could cause this issue as well. Odd bug that can drive you crazy. Makes you realize how important that little spacebar is.
Archive for the ‘web-development’ Category
Changing Signup/Register Link in WordPress
Mar 4 2010This gets placed in your theme's functions.php… 'Signup' is the text for the register link in this example. 'Logout' is the message displayed when the user is logged in. That could easily be a link to their profile or the admin area as well.
add_action( 'register' , 'register_replacement' );
function register_replacement( $link ){
if ( ! is_user_logged_in() ) {
if ( get_option('users_can_register') )
$link = $before . '<a href="' . site_url('wp-login.php?action=register', 'login') . '">' . __('Signup') . '</a>' . $after;
else
$link = ";
} else {
$link = $before . '<a href="' . wp_logout_url() . '">' . __('Logout') . '</a>' . $after;
}
return $link;
}
My Favorite and Most Used WordPress Plugins
Mar 4 2010login-lockdown – protect your neck
nextgen gallery – great for internally managed photo galleries
tubepress – let youtube handle the bandwidth and conversion please.
eventsmanager (for RSVP type events)
gigpress (for musician-style tours)
capabilities manager – if you have multiple content editors with varying roles.
Mail From – change the default from email address and name.
exclude-pages – sometimes the main nav doesn't need to be that cluttered
user photo – great for adding some personality especially with multiple content authors
maintenance mode – show users something professional while testing and updating
shadowbox js / lightbox PLUS – sexy photo/video presentation
advanced twitter widget – meh. it works well for client managed twitter feeds.
Register Plus – get all the info you can from your users
all in one SEO pack – what good is a site if no one finds it
kadom-ads-management – if you have savvy enough admins to manage their own ad space
wp super cache – great for high-traffic sites but can cause issues with some plugins
formbuilder – submits forms via email and to the db. export to csv. nice.
FeedBurner FeedSmith – if you're into feedburner for rss feed management. This plugin works excellently.
Excerpts and Read More Links in WordPress 2.9+
Jan 12 2010With the release of WordPress 2.9, there have been a couple nice little enhancements to excerpts. It's now very easy to change the good old [...] to whatever you'd like including a simple "More" link that links to the post. It's also now just as easy to control the length of the excerpts as well. Simply use the code below as a starting point. Place this code in your theme's functions.php
function new_excerpt_more($more) {
return '… <a href="'.get_permalink().'">MORE</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');function new_excerpt_length($length) {
return 30;
}
add_filter('excerpt_length', 'new_excerpt_length');
Moving a WordPress Site
Dec 17 2009I love WordPress and I use it pretty much exclusively for small to mid-sized website development. Wordpress development is quick, easy and website owners love the fact that there's none of the complications that come with proprietary content management systems. Sometimes it becomes necessary to move your beloved WordPress sites to other servers or directories. I've found many online resources elaborating on this topic including the WordPress docs themselves. I prefer to have a quick reference guide for my own purposes though. I've given credit and links where applicable.
If you're moving a WordPress site to a different server or a different directory on the current server there are several steps to go through to ensure that everything works correctly on the other side of the move.
The Database Edits: (from My Digital Life)
SQL From phpMyAdmin or similar: (in phpMyAdmin go to the top level of the database by clicking on the db name and click on the "SQL" tab. don't forget to add the appropriate db table prefix if different from the default wp_ )
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
On occasion you may need to add this to your config.php file: (from the WordPress Codex)
define('WP_HOME','http://www.new-site-location.com');
define('WP_SITEURL','http://www.new-site-location.com/subdirectory-if-applicable');
Sometimes it's necessary to update permalinks by simply going to SETTINGS > PERMALINKS and clicking on SAVE CHANGES. you don't have to change anything, just click the button. Not sure why but it works.
The WordPress Codex has a detailed article on moving WordPress available.
Don't forget to check your theme files (and Flash!) for hard-coded file paths.
Fixing Color Shift With Photoshop Save For Web
Oct 12 2009UPDATED 11/7/09
I have linked to an article below that sheds some light on the whole washed-out color when using Photoshop's Save For Web. I'm not an expert on color space this and profile that. I just want to design in Photoshop and create an optimized image that looks like what I designed. I recently upgraded to CS4 and I've found that this is much easier in this newer version of Photoshop.
I have Photoshop CS4 set to ask me about profile mismatches (under EDIT > COLOR SETTINGS), and if I'm working on an image for the web I just "discard the embedded profile (don't color manage)" when it asks me upon opening an image. Then I'm able to just uncheck the "Convert to sRGB" checkbox in the Save for Web" dialog window and everything usually turns out great.
When I was using Photoshop CS2, consistent color via save for web seemed to be much harder to achieve. A few tricks (mentioned in the article below) are to make sure your document is using the sRGB-IEC61blahblah2.1 profile. Find this under EDIT > COLOR SETTINGS and EDIT > CONVERT TO PROFILE if your doc isn't using that profile. Also the preview mode is something that threw me for a loop. Make sure you're viewing your doc in the correct preview mode. Find this under VIEW > PROOF SETUP and assign to sRGBIEC61… via CUSTOM if need be. You might also want to uncheck the ICC profile checkbox in the Save For Web dialog window.
I think all of this has to do with how browsers handle (or don't handle) color profiles. It's all more than I care to deal with to be honest so I just do what works and I'm not sure how or why it works. Terrible I know but I've got better things to spend my time on than figuring out why Photoshop does things the way it does. Plus I've read so many conflicting articles on the subject I feel I've spent enough time trying to figure it out.
here's the article on Photoshop save for web color shift from CreativePro.com.
Hope this helps someone.
excluding certain categories from the wordpress loop or rss feeds
Sep 18 2009to exclude a certain category of posts from the WP loop:
<?php query_posts("cat=-46″); ?>
<?php if (have_posts()) : ?>
blah blah blah. and then close with the old:
<?php
//Reset Query
wp_reset_query();
?>
To exclude certain categories from an RSS feed on another webpage (like a non-wp homepage):
http://yourdomain.com/blog/feed/?cat=-46
Really Easy Way to Add Code to Wordpress Posts
Sep 18 2009just compose your post in the visual editor and when you're done – ONLY WHEN YOU'RE COMPLETELY DONE WRITING THE CODE – switch to the html editor… viola! <?php echo "damn that's easy"; ?>
probably not the greatest if you have to come back and edit that code but it works for a quick fix without a plugin.
using custom fields in WordPress
Sep 17 2009from: http://www.redswish.co.uk/the-power-of-wordpress-custom-fields/
The key is the name for your custom variable, and the value is, well, it’s value! When you create a custom field, you are creating new meta-data. You then insert a simple line of php into your Wordpress template where you want this extra data to appear in the theme and voila! You’re done.
<?php $values = get_post_custom_values("Subtitle"); echo $values[0]; ?>
or for thumbnails/images from a certain directory: (just add the image name.ext as the custom field value
<img src="/blog/wp-content/uploads/<?php $values = get_post_custom_values('blog-image'); echo $values[0]; ?>" alt="" />