:: พัฒนาเว็บไซต์ CoolhostPlus :: > Simple Machines Forum [SMF]
วิธีลบ PHPSESSID ออกจากหลัง
(1/1)
CoolhostPlus:
เปิดไฟล์ /Sources/Subs.php
หา
--- โค๊ด: --- if (!isset($context['page_title']))
$context['page_title'] = '';
--- End code ---
วางไว้หลังหา
--- โค๊ด: --- //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'] = '';
}
--- End code ---
เปิดไฟล์ /Sources/Profile.php
หา
--- โค๊ด: ---$profile_include_data['function']($memID);
--- End code ---
วางหลังที่หา
--- โค๊ด: --- //Anti-SID(PHPSESSID) canonical tag
$tmp1 = end($context['linktree']);
$context['canonical_url'] = $tmp1['url'];
if( $context['user']['is_owner'] )
$context['canonical_url'] .= ';u=' . $memID;
--- End code ---
เปิดไฟล์ /Sources/Calendar.php
หา
--- โค๊ด: --- // If applicable, add the current week to the linktree.
--- End code ---
วางก่อนที่หา
--- โค๊ด: --- //Anti-SID(PHPSESSID) canonical tag
$tmp1 = end($context['linktree']);
$context['canonical_url'] = $tmp1['url'];
--- End code ---
--- อ้างถึง ---เครดิตที่มา http://custom.simplemachines.org/mods/index.php?mod=3315
--- End quote ---
นำร่อง
[0] ดัชนีข้อความ
Go to full version