10 กุมภาพันธ์ 2555, 04:22:22
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

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

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: วิธีติดโลโก "คนไทยรักกัน" ใน SMF แบบเด็กมอร์  (อ่าน 2380 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
  • ชื่อ: Floating Bar
  • ผู้เขียน: UnclEo
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: New Feature
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 25 มิถุนายน 2553

รายละเอียด
      ติดแบบง่ายๆ ครับไม่คิดอะไรมากเอาแค่ความหมาย

แก้ไขไฟล์:

file index.template.php

ค้นหา -->>
โค๊ด: [Select]
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/floating_bar.js"></script>

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

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
<div id="topbar">
<span style="float:right"><a href="javascript:void(0);" onClick="closebar(); return false"><strong>[x]</strong></a></span>
</div>

file style.css

เพิ่ม -->>
โค๊ด: [Select]
#topbar
{
position:absolute;
padding: 2px;
background: url(images/box-fb_01.jpg) no-repeat;
height: 150px;/*ให้เท่ากับความสูงของรูป*/
width: 148px;/*ให้เท่ากับความกว้างของรูป*/
visibility: hidden;
z-index: 100;
}

#topbar a:hover
{
color: #FFFFFF;
background-color:#FF6600;
}

สร้างไฟล์ floating_bar.js เอาไว้ใน Themes/default
โค๊ด: [Select]
/***********************************************
* Floating Top Bar script- ? Dynamic Drive (www.dynamicdrive.com)
* Sliding routine by Roy Whittle (http://www.javascript-fx.com/)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistclose = 0 //กำหนดเป็น 0 คลิกปิดรีเฟรชจะขึ้นมาใหม่ กำหนดเป็น 1 ปิดแล้วจะไม่ขึ้นมาอีกจนกว่ารีสตาร์ทเบราเซอร์อีกครั้ง
var startX = 920 //กำหนดระยะห่างจากขอบจอด้านซ้าย
var startY = 179 //กำหนดระยะห่างจากขอบจอด้านบน
var verticalpos="fromtop" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){
barheight=document.getElementById("topbar").offsetHeight
var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("topbar");
stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar

โลโก


เอาไปไว้ในโฟลเดอร์ images ของธีมที่ใช้นะครับ

หากท่านใดต้องการติดแบบอื่นๆ แจ้งความประสงค์มาครับ จะทำวิธีติดให้ด้วยความเต็มใจ

อ่านคำอธิบายภายในโค้ดให้ดีนะครับ  Cool Cool Cool

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



Thailand   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 3 มิถุนายน 2553, 12:36:10
อยากให้ ภาพแบนเนอร์ ติดกับ scrollbar ขวามือ ทำไงครับ

ปรกติถ้าตั้งค่าจากมุมซ้าย   แบนเนอร์จะอยู่ตำแหน่งไม่ตรงกันในการแสดงผลแต่ล่ะเครื่อง

( ขึ้นอยู่กับขนาดความกว้างของจอ )

ขอบคุณครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/1010
Windows XP    Firefox 3.6.3   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 7 มิถุนายน 2553, 12:54:10
โค๊ด: [Select]
el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};

ลองแก้ดูครับ

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



Thailand   หญิง ออฟไลน์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 20 กุมภาพันธ์ 2554, 03:24:35
ขอบคุณมากๆๆ จ๊า จะเอาไปทดสอบนะ

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

Creative Commons License

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

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 11 ชั่วโมงที่ผ่านมา

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