การสร้างปุ่ม Google Pagerank ติดหน้าบอร์ด smf
*** ปกติที่ใช้งานส่วนมาก จะเป็นการนำสคริป มาวางใน index.template.php ตามตำแหน่งที่ต้องการ แต่อันนี้ก็น่าสนใจสำหรับท่านที่ยังไม่มีและทดลองนำไปใช้งานดูครับ
Google Pagerank Display Button
Mod Information:PageRank of a forum is a very important factor when it comes to Search Engine Optimization, advertising, and most importantly, trustability. This modification will help build a great reputation for your forum by openly sharing your PageRank with your visitors/users. The modification display the PageRank of your forum with more than 130 styles.
By: GetRank
For: Smf 1.1.x and Smf 2.0 RC2
SMF Mod Site : http://custom.simplemachines.org/mods/index.php?mod=2436
Smf 1.1.xFile Edits1. ./Sources/ModSettings.php
ค้นหา :
// Who's online.
เพิ่มไว้ก่อน:
// Pagerank Display Settings
array('select', 'pagerankdisplay', range(0,134)),
array('select', 'pagerankdisplay2', array('center' => 'Center', 'left' => 'Left', 'right' => 'Right')),
'',
2. ./Themes/default/index.template.php //( เลือกธีมที่ใช้งานอยู่)
ค้าหา:// Show the load time?
เพิ่มไว้ก่อน :
// Pagerank display button
global $modSettings;
if(!empty($modSettings['pagerankdisplay'])) {
echo '
<div align="', $modSettings['pagerankdisplay2'] . '" >
<a href="http://www.getrank.org" target="_blank">
<img src="http://www.getrank.org/prbutton/pagerank-display.php?a=getCode&s=', $modSettings['pagerankdisplay'] . '" title="Google PageRank Checker" border="0px" />
</a></div> ';
}
3. ./Themes/default/languages/Help.thai.php
ค้นหา:
?>
เพิ่มไว้ก่อน :
$helptxt['pagerankdisplay'] = 'Set a number for button style, all styles and style codes are viewable in readme.';
4. ./Themes/default/languages/Modifications.thai.php
5. ./Themes/default/languages/Modifications.thai.php
ค้นหา:
?>
เพิ่มไว้ก่อน :
$txt['pagerankdisplay'] = 'เลือกรูปแบบกูเกิ้ลเพจแรงค์';
$txt['pagerankdisplay2'] = 'การจัดวาง';
6. อัพโหลดไฟล์
7. การใช้งานไปที่ ผู้ดำเนินการ > ส่วนปรับแต่งค่าการใช้งาน > วางรูปแบบ> เลือกรูปแบบกูเกิ้ลเพจแรงค์ (มีแบบ 134 แบบ) ให้เลือกตัวเลขแล้วบันทึกดู จะได้ ปุ่ม Google Pagerank ตามที่เราต้องการ
[Configuration: (SMF 1.1.11: Features and Options > Layout and Options)]
(http://upic.me/i/nx/f491a.jpg) (http://upic.me/show/48714857)
(http://upic.me/i/u0/as82a.jpg) (http://upic.me/show/48714555)
8. เรียบร้อย Mod.ตัวนี้สร้างโดย By: GetRank
http://www.getrank.org มีพร้อมสำหรับ Webmaster and SEO Tools
**** ปัญหาที่พบ ผมใช้ SMF 1.1.11 ธีม classic คือ การไม่แสดงภาษาไทย ในขั้นตอนการใช้งาน ในขั้นตอนที่ 6
ผมทดลองเข้าไปแก้ที่ไฟล์ ./Themes/default/languages/ ModSettings.thai.php แสดงผลครับ(โดยดูจากภาษาไทยที่แสดงจะอยู่ที่นี่)
ค้นหา : $txt['who_enabled'] = 'เปิดใช้งาน ให้ดูรายชื่อผู้ที่ออนไลน์
เพิ่มไว้ก่อน: $txt['pagerankdisplay'] = 'เลือกรูปแบบกูเกิ้ลเพจแรงค์';
$txt['pagerankdisplay2'] = 'การจัดวาง';
9. สำหรับ Smf 2.0 RC2 ก็เลือก http://custom.simplemachines.org/mods/index.php?mod=2436
>> Manual Install Instructions for SMF Smf 2.0 RC2
10. หากผิดพลาดประการใด ก็ขอคำชี้แนะจากท่านที่เก่งๆ ในที่นี้นะครับ คือ ตั้งใจอยากแบ่งปันความรู้ที่ได้ศึกษามา ที่สำคัญจากที่นี่ครับ http://www.justusers.net/