Integrování obsahu blogu na Facebook

Add Link to Facebook
http://wordpress.org/extend/plugins/add-link-to-facebook/

Automatically add links to posts that are being published to your Facebook wall, pages or groups. Simple one time setup and forget. The way links appear on Facebook can be customized. This plugin comes with full support.

The link title will be the post title. The link description will be the excerpt, or part of the post text if there is none. It is possible to configure a link image (WordPress icon, first image in the media library or in the text, featured image or custom image) or you can let Facebook select one automatically. It is possible to exclude individual post links from being added to your wall, pages or groups by ticking a check box just above the publish button.

Facebook Tab Manager
http://wordpress.org/extend/plugins/facebook-tab-manager/

Makes WordPress function as an editor for tabs you can embed in a Facebook page for your business, campaign, or organization.
The Facebook Tab Manager allows you to create landing pages and other types of content to be displayed within Facebook, particularly within the tabs that appear on Facebook business pages and pages for other types of organizations. This provides a way of putting more interesting layouts and functionality into your Facebook pages, without the need to get too deep into fancy programming.

The Facebook Tab Manager was specifically designed to take advantage of a recent Facebook page redesign that added support for iframe tabs on Facebook pages. Optionally, you can now also specify content to be displayed on an associated canvas page.

Tab content can include most any WordPress content, including output from Shortcodes and other plugin functions.

Návod:
http://wpmu.org/how-to-create-a-custom-facebook-page-for-your-band-or-business-using-wordpress/

*Alternativa*

WPBook
http://wordpress.org/extend/plugins/wpbook/
http://wpbook.net/

WPBook is a plugin for integrating WordPress and Facebook. It provides robust functionality, including:

– Support for a view of your WordPress blog as a Facebook application, including full pages and posts, with embedded media. This view is highly customizable, with custom headers/footers for each post, share links, and links to each post on the external WordPress blog.
– Support for comments posted by users within that Facebook application view; these are treated as native WordPress comments.
– Tabs for Facebook Pages. Tab view can include full posts but strips out tags that Facebook does not allow (embedded videos, iframes).
– Support for posting excerpts to Facebook wall (on individual profile and/or Page) with urls pointing to either the external blog permalink or to the Facebook application view.
– Support for importing to WordPress comments made against excerpts posted on Facebook walls.
– Facebook Avatar support for gravatars

The Complete Guide to Optimizing Your WordPress Site for Sharing on Facebook
http://wpmu.org/the-complete-guide-to-optimizing-your-wordpress-site-for-sharing-on-facebook/

Shortcodes pro trvale platné adresy obrázků a interní odkazy

Peter’s Blog URL Shortcodes
http://wordpress.org/extend/plugins/peters-blog-url-shortcodes/

Use shortcodes for blog URLs, post URLs, and template URLs so that your posts always have the correct internal links.
Adds shortcodes [blogurl], [posturl], [templateurl], and [childtemplateurl] for WordPress 2.6 and up. Use [blogurl] to generate your site URL.

It offers the parameters slash and noslash to add a trailing slash, the parameter uploads to produce the URL of the uploads folder and wordpress to produce the URL of your WP files. Use [posturl id=3] (replace „3“ with a post ID) to generate the permalink for any post.

Trvalý odkaz příspěvku u osobního blogu

Na základě dotazu čtenáře zveřejňuji první upozornění k obsahu knihy. Týká se strany 30, kde píšu o struktuře trvalých odkazů a u osobního blogu tvrdím, že stačí použít značku %postname%.

Cituji přesně:

Opět záleží na tom, jaký web vlastně děláte. V případě osobního weblogu stačí složit trvalý odkaz ze jména článku, tedy použít značku %postname%. Odkaz bude vypadat takto:

http://www.example.cz/nadpis-prispevku

V knize jsou popsány všechny značky a přidávám i další doporučení. Na oficiální stránce http://codex.wordpress.org/Using_Permalinks se však píše, že z hlediska výkonu webu je doporučováno nezačínat textovou částí odkazu, protože při větším množství stránek by mohlo dojít k potížím. Je proto lepší začít odkaz například značkou %year% nebo ID příspěvku.

For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text „page slug“ as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to have at least two path segments in your post’s permalink structure such as /%year%/%postname%/ or even /posts/%postname%/. (Some people recommend /%post_id%/%postname%/ which works for performance reasons but others recommend against it because it is unfriendly to users in the many contexts in which users interact with URLs.)

Můj názor na celou věc se nijak nemění. Sám používám různé struktury trvalých odkazů a nezaznamenal jsem žádné potíže. Pokud ale chystáte nějaký velký web, je dobré se nad tím zamyslet i z tohoto pohledu.

Multikriteriální filtrování příspěvků

Query Multiple Taxonomies
http://wordpress.org/extend/plugins/query-multiple-taxonomies/

Say you have two custom taxnomies defined: *genre* and *artist*.

Currently, you can do the following types of queries on your site:
?genre=jazz
?genre=jazz&cat=1

But you can’t do this:
?genre=jazz&artist=chet-baker

WordPress will just ignore one of the parameters. This plugin fixes that. It also comes with a drill-down navigation widget.

Umístění uživatelských funkcí do pluginu

Standardní umístění uživatelských funkcí je v souboru *functions.php*.
Nešikovná na tomto postupu je skutečnost, že jsou pak vaše funkce vázány pouze na danou šablonu vzhledu a pro každou jinou šablonu je musíte do *functions.php* zkopírovat. Šikovnější metoda, umožňující jejich snadnou přenositelnost nezávisle na šablonách vzhledu, je proto umístění těchto funkcí do *pluginu*.

Vytvoříme si soubor *s u* s následujícím kódem:


<?php
/**
 * Plugin Name: My Custom Functions
 * Plugin URI: http://yoursite.com
 * Description: Popis funkcionalit
 * Author: Vaše jméno
 * Author URI: http://yoursite.com
 * Version: 0.1.0
 */

// Následuje váš kód s uživatelskými funkcemi

?>

Soubor *my-custom-functions.php* umístíme do adresáře */wp-content/mu-plugins/* (podadresář */mu-plugins* musíme nejprve vytvořit). Veškeré pluginy umístěné v tomto podadresáři se spouští automaticky (mu = must use), není je tedy třeba aktivovat (a nelze je ani deaktivovat či odinstalovat, v seznamu pluginů se zobrazují bez těchto možností).

Chcete-li mít možnost plugin s funkcemi standardně aktivovat, vložíte soubor *my-custom-functions.php* jako každý jiný plugin do adresáře */wp-content/plugins/*.

Zdroj: Creating a custom functions plugin for end users »

How to create your own WordPress functionality plugin »

Shortcode pro přímé zobrazení PDF souboru

Just open *functions.php* file and put following code in that file.


function pdflink($attr, $content) {
 return '<a href="http://docs.google.com/viewer?url=' . $attr['href'] . '">'.$content.'</a>';
}
add_shortcode('pdf', 'pdflink');

Upload the PDF file to your wordpress and then get the path of PDF file and then put above lines in article.
For showing link of PDF file in article or post you need add the following lines in the article.


[pdf href="http://yoursite.com/linktoyour/file.pdf"]View PDF[/pdf]

If you does not want to create PDF link in your site and you want to show the pdf doc in your site then use following code.


function pdfshow($attr, $content) {
	return '<iframe src="https://docs.google.com/gview?url='.$attr['href'] .'&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>';
}
add_shortcode('pdfshow', 'pdfshow');

For showing the PDF file in article or post you need add the following lines in the article.


[pdfshow href="http://yoursite.com/linktoyour/file.pdf"]View PDF[/pdf]

Zdroj »

Přiřazení stejného obrázku více příspěvkům (opakované použití)

If you use the library and use a lot of pictures in the posts, the following small link in the library will surely help you. Thus, images can be easily reused. A link will be created so you can access the image directly and there is no need to upload the image again to your new post.


function upload_columns($columns) {
	unset($columns['parent']);
	$columns['better_parent'] = __( 'Parent' );
	return $columns;
	}
 
function media_custom_columns($column_name, $id) {
	$post = get_post($id);
	 
	if ( $column_name != 'better_parent' )
	return;
	 
	if ( $post->post_parent > 0 ) {
		if ( get_post($post->post_parent) )
		$title = _draft_or_post_title($post->post_parent);
		?>
		<strong>
		<a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"><?php echo $title ?></a>
		</strong>, <?php echo get_the_time( get_option('date_format') ); ?>
		<br />
		<a class="hide-if-no-js" onclick="findPosts.open('media[]','<?php echo $post->ID ?>');return false;" href="#the-list"><?php _e( 'Re-', 'textdomain' ); _e('Attach'); ?></a>
		<?php
	} else {
		_e( '(Unattached)' ); ?>
		<br />
		<a class="hide-if-no-js" onclick="findPosts.open('media[]','<?php echo $post->ID ?>');return false;" href="#the-list"><?php _e('Attach'); ?></a>
		<?php
	}
}
add_filter( 'manage_upload_columns', 'upload_columns' );
add_action( 'manage_media_custom_column' , 'media_custom_columns', 0, 2 );

Zdroj »

*Alternativa*

Shuffle
http://wordpress.org/extend/plugins/shuffle/

Shuffle modifies/improves your Media Library in a number of ways. Shuffle lets you:

– Attach an item (Image, Audio, Video) to anything (Post, Page, Custom Post Type, another Attachment)!
– Reorder an item’s attachments using a simple Drag and Drop UI
– Detach an attachment from an item without deleting the attachment
– View all attachments attached to an item

This plugin is especially useful if you are using WordPress as a CMS and/or have a media-heavy site.

Jak přidat Facebook tlačítko „Líbí se mi“

Like
http://wordpress.org/extend/plugins/like/

The Facebook Like Button Widget adds a ‚Like‘ button to your WordPress blog posts. It uses the new Facebook Like button released on Apr. 21st 2010.

*Alternativy*

Facebook Likes You!
http://wordpress.org/extend/plugins/facebook-likes-you/

Facebook Likes You! is simple plugin which makes it easy to add Facebook Like button and widgetable Like box. K dispozici i v české jazykové verzi.

WordPress Facebook Like Plugin
http://wordpress.org/extend/plugins/wordpress-facebook-like-plugin/

Add a Facebook „Like“ Button to your blog posts and increase your visitor engagement instantly! This plugin adds a simple and easy to use Facebook Like functionality with admin options to change the location of Facebook Like button, font, show faces, use the box with count as well as other cool and useful options.

Bez pluginu do šablony
http://duben.org/wordpress/pridavame-facebookove-tlacitko-to-se-mi-libi-do-wordpressu


<iframe src="https://www.facebook.com/plugins/like.php?href=<?php 
echo urlencode(get_permalink()); 
?>&amp;layout=standard&amp;show-faces=true&amp;width=400&amp;action=like&amp;
font=verdana&amp;colorscheme=light" 
scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; 
width:400px; height:25px"></iframe>

Automatically add Twitter and Facebook buttons to your posts
http://www.wprecipes.com/automatically-add-twitter-and-facebook-buttons-to-your-posts

Paste the code below into your *functions.php* file, save it, and you’re done.


function share_this($content){
    if(!is_feed() && !is_home()) {
        $content .= '<div class="share-this">
                    <a href="http://twitter.com/share"
class="twitter-share-button"
data-count="horizontal">Tweet</a>
                    <script type="text/javascript"
src="https://platform.twitter.com/widgets.js"></script>
                    <div class="facebook-share-button">
                        <iframe src="https://www.facebook.com/plugins/like.php?href='.urlencode(get_permalink($post->ID))
.'&amp;layout=button_count&amp;show_faces=false&amp;width=200&amp;action=like&amp;colorscheme=light&amp;height=21"
scrolling="no" frameborder="0" style="border:none;
overflow:hidden; width:200px; height:21px;"
allowTransparency="true"></iframe>
                    </div>
                </div>';
    }
    return $content;
}
add_action('the_content', 'share_this');

Změna trvalých odkazů

Permalinks Migration
http://www.deanlee.cn/wordpress/permalinks-migration-plugin/
http://wordpress.org/extend/plugins/permalinks-migration-plugin-for-wordpress/

With this plugin, you can safely change your permalink structure – for example, from */%year%/%monthnum%/%day%/%postname%/* to */%category%/%postname%/* – without breaking the old links to your website, and even doesn’t affect your search engine rankings.

But doing so will make all pages indexed by search engines become invalid, moreover, losing visitors from other sites or bookmarks that links to you.

Permalinks Migration plugin is a way to tell the search engines (and browsers) that the page has permenantly moved, and that the old address should be replaced by the new one . This plugin will generates a “301 Redirect” when user or spider visit your site through old permalinks and redirect them to the new permalinks of the same post.