1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 07:36:32 +02:00

Issue #4352 - Canonical added for page, forum and download. Replaced some e_PAGETITLE with e107::title()

This commit is contained in:
Cameron
2021-01-19 09:50:02 -08:00
parent 76144e6b4f
commit f091709847
10 changed files with 128 additions and 55 deletions

View File

@@ -164,37 +164,34 @@ class download
$pref = e107::getPref();
//if($this->qry['action'] == 'maincats')
// {
//
// }
if($this->qry['action'] == 'list')
switch($this->qry['action'])
{
$this->loadList();
case 'maincats':
e107::canonical('download', 'index');
break;
case "list":
$this->loadList();
break;
case "view":
$this->loadView();
break;
case "report":
if(check_class($pref['download_reportbroken']))
{
$this->loadReport();
}
break;
/*
case 'mirror':
case 'error':
break; */
}
if($this->qry['action'] == 'view')
{
$this->loadView();
}
if ($this->qry['action'] == "report" && check_class($pref['download_reportbroken']))
{
$this->loadReport();
}
//if($this->qry['action'] == 'mirror')
// {
//
// }
// if($this->qry['action'] == 'error')
// {
// }
}
@@ -428,11 +425,14 @@ class download
{
if($dlrow = $this->getCategory($this->qry['id']))
{
define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME." / ".$dlrow['download_category_name']);
e107::title(LAN_PLUGIN_DOWNLOAD_NAME." / ".$dlrow['download_category_name']);
e107::canonical('download', 'category', $dlrow);
// define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME." / ".$dlrow['download_category_name']);
}
else
{ // No access to this category
define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME);
e107::title(LAN_PLUGIN_DOWNLOAD_NAME);
//define("e_PAGETITLE", LAN_PLUGIN_DOWNLOAD_NAME);
}
return null;
@@ -559,7 +559,9 @@ class download
$DL_TITLE = e107::getParser()->parseTemplate($this->template['pagetitle'], true, $sc);
define("e_PAGETITLE", $DL_TITLE);
// define("e_PAGETITLE", $DL_TITLE);
e107::title($DL_TITLE);
e107::canonical('download', 'item', $dlrow);
return null;
}

View File

@@ -90,6 +90,10 @@ if(isset($_GET['f']))
break;
}
}
else
{
e107::canonical('forum');
}

View File

@@ -41,6 +41,7 @@ if (!e107::isInstalled('forum'))
//e107::lan('forum','English_front');
e107::lan('forum', "front", true);
e107::css('forum','forum.css');
// e107::canonical('forum', 'post');

View File

@@ -56,7 +56,7 @@
echo __FILE__ . ' Line: ' . __LINE__;
exit;
}
$url = e107::url('forum', 'index', 'full');
$url = e107::url('forum', 'index', null, ['mode'=>'full']);
e107::getRedirect()->go($url);
//header('Location:'.e107::getUrl()->create('forum/forum/main', array(), 'full=1&encode=0'));
exit;
@@ -100,7 +100,7 @@
{
// header('Location:'.e107::getUrl()->create('forum/forum/main'));
$url = e107::url('forum', 'index', 'full');
$url = e107::url('forum', 'index', null, ['mode'=>'full']);
if(E107_DEBUG_LEVEL > 0)
{
@@ -118,6 +118,8 @@
}
$forumInfo = $forum->forumGet($forumId);
e107::canonical('forum', 'forum', $forumInfo);
$forumSCvars = array();
//----$threadsViewed = $forum->threadGetUserViewed();

View File

@@ -627,7 +627,7 @@ else
unset($ret);
}
e107::canonical('forum', 'topic', $thread->threadInfo);
require_once (HEADERF);