Sites Grátis no Comunidades.net

Pânico na TV



Total de visitas: 52511
Trotes

Compare Preços de: PS2, PS3, MP3, MP4, Nintendo, Wii, XBox360 no Buscapé.


/*
Plugin Name: Buscapé Everywhere
Plugin URI: http://www.tecnocracia.com.br/arquivos/buscape
Description: Conjunto de opções para turbinar seu Afiliados Buscapé com Wordpress.
Version: 1.3
Date: Apr 11th, 2007
Author: Manoel Netto
Author URI: http://www.tecnocracia.com.br
*/

/*
Este plugin foi desenvolvido tomando como base o Buscape 0.1 feito pelo Bruno Alves
do www.brpoint.net com uma alteração feita pelo Cardoso do www.contraditorium.com
Ative-o no admin do Wordpress e configure-o em Opções -> Buscapé
*/

// Definição de opções default [configuráveis]
$BP_Options = array (
"Version" => "1.3",

// Número de Afiliado Buscapé
"BP_Aff" => "1289002",

// Texto que abre e fecha a lista de links
"BP_preReplace" => "

Compare Preços de: ",
"BP_postReplace" => " no Buscapé.

",

// Lista de termos utilizados quando não houver definição no post [default]
"BP_defLists" => array (
"MP3, iPod, celulares, notebooks, câmeras",
"DVD, MP3, LCD, Plasma, HDTV, Home Theater",
"games, PS2, PS3, Nintendo, Wii, iPod"
),

// Definições de comportamento
"BP_openWindow" => "1",
"BP_showBPinloco" => "1",
"BP_showBPinBL" => "0",
"BP_showDefBL" => "1",
"BP_inPosts" => "1",
"BP_inPages" => "1",
"BP_inFeeds" => "1",
"BP_addNofollow" => "0",
"BP_familyEW" => "1",
// Analytics
"BP_mapClicks" => "1",
"BP_mapFolder" => "buscape"
);

// -----------------------------------------------------------------------------------------
// Não edite nada após essa linha (a menos que saiba o que está fazendo)
// -----------------------------------------------------------------------------------------


function BP_Start() {
global $BP_Options, $BP_URL, $bp_pattern, $bps_pattern;
$Options = get_option("BP_Options");
if (!$Options) add_option("BP_Options", $BP_Options);
else $BP_Options = $Options;

$BP_URL = "http://busca.buscape.com.br/cprocura?lkout=1&site_origem=".$BP_Options["BP_Aff"]."&produto=';
$bp_pattern = "/([BP(?::(d+))?](.*?)[/BP])/i';
$bps_pattern = "/((?:

)?s*[BL(?::(d+))?](.*?)[/BL]s*(?:

)?)/i';
}

function BP_Clean($text) {
global $BP_Options, $BP_URL, $bp_pattern, $bps_pattern;
$text = preg_replace($bp_pattern, "$3", $text);
$text = preg_replace($bps_pattern, "", $text);
return $text;
}

function BPEW($text) {
global $BP_Options, $BP_URL, $bp_pattern, $bps_pattern;

if ((is_home()||is_single())&&!$BP_Options["BP_inPosts"]&&!$BP_Options["BP_familyEW"]) return BP_Clean($text);
if (is_page()&&!$BP_Options["BP_inPages"]&&!$BP_Options["BP_familyEW"]) return BP_Clean($text);
if (is_feed()&&!$BP_Options["BP_inFeeds"]&&!$BP_Options["BP_familyEW"]) return BP_Clean($text);

$bps_count = 0;
$bplist_exists = 0;

$target = $BP_Options["BP_openWindow"]?"target="_blank"":"';
$mapFolder = $BP_Options["BP_mapClicks"]?$BP_Options["BP_mapFolder"]:false;

// Adiciona uma lista default randomica? A lista existe?
if ($BP_Options["BP_showDefBL"] && $BP_Options["BP_defLists"] && !preg_match ($bps_pattern, $text, $matches)) {
$BP_defLists = $BP_Options["BP_defLists"];
$maxIndex = sizeof($BP_defLists);
$randIndex = rand(0, $maxIndex-1);
$listaBP = "n

[BL]".$BP_defLists[$randIndex]."[/BL]

';
$text .= $listaBP;
}

# Verifica a presença das tags [BP] [/BP] no texto
if (preg_match_all ($bp_pattern, $text, $matches)) {
unset($bptags);
$bptags = $BP_Options["BP_preReplace"];
for ($m=0; $m unset($mtags);
$categ = $matches[2][$m];
$mtags = explode(",", $matches[3][$m]);
$bpLink = "';
for ($i=0; $i if (strstr($mtags[$i],":")) list($mtags[$i], $categ) = split(":",$mtags[$i]);
$bpLink .= "" . trim($mtags[$i]) . "';
if ($i if ($BP_Options["BP_showBPinloco"])
$text = str_replace($matches[0][$m],$bpLink,$text);
else
$text = str_replace($matches[0][$m],$matches[3][$m],$text);

$bptags.= ($m }
}

# Check for [BL] [/BL]
if (preg_match ($bps_pattern, $text, $matches)) {
$bplist_exists = 1;
if ($bps_count==0 || !$BP_Options["BP_showBPinBL"]) {
$bptags = $BP_Options["BP_preReplace"];
} else {
$bptags .= ", ';
}

unset($mtags);
$categ = $matches[2][$m];
$mtags = explode(",", $matches[3]);
for ($i=0; $i if (strstr($mtags[$i],":")) list($mtags[$i], $categ) = split(":",$mtags[$i]);
$bptags .= "" . trim($mtags[$i]) . "';
if ($i if ($bplist_exists == 1) {
$text = preg_replace($bps_pattern,$bptags,$text);
} else {
$text .= $bptags;
}
}
return $text;
}

// Adiciona a opção no menu Options
function BP_addOptionsPage() {
add_options_page("Opções do Buscapé Everywhere", "Buscapé", "manage_options", basename(__FILE__), "BP_optionsPanel");
}

// Tela do Painel
function BP_optionsPanel() {
global $BP_Options;
if (isset($_POST["BP_Updt"])) {
$BP_Options["BP_Aff"] = $_POST["BP_Aff"];
$BP_Options["BP_preReplace"] = $_POST["BP_preReplace"];
$BP_Options["BP_postReplace"] = $_POST["BP_postReplace"];
$BP_Options["BP_defLists"] = explode("n", $_POST["BP_defLists"]);
$BP_Options["BP_showBPinloco"] = $_POST["BP_showBPinloco"]?"1":"0';
$BP_Options["BP_showBPinBL"] = $_POST["BP_showBPinBL"]?"1":"0';
$BP_Options["BP_showDefBL"] = $_POST["BP_showDefBL"]?"1":"0';
$BP_Options["BP_inPosts"] = $_POST["BP_inPosts"]?"1":"0';
$BP_Options["BP_inPages"] = $_POST["BP_inPages"]?"1":"0';
$BP_Options["BP_inFeeds"] = $_POST["BP_inFeeds"]?"1":"0';
$BP_Options["BP_openWindow"] = $_POST["BP_openWindow"]?"1":"0';
$BP_Options["BP_addNofollow"] = $_POST["BP_addNofollow"]?"1":"0';
$BP_Options["BP_familyEW"] = $_POST["BP_familyEW"]?"1":"0';
$BP_Options["BP_mapClicks"] = $_POST["BP_mapClicks"]?"1":"0';
$BP_Options["BP_mapFolder"] = $_POST["BP_mapFolder"];
update_option("BP_Options", $BP_Options);
?>



Dados atualizados com sucesso.



}
?>


Buscapé Everywhere





" size="25" maxlength="25" />


Configurações de Exibição da Listagem









/>
Exibir links do Buscapé dentro do texto [inline]

/>
Exibir links do Buscapé no fim do texto, em forma de lista

/>
Exibir lista de links pré-definida em textos sem links presentes


Seções de Exibição da Listagem

/>
Exibir nos Posts

/>
Exibir nas Páginas

/>
Exibir nos Feeds


Lista de links pré-definida

Separe as palavras com ",". Para randomizar, crie listas diferentes separando com <enter>



Configurações Avançadas

/>
Abrir link em nova janela (usando "target=_blank")

/>
Adicionar rel="nofollow" aos links

/>
Integrar com a família EveryWhere

/>
Mapear clicks com o Google Analytics. Pasta
" size="30" maxlength="30" />
[o que é isso?]








}

// Actions and Filters
// ---------------------------------------------
add_action("init", "BP_Start");
add_action("admin_menu", "BP_addOptionsPage");
add_filter("the_content", "BPEW");
?>


Pegadinha do Mução - Pajé


Pegadinhas do Mução - Furunco


Pegadinhas do mução - Papada de Porco


Trote ao Vivo Pela TV


Pegadinhas do Mução - Timbú



Silvio Santos vs. Tiazinha - Trote


Trote - Criança-Eliana


Trote - Marcos de Pirituba


TROTE DA ELIANA (versão DJ troop)



Trote da Filha Grávida


Hermes e Renato - Trote do ET


Trote telerj









Nova pagina 1