@Helid: Are you going to be able to make the changes suggested by Quadric? Would be good!
If not maybe someone else would like to make the changes and re-release?
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">
<!--
/**
* Add more seo options
*
* @copyright Copyright (C) 2011 Helid
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
* @package pun_seo
*/
-->
<extension engine="1.0">
<id>pun_seo</id>
<title>Punbb SEO</title>
<version>1.0.0</version>
<description>Add more seo options.</description>
<author>Helid</author>
<minversion>1.4</minversion>
<maxtestedon>1.4</maxtestedon>
<hooks>
<hook id="vf_modify_forum_info"><![CDATA[
$seo_url = forum_sublink($forum_url['forum'], $forum_url['page'], (isset($_GET['p']) ? $_GET['p'] : 1), array($id, sef_friendly($cur_forum['forum_name'])));
if ($seo_url !== get_current_url())
{
header("Location: $seo_url", true, 301);
}
]]>
</hook>
<hook id="vt_modify_topic_info"><![CDATA[
$seo_url = forum_sublink($forum_url['topic'], $forum_url['page'], (isset($_GET['p']) ? $_GET['p'] : 1), array($id, sef_friendly($cur_topic['subject'])));
if ($seo_url !== get_current_url() && $pid != 0)
{
header("Location: $seo_url", true, 301);
}
]]>
</hook>
<hook id="ps_handle_url_tag_start"><![CDATA[
if (!$bbcode)
{
$full_url = str_replace(array(' ', '\'', '`', '"'), array('%20', '', '', ''), $url);
if (strpos($url, 'www.') === 0) // If it starts with www, we add http://
$full_url = 'http://'.$full_url;
else if (strpos($url, 'ftp.') === 0) // Else if it starts with ftp, we add ftp://
$full_url = 'ftp://'.$full_url;
else if (!preg_match('#^([a-z0-9]{3,6})://#', $url)) // Else if it doesn't start with abcdef://, we add http://
$full_url = 'http://'.$full_url;
if (defined('FORUM_SUPPORT_PCRE_UNICODE') && defined('FORUM_ENABLE_IDNA'))
{
$link_name = ($link == '' || $link == $url) ? $url : $link;
if (preg_match('!^(https?|ftp|news){1}'.preg_quote('://xn--', '!').'!', $link_name))
{
$link = $idn->decode($link_name);
}
}
$link = ($link == '' || $link == $url) ? ((utf8_strlen($url) > 55) ? utf8_substr($url, 0 , 39).' … '.utf8_substr($url, -10) : $url) : stripslashes($link);
return '<a href="'.$full_url.'" rel="nofollow">'.$link.'</a>';
}
]]>
</hook>
<hook id="fn_generate_crumbs_end"><![CDATA[
if ($reverse)
{
$items = count($forum_page['crumbs']);
$last_item = $items-1;
$before_last_item = $items-2;
if($items > 1)
{
if($forum_page['crumbs'][$last_item][0] != $forum_page['crumbs'][$before_last_item][0])
{
$crumbs = $forum_page['crumbs'][$last_item][0].' - '.$forum_page['crumbs'][$before_last_item][0].' - '.$forum_page['crumbs'][0][0];
} else {
$crumbs = $forum_page['crumbs'][$before_last_item][0].' - '.$forum_page['crumbs'][0][0];
}
} else {
$crumbs = $forum_page['crumbs'][0];
}
}
]]>
</hook>
</hooks>
</extension>