ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์CMS & Free Scriptอยากทำ Popup [SMF] อะครับ ช่วยหน่อย ดู Code ให้ทีครับ
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: อยากทำ Popup [SMF] อะครับ ช่วยหน่อย ดู Code ให้ทีครับ  (อ่าน 1244 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
HaNoY
Global Moderator
สมุนแก๊งเสียว
*****

พลังน้ำใจ: 48
ออฟไลน์ ออฟไลน์

กระทู้: 581



ดูรายละเอียด
« เมื่อ: 02 มิถุนายน 2012, 12:34:22 »

โค๊ด:
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
<head>

<style type="text/css">
<!--
body{
font-size:12px; font-family:Arial;
}

#FloatingLayer507{position:absolute;left:800;top:10; z-index:1000; font-size:12px; font-weight:bold; margin-left:-15px;}
#FloatingLayer507 img{ display:block; border:0px;}
#FloatingLayer507 a{ color:#000; text-decoration:none;}
#FloatingLayer507 a:hover{ color: #FF0000;}

#FloatingLayer508{position:absolute;left:200;top:10; z-index:1000;font-size:12px; font-weight:bold; margin-left:0px;}
#FloatingLayer508 img{ display:block; border:0px;}
#FloatingLayer508 a{ color:#000; text-decoration:none;}
#FloatingLayer508 a:hover{ color: #FF0000;}
-->
</style>

<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />

<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '

<meta name="robots" content="noindex" />', '

<meta name="keywords" content="" />

<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

var smf_theme_url = "', $settings['theme_url'], '";

var smf_images_url = "', $settings['images_url'], '";

var smf_scripturl = "', $scripturl, '";

var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';

var smf_charset = "', $context['character_set'], '";

// ]]></script>

<title>', $context['page_title'], '</title>';



// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.

echo '

<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />

<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';



/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)

Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.

Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.

Standards compliance mode happens when you use xhtml... */

if ($context['browser']['needs_size_fix'])

echo '

<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';



// Show all the relative links, such as help, search, contents, and the like.

echo '

<link rel="help" href="', $scripturl, '?action=help" target="_blank" />

<link rel="search" href="' . $scripturl . '?action=search" />

<link rel="contents" href="', $scripturl, '" />';



// If RSS feeds are enabled, advertise the presence of one.

if (!empty($modSettings['xmlnews_enable']))

echo '

<link rel="alternate" type="application/rss xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';



// If we're viewing a topic, these should be the previous and next topics, respectively.

if (!empty($context['current_topic']))

echo '

<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />

<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';



// If we're in a board, or a topic for that matter, the index will be the board's index.

if (!empty($context['current_board']))

echo '

<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';



// We'll have to use the cookie to remember the header...

if ($context['user']['is_guest'])

$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)

echo $context['html_headers'], '

<!--[if lt IE 7.]>

<script defer type="text/javascript" src="' , $settings['theme_url'] , '/hfg.js"></script>

<![endif]-->';



echo '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

var myfontsize = ', empty($options['myfontsize']) ? ''90'' : ''' . $options['myfontsize']. ''' , ';

function setfontsize(size)

{';



 // Guests don't have theme options!!

 if ($context['user']['is_guest'])

echo '

document.cookie = "upshrink="   (mode ? 1 : 0);';

 else

echo '

smf_setThemeOption("collapse_leftbar", mode ? 1 : 0, null, "', $context['session_id'], '");';

 echo '

document.getElementById("upshrinkLeftbar").src = smf_images_url   (mode ? "/upshrink2.gif" : "/upshrink.gif");



document.getElementById("leftbarHeader").style.display = mode ? "none" : "";



current_leftbar = mode;

}

// ]]></script>

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

var current_rightbar = ', empty($options['collapse_rightbar']) ? 'false' : 'true', ';



function shrinkHeaderRightbar(mode)

{';



 // Guests don't have theme options!!

 if ($context['user']['is_guest'])

echo '

document.cookie = "upshrink="   (mode ? 1 : 0);';

 else

echo '

smf_setThemeOption("collapse_rightbar", mode ? 1 : 0, null, "', $context['session_id'], '");';



 echo '

document.getElementById("upshrinkRightbar").src = smf_images_url   (mode ? "/upshrink2.gif" : "/upshrink.gif");



document.getElementById("rightbarHeader").style.display = mode ? "none" : "";



current_rightbar = mode;

}

 // ]]></script>



<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';



function shrinkHeader(mode)

{';



// Guests don't have theme options!!

if ($context['user']['is_guest'])

echo '

document.cookie = "upshrink="   (mode ? 1 : 0);';

else

echo '

smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';



echo '

document.getElementById("upshrink").src = smf_images_url   (mode ? "/upshrink2.gif" : "/upshrink.gif");



document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";

document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";



current_header = mode;

}

// ]]></script>';



// the routine for the info center upshrink

echo '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';



function shrinkHeaderIC(mode)

{';



if ($context['user']['is_guest'])

echo '

document.cookie = "upshrinkIC="   (mode ? 1 : 0);';

else

echo '

smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';



echo '
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>
<div class="tophead">
</div>
</td></tr></table>

document.getElementById("upshrink_ic").src = smf_images_url   (mode ? "/expand.gif" : "/collapse.gif");



document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";



current_header_ic = mode;

}

// ]]></script>

</head>

 <body>


ควรวางตำแหน่ง code ตรงไหนอะครับ คือได้ code มาแล้ว แต่พอจะใช้กับตัวนี้มันมี error อะครับ ไม่ค่อยถนัด php อะครับ

ช่วยหน่อยครับ

code ที่จะนำไปวางอะครับ ตรงตำแหน่ง body

code นี้อะครับ
onload="window.open('http://www.loveking.freeloadza.com/' );"
« แก้ไขครั้งสุดท้าย: 02 มิถุนายน 2012, 12:40:41 โดย HaNoY » บันทึกการเข้า
zelda
คนรักเสียว
*

พลังน้ำใจ: 38
ออฟไลน์ ออฟไลน์

กระทู้: 120



ดูรายละเอียด
« ตอบ #1 เมื่อ: 02 มิถุนายน 2012, 16:10:29 »

ใส่ backslash (\) ก่อนหน้า single quote (') ทุกตำแหน่งครับถึงจะไม่มี error
บันทึกการเข้า
หน้า: [1]   ขึ้นบน
พิมพ์