Falcon1986-Online

Home of a med student who likes to manage websites and talk tech!

Disable Facebook’s theatre mode

leave a comment »

Facebook LogoYou have probably been aware of Facebook’s “theatre mode” for viewing images since the last features upgrade about 2 months back. While I admire Lightbox-like image galleries, Facebook’s implementation does not seem quite as polished, in my opinion. Understandably, keeping the eyecandy to a minimum allows for faster delivery of the myriad of other scripts loaded upon visiting Facebook. At the same time, however, there should have been an accessible option to disable “theatre mode” altogether. Here, I will show you how this feature can be disabled using an easy-to-install Greasemonkey script.

If you have a web browser that supports Greasemonkey (for Firefox) or script importation (Opera natively supported; for IE; NinjaKit on Chrome; GreaseKit or NinjaKit on Safari), make sure that it is installed and activated.

Next, go to Userscripts.org and install the ‘facebook Photo Theatre Killer’ script and you are done! Wasn’t that easy? Now, revisit a photo gallery via your Facebook account and the annoying “theatre mode” should be gone.

Read the rest of this entry »

Advertisements

Written by falcon1986

23 April, 2011 at 8:52 AM

Posted in Software

Tagged with , ,

Add/remove contact info fields in WordPress user profiles

with 2 comments

WordPress LogoNot many subscribers to WordPress blogs take the time to fill out contact information on their profile pages. Perhaps a reason for this is that the area is not well promoted, but it could also be that the contact fields are not relevant to some people. The default profile page for WordPress users include input fields for AIM, YIM and Jabber, among others, but wouldn’t it be great if you could add other fields to the set or remove a few of the existing ones? Quite a few people use Facebook and Twitter; why not add fields so they can link to their presence on these social networks? In this post, I will show you how it can easily be done by editing your theme’s functions.php file.

Locate your theme’s functions.php file and open it in a simple text editor. Append with the following lines of code and modify depending on which fields you want to add or remove. Save and visit your profile to test.

// Add extra contact info to user profile page
function extra_contact_info($contactmethods) {
    unset($contactmethods['aim']);
    unset($contactmethods['yim']);
    unset($contactmethods['jabber']);
    $contactmethods['facebook'] = 'Facebook';
    $contactmethods['twitter'] = 'Twitter';
    $contactmethods['linkedin'] = 'LinkedIn';

    return $contactmethods;
}
add_filter('user_contactmethods', 'extra_contact_info');

The code is pretty simple to understand. Fields that you want to remove are preceded with unset; those that you want to add are not.

Written by falcon1986

9 March, 2011 at 11:24 AM

Posted in Wordpress

Tagged with

Specify favicon for use within WordPress Dashboard

with one comment

WordPress LogoOne of my little peeves about WordPress is that a blog’s favicon disappears once you enter the WordPress Dashboard. A browser’s default behaviour upon landing on a website is to load favicon.ico from the root web directory for that website (i.e. http://www.mydomain.tld/favicon.ico), but if it is not there nothing is loaded. While dropping a favicon within the root web directory should be all that is required, sometimes specifying its location within your theme’s header.php is required to point browser’s in the right direction, but how can you do the same for the Dashboard? In this post, I will show you how you can make your favicon persistent in this location using functions.php.

Continuing with the recent posts on adding functionality to WordPress via functions.php, navigate to your theme’s files and, with a simple text editor, open the functions.php file. If one does not exist, create one and save it to your theme’s directory. Add the following lines of code and modify the domain reference to suit your setup and the location of your favicon. Save and re-enter your Dashboard to see the effects.

// Specify favicon for Dashboard
function favicon4admin() {
 echo '<link rel="Shortcut Icon" type="image/x-icon" href="http://www.mydomain.tld/favicon.ico" />';
}
add_action( 'admin_head', 'favicon4admin' );

As usual, this is a per-theme modification, so you will need to reapply if you automatically update your theme or switch to another theme.

Written by falcon1986

9 March, 2011 at 11:02 AM

Posted in Wordpress

Tagged with

Disable RSS feeds on your WordPress blog

leave a comment »

WordPress LogoDisabling RSS feeds on public blogs is not something many people do. RSS feeds allow your subscribers to easily obtain updates of your blog’s latest posts from their favourite feed reader. Visitors like great content and getting it to them in efficient manner improves your website’s popularity. So why would anyone want to disable RSS feeds? If you have a private WordPress blog with information that your subscribers should not be publishing via RSS, then disabling feeds altogether is one option. Here is how to do it with functions.php. This post does not address protecting your RSS feed.

Locate your theme’s functions.php file in a simple text editor and append with the following lines.

// Disable all RSS feeds
function disable_our_feeds() {
	wp_die( __('<strong>ERROR:</strong> We are sorry, but RSS feeds have been disabled on this website for privacy purposes. Please click <a href="http://mydomain.tld/" >this link</a> to return to the homepage.') );
}
add_action('do_feed', 'disable_our_feeds', 1);
add_action('do_feed_rdf', 'disable_our_feeds', 1);
add_action('do_feed_rss', 'disable_our_feeds', 1);
add_action('do_feed_rss2', 'disable_our_feeds', 1);
add_action('do_feed_atom', 'disable_our_feeds', 1);

Because you are editing the functions.php file, this modification needs to be applied to each WordPress theme for which disabling RSS feeds is required.

This modification does not automatically remove RSS feed links within your theme, so manually removing them from your page/post templates might be necessary if you want to be thorough.

Finally, should you prefer to retain feed access, but restrict to subscribers only, take a look at the Feed Key plugin.

Written by falcon1986

27 February, 2011 at 11:04 AM

Posted in Wordpress

Tagged with

Remove admin bar from WordPress 3.1

with 13 comments

WordPress LogoWordPress 3.1 was released last Tuesday and while it boasts a few new features, I did not want to have the Admin Bar. Now, the WordPress Admin Bar is great for quickly accessing frequently-used panels of your blog, but for a private website, I did not see much use in it. Disabling the Admin Bar is completely optional. Here I will explain how you can disable it on your own blog just by adding a few lines of code into your theme’s functions.php file.

You will only be able to implement this modification if you are using WordPress 3.1+. The Admin Bar is not present in versions 3.0.5 and below. Furthermore, the modification can only be applied to themes, so you will have to apply to new themes when they are added.

Locate the functions.php file within your theme’s subdirectory and open within a simple text editor. Append with the following code ensuring not to interfere with what is already present. Save and revisit your blog.

// Hide WordPress Admin Bar
add_filter( 'show_admin_bar', '__return_false' );

add_action( 'admin_print_scripts-profile.php', 'hide_admin_bar_prefs' );
function hide_admin_bar_prefs() { ?>
<style type="text/css">
	.show-admin-bar { display: none; }
</style>
<?php
}

The WordPress Admin Bar should now be absent both on your blog’s pages and within the dashboard. Awesome!

Written by falcon1986

27 February, 2011 at 12:09 AM

Posted in Wordpress

Tagged with

Fix Facebook’s small font annoyance

with 3 comments

Facebook LogoAt the start of November 2010, I noticed that the font size on Facebook was noticeably smaller than I was accustomed to seeing. For a while I put up with it, but it got incredibly annoying as the days progressed. So, being a fan of Firefox extensions and Greasemonkey scripts I began my search for an add-on fix.

I like to keep Firefox lean and fast, so tacking on another extension to the ones I already use was not my first solution. Thankfully, someone over at userstyles.org, a great site for Stylish custom scripts, had a simple fix for both Greasemonkey and Stylish users. Whichever method you choose, the fix works by simply overriding Facebook’s current font-size CSS. Nothing else is modified.

After applying the Greasemonkey user script, Facebook text was once again comfortable to read. Give it a try and you will immediately notice the difference.

UPDATE: I would not be surprised if the authors of FFixer decide to include this fix in their update to this awesome Greasemonkey script.

Written by falcon1986

7 November, 2010 at 8:50 AM

Posted in Software

Tagged with ,

Get Ashampoo software with promo code [FREE Giveaway]

leave a comment »

I recently got an e-mail from Ashampoo containing a special promotion, but was unable to post it until now. But here it is. By visiting the link below, you can download and activate full versions of Ashampoo’s great products without restrictions: Burning Studio 2010 Advanced, Home Designer, Snap 3, WinOptimizer 6 and/or Photo Commander 7.

Get Full Ashampoo Software for Free

Please note that I am in no way affiliated with Ashampoo or any of their partners and do not gain anything from this promotion. However, I am aware that a lot of people like getting free stuff and had to share this. Having used Ashampoo’s Burning Studio 2010 Advanced, I can say that it is one of the better media burning suites out there minus all the bloat that you would find in paid alternatives such as Nero and Roxio. Unfortunately, I cannot say the same for the other products since there has never been any personal necessity for them. Even if you may not be interested, pass this on to your friends and family members who might be. Enjoy!

Written by falcon1986

30 September, 2010 at 9:17 AM

Posted in Software

Tagged with , ,