Página 1 de 1

GoogleBB Español

Publicado: 22 Nov 2004, 00:09
por SoporteNuke
Aqui les traigo el GoogleBB en español y un poquito mas completo que el original.


Antes de crear y subir los archivos haga un respaldo de su .htaccess e includes/page_tail.php.




includes/page_tail.php:

Código: Seleccionar todo

' . $lang['Admin_panel'] . '

' : '';

$template->set_filenames(array(
	'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);

$template->assign_vars(array(
	'PHPBB_VERSION' => '2' . $board_config['version'],
	'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', 
	'ADMIN_LINK' => $admin_link)
);

$template->pparse('overall_footer');

//
// Close our DB connection.
//
$db->sql_close();

//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
	//
	// Borrowed from php.net!
	//
	$gzip_contents = ob_get_contents();
	ob_end_clean();

	$gzip_size = strlen($gzip_contents);
	$gzip_crc = crc32($gzip_contents);

	$gzip_contents = gzcompress($gzip_contents, 9);
	$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

	echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
	echo $gzip_contents;
	echo pack('V', $gzip_crc);
	echo pack('V', $gzip_size);
}

$pagecontent = ob_get_contents();
ob_end_clean();

echo replace_html_links($pagecontent);

exit;

/**
 * Function: replace_html_links
 *
 * Author: Kinetix 
 *
 * Version: 1.0.0
 *
 * Purpose: Transforms page content's links into .html pages
 *   to allow better caching in Google.
 *
 * Notes: This will NOT work properly if you do not use & for
 *   the & character in links.
 */
function replace_html_links($pagedata)
{
	// Whatever you want to replace has to be in the same index as 
	// whatever you are going to replace it with in the changearray
	$replacearray = array(
	        "'(?




.htaccess:

Código: Seleccionar todo

# you should deny these files anyway, this stops people from taking theme templates

deny from all



  Order Allow,Deny
  Allow from all


RewriteEngine on

RewriteRule foros.html index.php
RewriteRule ^foro.([0-9]+)-([0-9]+)-([0-9]+).html viewforum.php\?f=$1&topicdays=$2&start=$3
RewriteRule ^foro.([1-9][0-9]*).html viewforum.php\?f=$1
RewriteRule ^mirar-tema.([0-9]*)-([a-zA-Z]*)-([0-9]+).html viewtopic.php\?t=$1&$2=topic&start=$2
RewriteRule ^viewtopicres.([0-9]+)-([0-9]+)-([a-zA-Z]*)-([a-zA-Z0-9_]*).html  viewtopic.php\?t=$1&postdays=$2&postorder=$3&vote=$4
RewriteRule ^mensaje.([0-9]+)-([0-9]+)-([0-9]+).html viewtopic.php\?t=$1&start=$2&postdays=$3&highlight=
RewriteRule ^mensaje.([0-9]+)-([0-9]+)-([0-9]+)-([a-zA-Z]*).html viewtopic.php\?t=$1&start=$2&postdays=$3&postorder=$4&highlight=
RewriteRule ^viewtoph.([0-9]*)-([[:punct:]/:\-\'(){}.&=_a-zA-Z0-9\ ]*).html viewtopic.php\?t=$1&highlight=$2
RewriteRule ^viewtopx.([0-9]*)-([0-9]*).html viewtopic\?t=$1&start=$2
RewriteRule ^viewtopp.([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).html viewtopic.php\?t=$1&postdays=$2&postorder=$3&start=$4
RewriteRule ^ver-mensaje.([0-9]+)-([0-9]+)-([0-9]+).html viewtopic.php\?t=$1&postdays=$2&postorder=asc&start=$3
RewriteRule ^ver-tema.([1-9][0-9]*).html viewtopic.php\?t=$1
RewriteRule ^ver-mensaje.([1-9][0-9]*).html viewtopic.php\?p=$1
RewriteRule buscar.([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).html search.html\?$1=$2&$3=$4
RewriteRule buscar.([a-zA-Z0-9_]*)-([a-zA-Z0-9_]*).html search.html\?$1=$2
RewriteRule buscar.html search.html
RewriteRule lista-miembros.([a-zA-Z0-9]*)-([a-zA-Z]*)-([0-9]*).html memberlist.html\?mode=$1&order=$2&start=$3
RewriteRule lista-miembros.html memberlist.html
RewriteRule faq.([a-zA-Z0-9]*).html faq.html\?mode=$1
RewriteRule faq.html faq.html
RewriteRule grupos.([0-9]*)-([0-9]*).html groupcp.html\?g=$1&start=$2
RewriteRule grupos.([0-9]*).html groupcp.html?g=$1
RewriteRule grupos.html groupcp.html
RewriteRule ver-perfil.([0-9]*).html profile.php\?mode=viewprofile&u=$1
RewriteRule editar-perfil.html profile.php\?mode=editprofile
RewriteRule mensajes.html privmsg.php\?folder=inbox
RewriteRule enviar-mensaje.html privmsg.php\?mode=post
RewriteRule elementos-enviados.html privmsg.php\?folder=sentbox
RewriteRule mensajes-enviados.html privmsg.php\?folder=outbox
RewriteRule elementos-guardados.html privmsg.php\?folder=savebox
RewriteRule responder.([1-9][0-9]*).html posting.php\?mode=reply&t=$1
RewriteRule nuevo-tema.([1-9][0-9]*).html posting.php\?mode=newtopic&f=$1

Publicado: 28 Nov 2004, 02:27
por Shocker Team 3D ®
Esto para que es y para que sirve !? Perdon ....

Publicado: 13 Dic 2004, 02:14
por SoporteNuke
Lo que hace es usar el mod_rewrite de apache con el .htaccess para reescrivir o convertir las urls de foro tipo:
http://www.phpbb-es.com/foro.php?mode=viewtopic por http://www.phpbb-es.com/foro/viewtopic.808.html

Como lo vez se ven en HTML pero en realidad siguen intactas.
Esto ayuda a optimizar la indexación en los motores de busquedas, principalmente en Google.

Respuesta: GoogleBB Español

Publicado: 10 Mar 2006, 17:24
por Martin Fernandez
Hola! Espero que alguien vea este post, ya que estoy un poco retrasado.
La funcion? rewrite funciona solo en apache.
En los servidores windows con II6 (o algo así­) no funciona.
O hay otra posibilidad.

Ya que google me indexó la pagina de inicio del foro, pero no los temas en él!!!!

Muchas Gracias y espero respuestas.

Saludos.

Respuesta: GoogleBB Español

Publicado: 15 Mar 2006, 13:33
por Nazcar
Efectivamente el mod_rewrite es un modulo escrito para y por la gente del proyecto apache asi que en el IIS no funciona,pasate por la web oficial de ese servidor puede que exista alguna posibilidad de algun modulo,pero no creo que todo el codigo del googlebb te sirva ya que esta escrito para el mod_rewrite.





Un saludo