[問題] 跑馬燈公告1.2版 - 置中問題
版主: 版主管理群
[問題] 跑馬燈公告1.2版 - 置中問題
爬文已久,仍未找到將《跑馬燈公告》置中的方法。
另外,可否加入字形效果於公告文字???
請各位高手賜教,Thank You!!!
另外,可否加入字形效果於公告文字???
請各位高手賜教,Thank You!!!
打開index_body.tpl
找到\r
===================================
{L_INDEX}</a></span>
===================================
在後面加上
===================================
<br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee>
===================================
在紅色字體的75和50%這兩個設定
試看看~
找到\r
===================================
{L_INDEX}</a></span>
===================================
在後面加上
===================================
<br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee>
===================================
在紅色字體的75和50%這兩個設定
試看看~
不行呀...yjsboy 寫:打開index_body.tpl
找到\r
===================================
{L_INDEX}</a></span>
===================================
在後面加上
===================================
<br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee>
===================================
在紅色字體的75和50%這兩個設定
試看看~
scrolldelay and width 只是改變《跑馬燈公告》的速度及闊度
有沒有其他高手可以指點一下???
引用 yjsboy 兄所寫的語法,SaiKei 寫:不行呀...yjsboy 寫:打開index_body.tpl
找到\r
===================================
{L_INDEX}</a></span>
===================================
在後面加上
===================================
<br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee>
===================================
在紅色字體的75和50%這兩個設定
試看看~
scrolldelay and width 只是改變《跑馬燈公告》的速度及闊度...
有沒有其他高手可以指點一下???
假如您要置中的話, 可以試試如此修改:
代碼: 選擇全部
#
#-----[ FIND ]-----
#
<br>
#
#-----[ REPLACE WITH ]-----
#
<p align="center">
#
#-----[ FIND ]-----
#
</marquee>
#
#-----[ IN LINE, AFTER, ADD ]-----
#
</p>
代碼: 選擇全部
#
#-----[ FIND ]-----
#
onmouseout=this.start();
#
#-----[ IN LINE, AFTER, ADD ]-----
# 請自行指定 RGB 值\r\n style="color: #0000FF" bgcolor="#FFFF00"
[問題] 跑馬燈公告1.2版 - 置中問題
代碼: 選擇全部
打開 includes/page_header.php
找到
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
前面加上
// 跑馬燈公告 By Martinet Oaf~
$sql = "SELECT * FROM phpbb_announce ORDER BY a_order";
if(!$a_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query Announce information", "", __LINE__, __FILE__, $sql);
}
$i=0;
$marque = "";
while ($a_row = $db->sql_fetchrow($a_result))
{
$i++;
$a_name = $a_row['a_name'];
$a_url = $a_row['a_url'];
$marque .= "<span class=\"genmed\"><b><a href=\"$a_url\">[$i]$a_name</a></b> </span>";
}
if($i == 0)
$marque = "<span class=\"genmed\"><b>".$lang['Announce_no_announce']."</b></span>";
// 跑馬燈公告結束
找到
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
下面加上
'ANNOUNCEMENT'=>$marque,
然後在 overall_header.tpl內喜歡的地方放置
<br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee>
我利用以上方法來加入跑馬燈外掛..
但怎樣也無法把跑馬燈置中...
請問要怎樣才能置中呢??
我的程式碼.. 這裡是overall_header.tpl
代碼: 選擇全部
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<!-- link rel="stylesheet" href="templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" -->
<style type="text/css">
<!--
/*
The original subSilver Theme for phpBB version 2+
Created by subBlue design
http://www.subBlue.com
NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
theme administration centre. When you have finalised your style you could cut the final CSS code
and place it in an external file, deleting this section to save bandwidth.
*/
/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
background-color: {T_BODY_BGCOLOR};
scrollbar-face-color: {T_TR_COLOR2};
scrollbar-highlight-color: {T_TD_COLOR2};
scrollbar-shadow-color: {T_TR_COLOR2};
scrollbar-3dlight-color: {T_TR_COLOR3};
scrollbar-arrow-color: {T_BODY_LINK};
scrollbar-track-color: {T_TR_COLOR1};
scrollbar-darkshadow-color: {T_TH_COLOR1};
}
/* General font families for common tags */
font,th,td,p { font-family: {T_FONTFACE1} }
a:link,a:active,a:visited { color : {T_BODY_LINK}; }
a:hover { text-decoration: underline; color : {T_BODY_HLINK}; }
hr { height: 0px; border: solid {T_TR_COLOR3} 0px; border-top-width: 1px;}
/* This is the border line & background colour round the entire page */
.bodyline { background-color: {T_TD_COLOR2}; border: 1px {T_TH_COLOR1} solid; }
/* This is the outline round the main forum tables */
.forumline { background-color: {T_TD_COLOR2}; border: 2px {T_TH_COLOR2} solid; }
/* Main table cell colours and backgrounds */
td.row1 { background-color: {T_TR_COLOR1}; }
td.row2 { background-color: {T_TR_COLOR2}; }
td.row3 { background-color: {T_TR_COLOR3}; }
/*
This is for the table cell above the Topics, Post & Last posts on the index.php page
By default this is the fading out gradiated silver background.
However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
background-color: {T_TD_COLOR2};
background-image: url(templates/subSilver/images/{T_TH_CLASS3});
background-repeat: repeat-y;
}
/* Header cells - the blue and silver gradient backgrounds */
th {
color: {T_FONTCOLOR3}; font-size: {T_FONTSIZE2}px; font-weight : bold;
background-color: {T_BODY_LINK}; height: 25px;
background-image: url(templates/subSilver/images/{T_TH_CLASS2});
}
td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
background-image: url(templates/subSilver/images/{T_TH_CLASS1});
background-color:{T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; height: 28px;
}
/*
Setting additional nice inner borders for the main table cells.
The names indicate which sides the border will be on.
Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
height: 29px;
border-width: 0px 0px 0px 0px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
font-weight: bold; border: {T_TD_COLOR2}; border-style: solid; height: 28px;
}
td.row3Right,td.spaceRow {
background-color: {T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid;
}
th.thHead,td.catHead { font-size: {T_FONTSIZE3}px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom { border-width: 0px 1px 1px 1px; }
th.thTop { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }
/* The largest text used in the index page title and toptic title etc. */
.maintitle {
font-weight: bold; font-size: 22px; font-family: "{T_FONTFACE2}",{T_FONTFACE1};
text-decoration: none; line-height : 120%; color : {T_BODY_TEXT};
}
/* General text */
.gen { font-size : {T_FONTSIZE3}px; }
.genmed { font-size : {T_FONTSIZE2}px; }
.gensmall { font-size : {T_FONTSIZE1}px; }
.gen,.genmed,.gensmall { color : {T_BODY_TEXT}; }
a.gen,a.genmed,a.gensmall { color: {T_BODY_LINK}; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover { color: {T_BODY_HLINK}; text-decoration: underline; }
/* The register, login, search etc links at the top of the page */
.mainmenu { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT} }
a.mainmenu { text-decoration: none; color : {T_BODY_LINK}; }
a.mainmenu:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
/* Forum category titles */
.cattitle { font-weight: bold; font-size: {T_FONTSIZE3}px ; letter-spacing: 1px; color : {T_BODY_LINK}}
a.cattitle { text-decoration: none; color : {T_BODY_LINK}; }
a.cattitle:hover{ text-decoration: underline; }
/* Forum title: Text and link to the forums used in: index.php */
.forumlink { font-weight: bold; font-size: {T_FONTSIZE3}px; color : {T_BODY_LINK}; }
a.forumlink { text-decoration: none; color : {T_BODY_LINK}; }
a.forumlink:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
a.nav { text-decoration: none; color : {T_BODY_LINK}; }
a.nav:hover { text-decoration: underline; }
/* titles for the topics: could specify viewed link colour too */
.topictitle,h1,h2 { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT}; }
a.topictitle:link { text-decoration: none; color : {T_BODY_LINK}; }
a.topictitle:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.topictitle:hover { text-decoration: underline; color : {T_BODY_HLINK}; }
/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
/* Location, number of posts, post date etc */
.postdetails { font-size : {T_FONTSIZE1}px; color : {T_BODY_TEXT}; }
/* The content of the posts (body of text) */
.postbody { font-size : {T_FONTSIZE3}px; line-height: 18px}
a.postlink:link { text-decoration: none; color : {T_BODY_LINK} }
a.postlink:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.postlink:hover { text-decoration: underline; color : {T_BODY_HLINK}}
/* Quote & Code blocks */
.code {
font-family: {T_FONTFACE3}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR2};
background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
.quote {
font-family: {T_FONTFACE1}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR1}; line-height: 125%;
background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
/* Copyright and bottom info */
.copyright { font-size: {T_FONTSIZE1}px; font-family: {T_FONTFACE1}; color: {T_FONTCOLOR1}; letter-spacing: -1px;}
a.copyright { color: {T_FONTCOLOR1}; text-decoration: none;}
a.copyright:hover { color: {T_BODY_TEXT}; text-decoration: underline;}
/* Form elements */
input,textarea, select {
color : {T_BODY_TEXT};
font: normal {T_FONTSIZE2}px {T_FONTFACE1};
border-color : {T_BODY_TEXT};
}
/* The text input fields background colour */
input.post, textarea.post, select {
background-color : {T_TD_COLOR2};
}
input { text-indent : 2px; }
/* The buttons used for bbCode styling in message post */
input.button {
background-color : {T_TR_COLOR1};
color : {T_BODY_TEXT};
font-size: {T_FONTSIZE2}px; font-family: {T_FONTFACE1};
}
/* The main submit button option */
input.mainoption {
background-color : {T_TD_COLOR1};
font-weight : bold;
}
/* None-bold submit button */
input.liteoption {
background-color : {T_TD_COLOR1};
font-weight : normal;
}
/* This is the line in the posting page which shows the rollover
help line. This is actually a text box, but if set to be the same
colour as the background no one will know ;)
*/
.helpline { background-color: {T_TR_COLOR2}; border-style: none; }
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/subSilver/formIE.css");
-->
</style>
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}
//-->
</script>
<!-- END switch_enable_pm_popup -->
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<a name="top"></a>
<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
<tr>
<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" />[color=red]<br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee>[/color]</a><br></td>
<td align="center" width="100%" valign="middle"><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}<br /> </span>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>
<!-- BEGIN switch_user_logged_out -->
<a href="{U_REGISTER}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a></span>
<!-- END switch_user_logged_out -->
</td>
</tr>
<tr>
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a> <a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a> <a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a> </span></td>
</tr>
</table></td>
</tr>
</table>
<br />
但怎樣也無法置中...
這是結果,請看以下連結http://dc.ptivs.tnc.edu.tw/~dc_dean20/p ... /index.php
請各位大大幫我看一下問題在哪..
架設主機作業系統:Windows Server 2003
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
代碼: 選擇全部
#
#-----[ FIND ]-----
#
<td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /><br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee></a><br></td>
#
#-----[ REPLACE WITH ]-----
#
<td><a href="{U_INDEX}"><center><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /><br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee></center></a><br></td> Re: [問題] 跑馬燈公告1.2版 - 置中問題
有察覺到您發表很多篇相關問題的文章,dean20 寫: 紅色部份為我放置的位置.
但怎樣也無法置中...
這是結果,請看以下連結http://dc.ptivs.tnc.edu.tw/~dc_dean20/p ... /index.php
請各位大大幫我看一下問題在哪..
但是我還是沒有很清楚您的問題核心.
因為" 置中", 只是相對的位置概念;
所以, 您要講清楚" 要在哪個位置" 置中.
是整個版面, 還是在 logo 圖示下, 或者是在 {SITENAME} 下,...置中.
依照您紅字的部份修改, 只是在 logo 圖示下置中;
如果您能夠再說明清楚您所要的" 置中" 位置的話,
那麼將會比較容易解決您的問題.
[問題] 跑馬燈1.2版,置中的問題
代碼: 選擇全部
打開 includes/page_header.php
找到
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
前面加上
// 跑馬燈公告 By Martinet Oaf~
$sql = "SELECT * FROM phpbb_announce ORDER BY a_order";
if(!$a_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query Announce information", "", __LINE__, __FILE__, $sql);
}
$i=0;
$marque = "";
while ($a_row = $db->sql_fetchrow($a_result))
{
$i++;
$a_name = $a_row['a_name'];
$a_url = $a_row['a_url'];
$marque .= "<span class=\"genmed\"><b><a href=\"$a_url\">[$i]$a_name</a></b> </span>";
}
if($i == 0)
$marque = "<span class=\"genmed\"><b>".$lang['Announce_no_announce']."</b></span>";
// 跑馬燈公告結束
找到
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
下面加上
'ANNOUNCEMENT'=>$marque,
然後在 overall_header.tpl內喜歡的地方放置
<br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee>
我利用以上方法來加入跑馬燈外掛..
但怎樣也無法把跑馬燈置中...
請問要怎樣才能置中呢?? (我想將跑馬燈的位置放在yourdomain.com 首頁那一列的中間...)
我的程式碼.. 這裡是overall_header.tpl
代碼: 選擇全部
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<!-- link rel="stylesheet" href="templates/subSilver/{T_HEAD_STYLESHEET}" type="text/css" -->
<style type="text/css">
<!--
/*
The original subSilver Theme for phpBB version 2+
Created by subBlue design
http://www.subBlue.com
NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
theme administration centre. When you have finalised your style you could cut the final CSS code
and place it in an external file, deleting this section to save bandwidth.
*/
/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
background-color: {T_BODY_BGCOLOR};
scrollbar-face-color: {T_TR_COLOR2};
scrollbar-highlight-color: {T_TD_COLOR2};
scrollbar-shadow-color: {T_TR_COLOR2};
scrollbar-3dlight-color: {T_TR_COLOR3};
scrollbar-arrow-color: {T_BODY_LINK};
scrollbar-track-color: {T_TR_COLOR1};
scrollbar-darkshadow-color: {T_TH_COLOR1};
}
/* General font families for common tags */
font,th,td,p { font-family: {T_FONTFACE1} }
a:link,a:active,a:visited { color : {T_BODY_LINK}; }
a:hover { text-decoration: underline; color : {T_BODY_HLINK}; }
hr { height: 0px; border: solid {T_TR_COLOR3} 0px; border-top-width: 1px;}
/* This is the border line & background colour round the entire page */
.bodyline { background-color: {T_TD_COLOR2}; border: 1px {T_TH_COLOR1} solid; }
/* This is the outline round the main forum tables */
.forumline { background-color: {T_TD_COLOR2}; border: 2px {T_TH_COLOR2} solid; }
/* Main table cell colours and backgrounds */
td.row1 { background-color: {T_TR_COLOR1}; }
td.row2 { background-color: {T_TR_COLOR2}; }
td.row3 { background-color: {T_TR_COLOR3}; }
/*
This is for the table cell above the Topics, Post & Last posts on the index.php page
By default this is the fading out gradiated silver background.
However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
background-color: {T_TD_COLOR2};
background-image: url(templates/subSilver/images/{T_TH_CLASS3});
background-repeat: repeat-y;
}
/* Header cells - the blue and silver gradient backgrounds */
th {
color: {T_FONTCOLOR3}; font-size: {T_FONTSIZE2}px; font-weight : bold;
background-color: {T_BODY_LINK}; height: 25px;
background-image: url(templates/subSilver/images/{T_TH_CLASS2});
}
td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
background-image: url(templates/subSilver/images/{T_TH_CLASS1});
background-color:{T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; height: 28px;
}
/*
Setting additional nice inner borders for the main table cells.
The names indicate which sides the border will be on.
Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
height: 29px;
border-width: 0px 0px 0px 0px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
font-weight: bold; border: {T_TD_COLOR2}; border-style: solid; height: 28px;
}
td.row3Right,td.spaceRow {
background-color: {T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid;
}
th.thHead,td.catHead { font-size: {T_FONTSIZE3}px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom { border-width: 0px 1px 1px 1px; }
th.thTop { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }
/* The largest text used in the index page title and toptic title etc. */
.maintitle {
font-weight: bold; font-size: 22px; font-family: "{T_FONTFACE2}",{T_FONTFACE1};
text-decoration: none; line-height : 120%; color : {T_BODY_TEXT};
}
/* General text */
.gen { font-size : {T_FONTSIZE3}px; }
.genmed { font-size : {T_FONTSIZE2}px; }
.gensmall { font-size : {T_FONTSIZE1}px; }
.gen,.genmed,.gensmall { color : {T_BODY_TEXT}; }
a.gen,a.genmed,a.gensmall { color: {T_BODY_LINK}; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover { color: {T_BODY_HLINK}; text-decoration: underline; }
/* The register, login, search etc links at the top of the page */
.mainmenu { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT} }
a.mainmenu { text-decoration: none; color : {T_BODY_LINK}; }
a.mainmenu:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
/* Forum category titles */
.cattitle { font-weight: bold; font-size: {T_FONTSIZE3}px ; letter-spacing: 1px; color : {T_BODY_LINK}}
a.cattitle { text-decoration: none; color : {T_BODY_LINK}; }
a.cattitle:hover{ text-decoration: underline; }
/* Forum title: Text and link to the forums used in: index.php */
.forumlink { font-weight: bold; font-size: {T_FONTSIZE3}px; color : {T_BODY_LINK}; }
a.forumlink { text-decoration: none; color : {T_BODY_LINK}; }
a.forumlink:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
a.nav { text-decoration: none; color : {T_BODY_LINK}; }
a.nav:hover { text-decoration: underline; }
/* titles for the topics: could specify viewed link colour too */
.topictitle,h1,h2 { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT}; }
a.topictitle:link { text-decoration: none; color : {T_BODY_LINK}; }
a.topictitle:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.topictitle:hover { text-decoration: underline; color : {T_BODY_HLINK}; }
/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
/* Location, number of posts, post date etc */
.postdetails { font-size : {T_FONTSIZE1}px; color : {T_BODY_TEXT}; }
/* The content of the posts (body of text) */
.postbody { font-size : {T_FONTSIZE3}px; line-height: 18px}
a.postlink:link { text-decoration: none; color : {T_BODY_LINK} }
a.postlink:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.postlink:hover { text-decoration: underline; color : {T_BODY_HLINK}}
/* Quote & Code blocks */
.code {
font-family: {T_FONTFACE3}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR2};
background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
.quote {
font-family: {T_FONTFACE1}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR1}; line-height: 125%;
background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
/* Copyright and bottom info */
.copyright { font-size: {T_FONTSIZE1}px; font-family: {T_FONTFACE1}; color: {T_FONTCOLOR1}; letter-spacing: -1px;}
a.copyright { color: {T_FONTCOLOR1}; text-decoration: none;}
a.copyright:hover { color: {T_BODY_TEXT}; text-decoration: underline;}
/* Form elements */
input,textarea, select {
color : {T_BODY_TEXT};
font: normal {T_FONTSIZE2}px {T_FONTFACE1};
border-color : {T_BODY_TEXT};
}
/* The text input fields background colour */
input.post, textarea.post, select {
background-color : {T_TD_COLOR2};
}
input { text-indent : 2px; }
/* The buttons used for bbCode styling in message post */
input.button {
background-color : {T_TR_COLOR1};
color : {T_BODY_TEXT};
font-size: {T_FONTSIZE2}px; font-family: {T_FONTFACE1};
}
/* The main submit button option */
input.mainoption {
background-color : {T_TD_COLOR1};
font-weight : bold;
}
/* None-bold submit button */
input.liteoption {
background-color : {T_TD_COLOR1};
font-weight : normal;
}
/* This is the line in the posting page which shows the rollover
help line. This is actually a text box, but if set to be the same
colour as the background no one will know ;)
*/
.helpline { background-color: {T_TR_COLOR2}; border-style: none; }
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/subSilver/formIE.css");
-->
</style>
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{
window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
}
//-->
</script>
<!-- END switch_enable_pm_popup -->
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<a name="top"></a>
\r
<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
<tr>
<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" />[color=red]<br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee>[/color]</a><br></td>
<td align="center" width="100%" valign="middle"><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}<br /> </span>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>
<!-- BEGIN switch_user_logged_out -->
<a href="{U_REGISTER}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a></span>
<!-- END switch_user_logged_out -->
</td>
</tr>
<tr>
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a> <a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a> <a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a> </span></td>
</tr>
</table></td>
</tr>
</table>
<br />
但怎樣也無法置中...
這是結果,請看以下連結http://dc.ptivs.tnc.edu.tw/~dc_dean20/p ... /index.php
我想將跑馬燈的位置放在yourdomain.com 首頁那一列的中間...
請各位大大幫我看一下問題在哪..[/url]
架設主機作業系統:Windows Server 2003
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
clpl 寫:試試看代碼: 選擇全部
# #-----[ FIND ]----- # <td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /><br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee></a><br></td> # #-----[ REPLACE WITH ]----- # <td><a href="{U_INDEX}"><center><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /><br><img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="50%" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee></center></a><br></td>
sorry!!我沒說清楚置中的意思...
我是希望能把跑馬燈的位置放在yourdomain.com 首頁那一列的中間!! 請問你知道如何修改嗎??
架設主機作業系統:Windows Server 2003
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
Re: [問題] 跑馬燈1.2版,置中的問題
如果您是要放在yourdomain.com 首頁那一列的中間...dean20 寫:紅色部份為我放置的位置.
但怎樣也無法置中...
這是結果,請看以下連結http://dc.ptivs.tnc.edu.tw/~dc_dean20/p ... /index.php
我想將跑馬燈的位置放在yourdomain.com 首頁那一列的中間...
請各位大大幫我看一下問題在哪..[/url]
那麼是應該將" 跑馬燈的語法" 加在 index_body.tpl 才對!
建議您:
參考上頭的討論文章, 修改看看!
剛剛看了我在上頭的文章後,
發現並無法達到您的要求.
稍微做了以下的修改, 您可以參考看看:
ps. 紅字部分請自行調整.
發現並無法達到您的要求.
稍微做了以下的修改, 您可以參考看看:
代碼: 選擇全部
#
#-----[ Open ]-----
#
templates/YOUR_THEME/index_body.tpl
#
#-----[ Find ]-----
# ( 最上面的第一個 <table...>...</table>)
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="bottom"><span class="gensmall">
<!-- BEGIN switch_user_logged_in -->
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
<td align="right" valign="bottom" class="gensmall">
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
</tr>
</table>
#
#-----[ Replace With ]-----
#
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
<td [color=red]width="200"[/color] align="left" valign="bottom"><span class="gensmall">
<!-- BEGIN switch_user_logged_in -->
{LAST_VISIT_DATE}<br />
<!-- END switch_user_logged_in -->
{CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
[color=red]<td align="center">
<img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="200" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee>
</td>[/color]
<td [color=red]width="200"[/color] align="right" valign="bottom" class="gensmall">
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
</tr>
</table>
心靈捕手 寫:剛剛看了我在上頭的文章後,
發現並無法達到您的要求.
稍微做了以下的修改, 您可以參考看看:ps. 紅字部分請自行調整.代碼: 選擇全部
# #-----[ Open ]----- # templates/YOUR_THEME/index_body.tpl # #-----[ Find ]----- # ( 最上面的第一個 <table...>...</table>) <table width="100%" cellspacing="0" cellpadding="2" border="0" align="center"> <tr> <td align="left" valign="bottom"><span class="gensmall"> <!-- BEGIN switch_user_logged_in --> {LAST_VISIT_DATE}<br /> <!-- END switch_user_logged_in --> {CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td> <td align="right" valign="bottom" class="gensmall"> <!-- BEGIN switch_user_logged_in --> <a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br /> <!-- END switch_user_logged_in --> <a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td> </tr> </table> # #-----[ Replace With ]----- # <table width="100%" cellspacing="0" cellpadding="2" border="0" align="center"> <tr> <td [color=red]width="200"[/color] align="left" valign="bottom"><span class="gensmall"> <!-- BEGIN switch_user_logged_in --> {LAST_VISIT_DATE}<br /> <!-- END switch_user_logged_in --> {CURRENT_TIME}<br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td> [color=red]<td align="center"> <img src="images/announce.gif"><marquee scrollamount=3 scrolldelay=75 width="200" onmouseover=this.stop(); onmouseout=this.start();>{ANNOUNCEMENT}</marquee> </td>[/color] <td [color=red]width="200"[/color] align="right" valign="bottom" class="gensmall"> <!-- BEGIN switch_user_logged_in --> <a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br /><a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br /> <!-- END switch_user_logged_in --> <a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td> </tr> </table>
謝謝你.. 我已經成功囉...!!! ^^
還有請問一下.. 我的跑馬燈公告第一個與第二個距離很近..
這是連結http://av8d.twbbs.org/~dc_dean20
請問要如何才能調整開呢?? (調整開的意思就是將公告與公告的距離拉遠)
要怎樣修改檔案??
架設主機作業系統:Windows Server 2003
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
剛才試裝了一下, 發現距離並沒有很近啊!dean20 寫:謝謝你.. 我已經成功囉...!!! ^^
還有請問一下.. 我的跑馬燈公告第一個與第二個距離很近..
這是連結http://av8d.twbbs.org/~dc_dean20
請問要如何才能調整開呢?? (調整開的意思就是將公告與公告的距離拉遠)
要怎樣修改檔案??
我想可能是, 您使用的是舊有的資料吧!
您比對一下這裡( 紅字部分)的資料看看:
代碼: 選擇全部
打開index.php
找到\r
===================================
//
// Start output of page
===================================
在上面加上
========================================================================================
// 跑馬燈公告 By Martinet Oaf~
$sql = "SELECT * FROM phpbb_announce ORDER BY a_order";
if(!$a_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query Announce information", "", __LINE__, __FILE__, $sql);
}
$i=0;
while ($a_row = $db->sql_fetchrow($a_result))
{
$i++;
$a_name = $a_row['a_name'];
$a_url = $a_row['a_url'];
[color=red]$marque .= "<span class="genmed"><b><a href="$a_url">[$i]$a_name</a></b>       </span>";[/color]
}
if($i == 0)
$marque = $lang['Announce_no_announce'];
// 跑馬燈公告結束
===========================================================================================
http://phpbb-tw.net/phpbb/viewtopic.php?p=173983#173983
同時發覺有很多相關討論跑馬燈的文章, 在此做個小小的整理:
- 如果您是要將跑馬燈的語法放在 overall_header.tpl
那麼您相關的修改, 主要在 includes/page_header.php 以及 overall_header.tpl
http://phpbb-tw.net/phpbb/viewtopic.php?p=174054#174054 - 如果您是要將跑馬燈語法放在 index_body.tpl
那麼您相關的修改, 主要在 index.php 以及 index_body.tpl
http://phpbb-tw.net/phpbb/viewtopic.php?p=193968#193968


