Evitar los enlaces cortos
Publicado: 10 Dic 2008, 14:46
Versión de phpBB: 2.0.
Tipo de phpBB: phpBB estandar, (tambien llamado Vanilla) phpBB2 o phpBB3
MODs Instalados: No
Tu conocimiento: Principiante
¿Qué recuerdas haber hecho en el foro antes de aparecer este error?
¿Qué has realizado para intentar resolver el problema?
Descripción y Mensaje
He querido seguir el tutorial que hay AQUI pero en mi functions_content.php (phpbb 3.0.3) no me aparecen números y claro, como ya la he liado varias veces, ni sé ni me atrevo a tocar nada.
A ver si alguien me orienta un poco.
Saludos
Tipo de phpBB: phpBB estandar, (tambien llamado Vanilla) phpBB2 o phpBB3
MODs Instalados: No
Tu conocimiento: Principiante
¿Qué recuerdas haber hecho en el foro antes de aparecer este error?
¿Qué has realizado para intentar resolver el problema?
Descripción y Mensaje
He querido seguir el tutorial que hay AQUI pero en mi functions_content.php (phpbb 3.0.3) no me aparecen números y claro, como ya la he liado varias veces, ni sé ni me atrevo a tocar nada.
Spoiler
case MAGIC_URL_LOCAL:
$tag = 'l';
$relative_url = preg_replace('/[&?]sid=[0-9a-f]{32}$/', '', preg_replace('/([&?])sid=[0-9a-f]{32}&/', '$1', $relative_url));
$url = $url . '/' . $relative_url;
$text = $relative_url;
// this url goes to http://domain.tld/path/to/board/" onclick="window.open(this.href);return false; which
// would result in an empty link if treated as local so
// don't touch it and let MAGIC_URL_FULL take care of it.
if (!$relative_url)
{
return $whitespace . $orig_url . '/'; // slash is taken away by relative url pattern
}
break;
case MAGIC_URL_FULL:
$tag = 'm';
$text = $short_url;
break;
case MAGIC_URL_WWW:
$tag = 'w';
$url = 'http://' . $url;
$text = $short_url;
break;
case MAGIC_URL_EMAIL:
$tag = 'e';
$text = $short_url;
$url = 'mailto:' . $url;
break;
}
$tag = 'l';
$relative_url = preg_replace('/[&?]sid=[0-9a-f]{32}$/', '', preg_replace('/([&?])sid=[0-9a-f]{32}&/', '$1', $relative_url));
$url = $url . '/' . $relative_url;
$text = $relative_url;
// this url goes to http://domain.tld/path/to/board/" onclick="window.open(this.href);return false; which
// would result in an empty link if treated as local so
// don't touch it and let MAGIC_URL_FULL take care of it.
if (!$relative_url)
{
return $whitespace . $orig_url . '/'; // slash is taken away by relative url pattern
}
break;
case MAGIC_URL_FULL:
$tag = 'm';
$text = $short_url;
break;
case MAGIC_URL_WWW:
$tag = 'w';
$url = 'http://' . $url;
$text = $short_url;
break;
case MAGIC_URL_EMAIL:
$tag = 'e';
$text = $short_url;
$url = 'mailto:' . $url;
break;
}
A ver si alguien me orienta un poco.
Saludos