เว็บบอร์ด สาระน่ารู้ ชุมชน คนทำเว็บ โปรโมทฟรี แจกสคริปฟรี CMS Web hosting
:: พัฒนาเว็บไซต์ CoolhostPlus :: => ห้องแจก CMS & Free Script => Simple Machines Forum [SMF] => ข้อความที่เริ่มโดย: CoolhostPlus ที่ กุมภาพันธ์ 28, 2016, 18:32:52
-
เปิดไฟล์ /Sources/Subs.php
หา
if (!isset($context['page_title']))
$context['page_title'] = '';
วางไว้หลังหา
//Anti-SID(PHPSESSID) canonical tag
if( !empty($context['canonical_url']) )
{
if( !empty($modSettings['queryless_urls']) )
{
if( !empty($context['current_topic']) )
$context['canonical_url'] = str_replace('?topic=', '/topic,', $context['canonical_url']) . '.html';
elseif (!empty($context['current_board']))
$context['canonical_url'] = str_replace('?board=', '/board,', $context['canonical_url']) . '.html';
elseif( empty($context['current_action']) )
{
if( isset($_REQUEST['page']) )
$context['canonical_url'] = str_replace('?page=', '/page,', $context['canonical_url']) . '.html';
elseif( isset($_REQUEST['cat']) )
$context['canonical_url'] = str_replace('?cat=', '/cat,', $context['canonical_url']) . '.html';
}
}
//href must bee in '', not in ""
$context['html_headers'] .= '<link rel="canonical" href=\'' . $context['canonical_url'] . '\' />';
//lock default canonical tag for SMF 2.0
$context['canonical_url'] = '';
}
เปิดไฟล์ /Sources/Profile.php
หา
$profile_include_data['function']($memID);
วางหลังที่หา
//Anti-SID(PHPSESSID) canonical tag
$tmp1 = end($context['linktree']);
$context['canonical_url'] = $tmp1['url'];
if( $context['user']['is_owner'] )
$context['canonical_url'] .= ';u=' . $memID;
เปิดไฟล์ /Sources/Calendar.php
หา
// If applicable, add the current week to the linktree.
วางก่อนที่หา
//Anti-SID(PHPSESSID) canonical tag
$tmp1 = end($context['linktree']);
$context['canonical_url'] = $tmp1['url'];
เครดิตที่มา http://custom.simplemachines.org/mods/index.php?mod=3315