Jul
23
2011
0

Your photo library is either in use by another application or has become unreadable

When opening iPhoto you get the following error:

“Your photo library is either in use by another application or has become unreadable”

1. Download iPhoto Library Manager fromĀ www.fatcatsoftware.com/iplm/

2. For your photo library Click file > rebuild

3. Wait for it to rebuild your library.

Not everything will be restored – for instance slideshows, books and calendars.

Written by Pete in: Apple |
Jul
23
2011
0

Reverse Scroll Direction in OS X Lion

In OS X Lion Scrolling is set to ‘natural’ by default – meaning swiping your fingers up pushes the page down as is on the iPhone or iPad.

To disable this and set scrolling to normal:

1. Open System Preferences

2. Click Trackpad

3. Click Scroll & Zoom tab

4. Untick ‘Scroll direction: natural’

Written by Pete in: Apple |
Jul
23
2011
0

How to add indicator lights back onto the dock in OS X Lion

On new Macs shipping with Lion the dock indicator lights to show when a program is open are not enabled by default.

To turn these on:

1. Open system preferences

2. Click on Dock

3. Tick the box ‘Show indicator lights for open applications’

Written by Pete in: Apple |
Jul
21
2011
0

How to get out of full screen mode OS X Lion

In most apps the esc key should work.

If not try CMD+SHIFT+F

Written by Pete in: Apple |
Jul
11
2011
0

Notice: Undefined variable: site_name_and_slogan in include()

Drupal 7x

If you have copied the Garland theme and renamed the directory and garland.info file you need to change all references of garland in the template.php file to your new theme name.

Written by Pete in: Drupal |
Jul
08
2011
0

Windows 7 Recycle Bin Desktop Missing

Problem: The link to the Recycle Bin on the desktop has gone missing.

Fix: Right click on the desktop and click personalise.

Click Change Desktop Icons

Click the Recycle Bin box and click OK

Written by Pete in: windows 7 |
Jul
07
2011
0

Find Most Recent Comments

To find the most recent comments in WordPress use the following code:


$number=30; // number of recent comments desired
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT $number");
if ( $comments ) : foreach ( (array) $comments as $comment) :
echo sprintf(__('%1$s on %2$s'), get_comment_author_link(), '' . get_the_title($comment->comment_post_ID) . ' - ') . $comment->comment_date;
endforeach;
endif;

Written by Pete in: wordpress |
Jul
07
2011
0

Find the most recent posts from a specific category

In WordPress sometimes you will want to show the most recent post from a specific category.

To do this use the following code:


global $post;
//change the category=1442 to the category number you want to pull the content from
//change numberposts=1 to the number of posts you want to return from the category
$myposts = get_posts('numberposts=1&category=1442&order=DESC');
foreach($myposts as $post) :
setup_postdata($post);
$catpost= " ". get_the_title() ."";
endforeach;

echo $catpost;

Written by Pete in: wordpress |
Jul
07
2011
0

Store the_permalink() as a variable

The wordpress function the_permalink() automatically echos the content to the screen.

Sometimes you want to store this value in a variable.

In this case use:


$string = get_permalink();

Written by Pete in: wordpress |
Jul
07
2011
0

Store the_title() in a variable

The wordpress function the_title() automatically echos the content to the screen.

Sometimes you want to store this value in a variable.

In this case use:


$string = get_the_title();

Written by Pete in: wordpress |

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes