mirror of
https://github.com/e107inc/e107.git
synced 2025-07-29 02:40:25 +02:00
Merge pull request #4733 from Jimmi08/canonical-urls-on-topic-pages
Fixes #4712 canonical URLs for paged forum topic
This commit is contained in:
@@ -86,6 +86,13 @@ class forum_url // plugin-folder + '_url'
|
|||||||
'sef' => 'forum/{forum_sef}/{thread_id}/{thread_sef}/',
|
'sef' => 'forum/{forum_sef}/{thread_id}/{thread_sef}/',
|
||||||
'redirect' => '{e_PLUGIN}forum/forum_viewtopic.php?id=$2&$4'
|
'redirect' => '{e_PLUGIN}forum/forum_viewtopic.php?id=$2&$4'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$config['topic-canonical'] = array(
|
||||||
|
'regex' => 'forum\/([^\/]*)\/([\d]*)(?:\/|-)([\w-]*)/?\??(.*)',
|
||||||
|
// 'regex' => '^forum/(.*)/(\d*)(?:-|/)([\w-]*)/?\??(.*)',
|
||||||
|
'sef' => 'forum/{forum_sef}/{thread_id}/?p={thread_page}',
|
||||||
|
'redirect' => '{e_PLUGIN}forum/forum_viewtopic.php?id=$2&$4'
|
||||||
|
);
|
||||||
/*
|
/*
|
||||||
$config['subforum'] = array(
|
$config['subforum'] = array(
|
||||||
'regex' => '^forum/(.*)/(.*)$',
|
'regex' => '^forum/(.*)/(.*)$',
|
||||||
|
@@ -376,7 +376,9 @@ else
|
|||||||
unset($ret);
|
unset($ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
e107::canonical('forum', 'topic', $thread->threadInfo);
|
$thread->threadInfo['thread_page'] = varset($thread->page,1);
|
||||||
|
e107::canonical('forum', 'topic-canonical', $thread->threadInfo);
|
||||||
|
|
||||||
require_once (HEADERF);
|
require_once (HEADERF);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user