New and improved method to remove / block DiggBar Novo e melhor método para remover / bloquear DiggBar

ADVERTISEMENT ADVERTISEMENT
To get our software and web/tips via email, sign up for Para obter o nosso software e web / dicas via e-mail, cadastre-se daily email newsletter e-mail newsletter diária . .
Subscribe to RSS feed Subscribe to RSS feed or ou follow me siga-me on Twitter? no Twitter?

Last week, we shared JavaScript and PHP code snippets to Na semana passada, nós compartilhamos o JavaScript e trechos de código PHP para block DiggBar bloco DiggBar . . While they served the purpose fairly well, each had its own flaws. Enquanto eles serviram a finalidade razoavelmente bem, cada um tinha suas próprias falhas.

Here is a new, improved method that puts two and two together – by combining the PHP and JavaScript code to get the best of both worlds. Aqui é um método novo, melhorado que coloca dois e dois -, combinando o código PHP e JavaScript para obter o melhor dos dois mundos. The PHP method provided would display a message and stop rendering the page, whereas the JavaScript code would remove all frames – including Google Images. O método de PHP desde iria mostrar uma mensagem e parar a renderização da página, enquanto que o código JavaScript a eliminar todos os frames - incluindo o Google Images. This means that visitors who see the image from, say archive pages, would not have a link to click through to the actual page. Isto significa que os visitantes que vêem a imagem de, digamos páginas de arquivos, não teria um link para clicar para a página real.

So, I combined the two so that the below code checks whether the visitor is viewing a Digg shortened URL (typical of DiggBar), and if so, serves some JavaScript to redirect the user to the original web page. Então, eu combinaram os dois para que o abaixo código verifica se o visitante está vendo um Digg encurtado URL (típico de DiggBar) e, nesse caso, serve cerca de JavaScript para redirecionar o usuário para a página web original. This method can be used not just in WordPress, but in any CMS/app that supports PHP. Este método pode ser usado não apenas no WordPress, mas em todo o CMS / app que suporte PHP.

ADVERTISEMENT ADVERTISEMENT

<?php if (preg_match('#http://digg.com/\w{1,8}/?$#', <? php if (preg_match ( '# http://digg.com/ \ w (1,8 }/?$#',
$_SERVER['HTTP_REFERER']) ) { ?> HTTP_REFERER $ _SERVER [ ''])) (?>
<script language="JavaScript" type="text/javascript"> <script language="JavaScript" type="text/javascript">
if (top.location != self.location) top.location.replace(self.location); if (top.location! = self.location) top.location.replace (self.location);
</script> </ script>
<?php <? php
exit; saída;
} )
?> ?>

And by the way, even Engadget, a gadget blog that hits Digg on a regular basis, has E pelo jeito, mesmo Engadget, um gadget blog que atinge Digg em uma base regular, tem blocked Digg Bar bloqueado Digg Bar . . If a top publisher should block the DiggBar, I hope Digg realizes DiggBar's problems and does some serious thinking over it. Se um editor de topo deve bloquear a DiggBar, espero Digg percebe problemas DiggBar e faz uma reflexão séria sobre ele.

To get our latest articles, Para obter as últimas artigos, click here to sign up clique aqui para se inscrever for our free email newsletter or subscribe to para o nosso boletim de e-mail gratuito ou inscrever-se RSS feed RSS feed

§ Leave a Reply § Deixe uma resposta