23 พฤษภาคม 2555, 11:14:59
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

ทำเว็บไซต์ | แต่งบอร์ด | ออกแบบ | SMF | Joomla | Drupal | WordPress | JQuery | CMS | ECommerce | Tel. +668-08577477

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Back to Top ทำเมนูกลับสู่ด้านบน  (อ่าน 1132 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general เมื่อ: 6 กันยายน 2553, 21:53:30
  • ชื่อ: Back to Top
  • ผู้เขียน: S-M-F Modders Team
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: New Feature
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 2 กันยายน 2553
  • ต้นฉบับ: Back to Top

รายละเอียด
      คงเคยเห็นหลายๆ เว็บที่ใช้กันแล้วนะครับ ตอนที่เราเลื่อนหน้าเพจลงมาล่างสุดแล้วจะมีปุ่ม "ขึ้นบน" SMF ก็ทำได้ครับ

ตัวอย่าง


สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $sourcedir/Load.php

ค้นหา -->>
โค๊ด: [Select]
// Load the Modifications language file, always ;). (but don't sweat it if it doesn't exist.)
loadLanguage('Modifications', '', false);

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// Labradoodle-360's Back to Top Mod.
if (!empty($modSettings['enable_smoothscroll']))
$context['html_headers'] .='<script type="text/javascript" src="'. $settings['default_theme_url']. '/smoothscroll.js"></script>';

file $sourcedir/ModSettings.php

ค้นหา -->>
โค๊ด: [Select]
// Big Options... polls, sticky, bbc....
array('select', 'pollMode', array(&$txt['smf34'], &$txt['smf32'], &$txt['smf33'])),
'',

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
array('check', 'enable_smoothscroll'),
'',

file $themedir/index.template.php

ค้นหา -->>
โค๊ด: [Select]
</head>
<body>';

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
echo '<a name="forum_top"></a>';

ค้นหา -->>
โค๊ด: [Select]
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
</tr>
</table>';

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
echo '<div align="center" style="text-align: center;"><a href="#forum_top">', $txt['back_to_top_title'], '</a></div>';

file $themedir/languages/Modifications.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
// Labradoodle-360's Back to Top Mod.
$txt['back_to_top_title'] = 'กลับสู่ด้านบน';
$txt['enable_smoothscroll'] = 'เปิดใช้งานการเลื่อนขึ้นแบบนิ่มนวล';

ดาวน์โหลด: smoothscroll.rar
ขออภัย! ส่วนนี้สงวนไว้เฉพาะสมาชิกเท่านั้น กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

แตกไฟล์แล้วอัพโหลดไปไว้ที่
file smoothscroll.js -->> $themesdir/default

การตั้งค่า: ผู้ดูแล -->> ส่วนปรับแต่งค่าการใช้งาน -->> เปิดใช้งานการเลื่อนขึ้นแบบนิ่มนวล

ลิงค์หัวข้อ: http://dexmore.com/topic/3024
Windows XP    Firefox 3.6.8   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 6 กันยายน 2553, 22:05:00
สำหรับ SMF 2.0.xx

แก้ไขไฟล์:

file $sourcedir/Admin.php

ค้นหา -->>
โค๊ด: [Select]
// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
// 'shout' => array($txt['shout']),
// Note the comma!! The setting with automatically appear with the first mod to be added.

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'backtotop' => array($txt['back_to_top_title']),

ค้นหา -->>
โค๊ด: [Select]
// Mod authors if you want to be "real freaking good" then add any setting pages for your mod BELOW this line!

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
array('ManageBacktoTopSettings', 'area=modsettings;sa=backtotop'),

file $sourcedir/Load.php

ค้นหา -->>
โค๊ด: [Select]
// Detect the browser. This is separated out because it's also used in attachment downloads
detectBrowser();

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// Labradoodle-360's Back to Top Mod.
if (!empty($modSettings['enable_smoothscroll']))
$context['html_headers'] .='<script type="text/javascript" src="'. $settings['default_theme_url']. '/scripts/smoothscroll.js"></script>';

file $sourcedir/ManageSettings.php

ค้นหา -->>
โค๊ด: [Select]
// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'backtotop' => 'ModifyBacktoTopSettings',

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Labradoodle-360's Back to Top Mod.
function ModifyBacktoTopSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $sc, $modSettings;

$config_vars = array(
array('check', 'enable_smoothscroll'),
);

if ($return_config)
return $config_vars;

$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=backtotop';
$context['settings_title'] = $txt['back_to_top_settings_title'];


if (empty($config_vars))
{
$context['settings_save_dont_show'] = true;
$context['settings_message'] = '<div class="centertext">' . $txt['back_to_top_desc'] . '</div>';

return prepareDBSettingContext($config_vars);
}

// Saving?
if (isset($_GET['save']))
{
checkSession();

$save_vars = $config_vars;

saveDBSettings($save_vars);


redirectexit('action=admin;area=modsettings;sa=backtotop');
}

prepareDBSettingContext($config_vars);
}

file $themedir/index.template.php

ค้นหา -->>
โค๊ด: [Select]
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
echo '<a name="forum_top"></a><br />';

ค้นหา -->>
โค๊ด: [Select]
echo '
</div>
</div></div>';

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!

แก้เป็น -->>
โค๊ด: [Select]
echo '
<div align="center" style="text-align: center;"><a href="#forum_top">', $txt['back_to_top_title'], '</a></div> </div>
</div></div>';

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!

file $themedir/languages/Modifications.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]

// Labradoodle-360's Back to Top Mod.
$txt['back_to_top_title'] = 'กลับสู่ด้านบน';
$txt['enable_smoothscroll'] = 'เปิดใช้งานเลื่อนขึ้นแบบนิ่มนวล';
$txt['back_to_top_desc'] = 'แก้ไขการตั้งค่ากลับสู่ด้านบน';
$txt['back_to_top_settings_title'] = 'การตั้งค่ากลับสู่ด้านบน';

ดาวน์โหลด: smoothscroll.rar
ขออภัย! ส่วนนี้สงวนไว้เฉพาะสมาชิกเท่านั้น กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

แตกไฟล์แล้วอัพโหลดไปไว้ที่
file smoothscroll.js -->> $themesdir/default

ลิงค์หัวข้อ: http://dexmore.com/topic/3024
Windows XP    Firefox 3.6.8   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
ฟังเยอะๆ พูดน้อยๆ
*



Thailand   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 29 มีนาคม 2555, 21:57:01
เฮ้ย.....mod อันนี้ก้น่าสนใจ แต่เข้าไม่ถึง คงต้องทำใจ ลง mod ที่เข้าถึงไปก่อนละ


ลิงค์หัวข้อ: http://dexmore.com/topic/3024
Windows NT 6.1    Microsoft Internet Explorer 8.0   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
ฟังเยอะๆ พูดน้อยๆ
*



Thailand   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 30 มีนาคม 2555, 14:39:44
ทำไมวันนี้เข้าถึงหว่าาาา
งงครับ ถ้าเข้าได้ก็จัดไป คร้าบบ

ลิงค์หัวข้อ: http://dexmore.com/topic/3024
Windows NT 6.1    Microsoft Internet Explorer 8.0   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 4 เมื่อ: 16 เมษายน 2555, 12:30:39
อ้างถึง
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /public_html/Sources/Load.php(1770) : eval()'d code on line 325
มันขึันอย่างนี้ ลบออกยังงัยครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/3024
Windows XP    Firefox 6.0.2   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 5 เมื่อ: 16 เมษายน 2555, 21:04:13
ใช้ SMF 1.1.xx ใช่มั๋ยครับก๊อป $txt ไปใส่ใหม่ครับ ผมแก้ไข $txt ให้แล้วครับ มันผิดพลาดในไฟล์ภาษาครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/3024
Windows NT 6.1    Firefox 11.0   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 6 เมื่อ: 16 เมษายน 2555, 23:14:12
ใช้ SMF 1.1.xx ใช่มั๋ยครับก๊อป $txt ไปใส่ใหม่ครับ ผมแก้ไข $txt ให้แล้วครับ มันผิดพลาดในไฟล์ภาษาครับ
ขอบคุณครับเดี๋ยวจะลองใหม่

ลิงค์หัวข้อ: http://dexmore.com/topic/3024
Windows XP    Firefox 6.0.2   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

SMF Thai Translation Powered by SMF © 2006–2012, Simple Machines LLC

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 21 พฤษภาคม 2555, 15:45:58

jQuery Plugin Copyright © 2551-2555 Themes Design & Hosting by DexMoreGroup

Sitemap | Thai Simple Machines Forum support SMF Thai

Web Begining | SMF Modifications | SMF Thai Translation Web Begining

Drupal | WordPress | CMS Joomla | jQuery Plugin | Web Graphics CMS Joomla