Orkut Gmail Agenda Docs Web mais »
Grupos visitados recentemente | Ajuda | Acessar
Página inicial dos Grupos do Google
Top 10 WordPress Hacks de outubro 2009
Há um número excessivo de tópicos que aparecem em primeiro plano neste grupo. Para fazer com que este tópico apareça primeiro, elimine essa opção de um outro tópico.
Erro ao processar a solicitação. Tente novamente.
sinalizar
  1 mensagem - Recolher todas  -  Traduzir tudo para Traduzido (ver todos os originais)
O grupo no qual você está postando é um grupo da Usenet. As mensagens postadas neste grupo farão com que o seu e-mail fique visível para qualquer pessoa na internet.
Sua resposta não foi enviada.
Postagem publicada
 
De:
Para:
Cc:
Encaminhar para
Adicionar Cc | Adicionar Encaminhar para | Editar Assunto
Assunto:
Validação:
Com o objetivo de verificação, digite os caracteres que você vê na figura abaixo ou os números que ouvir ao clicar no ícone de acessibilidade. Ouça e digite os números que ouvir
 
Fagner Souza  
Ver perfil   Traduzir para Traduzido (ver original)
 Mais opções 3 nov, 12:27
De: Fagner Souza <fagnerso...@gmail.com>
Data: Tue, 03 Nov 2009 14:27:28 +0000
Local: Ter 3 nov 2009 12:27
Assunto: Top 10 WordPress Hacks de outubro 2009

  Enviado para você por Fagner Souza através do Google Reader: Top 10
WordPress Hacks from October 2009 via CatsWhoCode.com de Jean-Baptiste
Jung em 02/11/09
How to: Show parent page title regardless of what subpage you are on
Let's start with a nice code for those using WordPress as a CMS: Just
paste it anywhere on your theme files and it will display the parent
page title.

<?php if($post->post_parent) { $parent_title =
get_the_title($post->post_parent); echo $parent_title; } else {
wp_title(''); } ?>

» Source:
http://www.wprecipes.com/how-to-show-parent-page-title-regardless-of-...

WordPress hack: Automatically insert author bio on each post
When you're owning a multi-writers blog, it is important to show who
wrote the post. In case of guest bloggers, it is also a nice way to
give credit.
Simply insert the following lines of code into your functions.php file,
and that's all. Author bio will be automatically displayed after each
post.

function get_author_bio ($content=''){ global $post;
$post_author_name=get_the_author_meta("display_name");
$post_author_description=get_the_author_meta("description");
$html="<div class='clearfix' id='about_author'>\n"; $html.="<img
width='80' height='80' class='avatar'
src='http://www.gravatar.com/avatar.php?gravatar_id=".md5(get_the_author_email()). "&default=".urlencode($GLOBALS['defaultgravatar'])."&size=80&r=PG'
alt='PG'/>\n"; $html.="<div class='author_text'>\n";
$html.="<h4>Author: <span>".$post_author_name."</span></h4>\n"; $html.=
$post_author_description."\n"; $html.="</div>\n"; $html.="<div
class='clear'></div>\n"; $content .= $html; } return $content; }
add_filter('the_content', 'get_author_bio');

» Source:
http://aext.net/2009/10/wordpress-hack-anything-can-be-added-anywhere...

Compress WordPress output and speed your blog’s load speed
Is your host slow? Althought on WpWebHost we don't have that kind of
problems, if you're hosted elsewhere you'll probably enjoy this tip who
can reduce your blog load speed.

After you made sure that the zlib php extension is enabled by your
hosting provider, place the following code in your header (above the
DOCTYPE), save the file and your blog will load faster.

<?php ini_set('zlib.output_compression', 'On');
ini_set('zlib.output_compression_level', '1'); ?>

» Source:
http://www.wprecipes.com/compress-wordpress-output-and-speed-your-blo...

Display registered users comment count on your WordPress blog
If your blog is private or have lots of registered users, it may be
interesting to be able to display the number of comments posted by
registered users. Just paste this code and the count will be displayed
where you pasted it.

<?php global $wpdb; $where = 'WHERE comment_approved = 1 AND user_id <>
0'; $comment_counts = (array) $wpdb->get_results(" SELECT user_id,
COUNT( * ) AS total FROM {$wpdb->comments} {$where} GROUP BY user_id ",
object); foreach ( $comment_counts as $count ) { $user =
get_userdata($count->user_id); echo 'User ' . $user->display_name . '
comment count is ' . $count->total . ' '; } ?>

» Source:
http://www.wprecipes.com/display-registered-users-comment-count-on-yo...

Automatically resize pictures on your WordPress blog
You know it, a picture is worth a thousand words. But pictures means
that you have to resize it, which is alwyas boring.
Happilly, a very cool script called TimThumb can resize pictures for
you. The function below create a WordPress shortcode that will make
Timthumb use even easier.

function imageresizer( $atts, $content = null ) { return '<img
src="/timthumb/timthumb.php?src='.$content.'&w=590" alt="" />'; }
add_shortcode('img', 'imageresizer');

Then, you can use the following syntax to add an automatically resized
image to your blog post:

[img]http://www.yoursite.com/yourimage.jpg[/img]

» Source:
http://www.wprecipes.com/automatically-resize-pictures-on-your-wordpr...

WordPress tip: Create a Tweetmeme “Retweeet” shortcode
Twitter is one of the best way to get quality traffic to your blog. In
order to help people sharing your articles on Twitter, you should
definitely implement a Tweetmeme button, which display how many time
time people RT'd your blog posts.
Just paste the function below into your functions.php file.

function tweetmeme(){ return '<div class="tweetmeme"><script
type="text/javascript"
src="http://tweetmeme.com/i/scripts/button.js"></script></div>'; }
add_shortcode('tweet', 'tweetmeme');

Once you saved the file, you'll be able to display the
Tweetmeme "retweet" button anywhere on your posts. In WordPress editor,
make sure you are in HTML mode and insert the following:

[tweet]

When your post will be published, the shortcode will be replaced by the
TweetMeme button.
For a "Live Demo" of this tip, just take a look at my new blog Cats Who
Blog, dedicated to blogging/make money online tips.
» Source:
http://www.wprecipes.com/wordpress-tip-create-a-tweetmeme-retweeet-sh...

WordPress trick: function to get tags related to category
Do you ever wanted to be able to get tags related to one (or more)
specific category? If yes, I’m pretty sure you’ll be delighted with
this very cool tip.
First, here is the function you have to paste in your functions.php
file:

function get_category_tags($args) { global $wpdb; $tags =
$wpdb->get_results (" SELECT DISTINCT terms2.term_id as tag_id,
terms2.name as tag_name, null as tag_link FROM wp_posts as p1 LEFT JOIN
wp_term_relationships as r1 ON p1.ID = r1.object_ID LEFT JOIN
wp_term_taxonomy as t1 ON r1.term_taxonomy_id = t1.term_taxonomy_id
LEFT JOIN wp_terms as terms1 ON t1.term_id = terms1.term_id, wp_posts
as p2 LEFT JOIN wp_term_relationships as r2 ON p2.ID = r2.object_ID
LEFT JOIN wp_term_taxonomy as t2 ON r2.term_taxonomy_id =
t2.term_taxonomy_id LEFT JOIN wp_terms as terms2 ON t2.term_id =
terms2.term_id WHERE t1.taxonomy = 'category' AND p1.post_status
= 'publish' AND terms1.term_id IN (".$args['categories'].") AND
t2.taxonomy = 'post_tag' AND p2.post_status = 'publish' AND p1.ID =
p2.ID ORDER by tag_name "); $count = 0; foreach ($tags as $tag) {
$tags[$count]->tag_link = get_tag_link($tag->tag_id); $count++; }
return $tags; }

Once you have pasted the function, you can use it in your theme:

$args = array('categories' => '12,13,14'); $tags =
get_category_tags($args);

» Source:
http://www.wprecipes.com/wordpress-trick-function-to-get-tags-related...

WordPress tip: Get all custom fields from a page or a post
Do you ever wanted to be able to get all custom fields from a specific
post or page? If yes, let's start by pasting the following code in your
functions.php file:

function all_my_customs($id = 0){ //if we want to run this function on
a page of our choosing them the next section is skipped. //if not it
grabs the ID of the current page and uses it from now on. if ($id ==
0) : global $wp_query; $content_array =
$wp_query-&gt;get_queried_object(); $id = $content_array-&gt;ID;
endif; //knocks the first 3 elements off the array as they are WP
entries and i dont want them. $first_array =
array_slice(get_post_custom_keys($id), 3); //first loop puts everything
into an array, but its badly composed foreach ($first_array as $key
=&gt; $value) : $second_array[$value] = get_post_meta($id, $value,
FALSE); //so the second loop puts the data into a associative array
foreach($second_array as $second_key =&gt; $second_value) :
$result[$second_key] = $second_value[0]; endforeach; endforeach; //and
returns the array. return $result; }

Once done, you can use the function like this:

$result = all_my_customs(); echo $result['my_meta_key'];

» Source:
http://www.wprecipes.com/wordpress-tip-get-all-custom-fields-from-a-p...

Check if a plugin is active
If you want to check if a WordPress plugin is active, just use the
is_plugin_active() function. The function takes a single parameter,
which is the path to the plugin, as shown in the example below:

<?php if (is_plugin_active('plugin-directory/plugin-file.php'))
{ //plugin is activated } ?>

» Source:
http://www.wprecipes.com/check-if-a-wordpress-plugin-is-active-the-ea...

Create an Anti-IE6 plugin
With this amazing code created by Nathan Rice, you'll be able to serve
IE6 users the default WordPress theme. After all, those idiots don't
deserve anything better
Just paste the following in a new file and save it as ie6.php. Upload
it to your wp-content/plugins directory and activate it on your
WordPress dashboard.
By the way, if you hate IE6 just like I do, you should definitely check
out this very funny article.

<?php /* Plugin Name: Serve Default to IE6 Plugin URI:
http://www.nathanrice.net/blog/serve-ie6-visitors-the-default-wordpre...
Description: This plugin will serve the default theme to any visitors
using IE6. Author: Nathan Rice Author URI: http://www.nathanrice.net/
Version: 1.0 */ add_filter('template', 'serve_default_to_iesix');
add_filter('option_template', 'serve_default_to_iesix');
add_filter('option_stylesheet', 'serve_default_to_iesix'); function
serve_default_to_iesix($theme) {
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false) $theme
= 'default'; return $theme; } ?>

» Source:
http://www.nathanrice.net/blog/serve-ie6-visitors-the-default-wordpre...

Get 20% off on the MyHomePro Premium WordPress Theme by using this
exclusive code: wpcats20.

Top 10 WordPress Hacks from October 2009

Coisas que você pode fazer a partir daqui:
- Inscrever-se no CatsWhoCode.com usando o Google Reader
- Começar a usar o Google Reader para se manter facilmente atualizado
sobre todos os seus sites favoritos


    Responder    Responder ao autor    Encaminhar  
É necessário Acessar antes de postar mensagens.
Para postar uma mensagem você precisa primeiro participar deste grupo.
Atualize seu apelido na página de configurações da inscrição antes de postar.
Você não tem a permissão necessária para postar.
Fim das mensagens
« Voltar às Discussões « Tópico recente     Tópico antigo »

Criar um grupo - Grupos do Google - Página inicial do Google - Termos de Uso - Política de Privacidade
©2009 Google