[問題]TOP5 問題

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

NOFX
星球公民
星球公民
文章: 61
註冊時間: 2003-07-18 12:53
來自: MARS

文章 NOFX »

看似不是背景問題,而是"字"及"表格列顏色"的問題
我想字型是黑色\r
剛看了一下你的網站發現你的overall_header.tpl讀一個css
你的templates/Elektro/Elektro.css又有一個css
當然你的top5會去讀你的 templates/Elektro/Elektro.css

解絕辦法如下::

#-----[ OPEN you templates Elektro.css]-----------------------------------

#-----[ REPLACE WITH ]-----------------

代碼: 選擇全部

/*
  The original Elektro Theme for phpBB version 2+
  Created by Totoelectro
  totoelectro@wanadoo.fr

  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: #e4c281;
	scrollbar-face-color: #e6d9ba;
	scrollbar-highlight-color: #FFFFFF;
	scrollbar-shadow-color: #e6d9ba;
	scrollbar-3dlight-color: #e4c281;
	scrollbar-arrow-color:  #000000;
	scrollbar-track-color: #e4c29f;
	scrollbar-darkshadow-color: #e4c281;
}

/* General font families for common tags */
font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }
a:link,a:active,a:visited { color : #000000; }
a:hover		{ text-decoration: underline; color : #DD6900; }
hr	{ height: 0px; border: solid #e4c281 0px; border-top-width: 1px;}

/* This is the border line & background colour round the entire page */
.bodyline	{ background-color: #FFFFFF; border: 1px #e4c281 solid; }

/* This is the outline round the main forum tables */
.forumline	{ background-color: #FFFFFF; border: 2px #e4c29f solid; }

/* Main table cell colours and backgrounds */
td.row1	{ background-color: #e4c29f; }
td.row2	{ background-color: #e6d9ba; }
td.row3	{ background-color: #e4c281; }

/*
  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: #FFFFFF;
		background-image: url(templates/Elektro/images/cellpic2.jpg);
		background-repeat: repeat-y;
}

/* Header cells - the blue and silver gradient backgrounds */
th	{
	color: #990033; font-size: 11px; font-weight : bold;
	background-color: #000000; height: 25px;
	background-image: url(templates/Elektro/images/cellpic3.gif);
}

td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
			background-image: url(templates/Elektro/images/cellpic1.gif);
			background-color:#e4c281; border: #FFFFFF; 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: #FFFFFF; border-style: solid; height: 28px;
}
td.row3Right,td.spaceRow {
	background-color: #e4c281; border: #FFFFFF; border-style: solid;
}

th.thHead,td.catHead { font-size: 12px; 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: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
	text-decoration: none; line-height : 120%; color : #000000;
}

/* General text */
.gen { font-size : 12px; }
.genmed { font-size : 11px; }
.gensmall { font-size : 10px; }
.gen,.genmed,.gensmall { color : #000000; }
a.gen,a.genmed,a.gensmall { color: #000000; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover	{ color: #DD6900; text-decoration: underline; }

/* The register, login, search etc links at the top of the page */
.mainmenu		{ font-size : 11px; color : #000000 }
a.mainmenu		{ text-decoration: none; color : #000000;  }
a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }

/* Forum category titles */
.cattitle		{ font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #000000}
a.cattitle		{ text-decoration: none; color : #000000; }
a.cattitle:hover{ text-decoration: underline; }

/* Forum title: Text and link to the forums used in: index.php */
.forumlink		{ font-weight: bold; font-size: 12px; color : #000000; }
a.forumlink 	{ text-decoration: none; color : #000000; }
a.forumlink:hover{ text-decoration: underline; color : #DD6900; }

/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav			{ font-weight: bold; font-size: 11px; color : #000000;}
a.nav			{ text-decoration: none; color : #000000; }
a.nav:hover		{ text-decoration: underline; }

/* titles for the topics: could specify viewed link colour too */
.topictitle,h1,h2	{ font-weight: bold; font-size: 11px; color : #000000; }
a.topictitle:link   { text-decoration: none; color : #000000; }
a.topictitle:visited { text-decoration: none; color : #000000; }
a.topictitle:hover	{ text-decoration: underline; color : #DD6900; }

/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name			{ font-size : 11px; color : #000000;}

/* Location, number of posts, post date etc */
.postdetails		{ font-size : 10px; color : #000000; }

/* The content of the posts (body of text) */
.postbody { font-size : 12px; line-height: 18px}
a.postlink:link	{ text-decoration: none; color : #000000 }
a.postlink:visited { text-decoration: none; color : #000000; }
a.postlink:hover { text-decoration: underline; color : #DD6900}

/* Quote & Code blocks */
.code {
	font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
	background-color: #FAFAFA; border: #e4c281; border-style: solid;
	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}

.quote {
	font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
	background-color: #FAFAFA; border: #e4c281; 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: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}
a.copyright		{ color: #444444; text-decoration: none;}
a.copyright:hover { color: #000000; text-decoration: underline;}

/* Form elements */
input,textarea, select {
	color : #000000;
	font: normal 11px Verdana, Arial, Helvetica, sans-serif;
	border-color : #000000;
}

/* The text input fields background colour */
input.post, textarea.post, select {
	background-color : #FFFFFF;
}

input { text-indent : 2px; }

/* The buttons used for bbCode styling in message post */
input.button {
	background-color : #e4c29f;
	color : #000000;
	font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;
}

/* The main submit button option */
input.mainoption {
	background-color : #FAFAFA;
	font-weight : bold;
}

/* None-bold submit button */
input.liteoption {
	background-color : #FAFAFA;
	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: #e6d9ba; border-style: none; }

/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/Elektro/formIE.css");

#-----[ SAVE, CLOSE]-----------------------------
#-----[ OPEN you templates overall_header.tpl]-------------------------------

代碼: 選擇全部

#-----[ FIND ]----------------

<!-- link rel="stylesheet" href="templates/Elektro/Elektro.css" type="text/css" -->

#-----[ REPLACE WITH ]-----------------  

<link rel="stylesheet" href="templates/Elektro/Elektro.css" type="text/css" />

#-----[ FIND ]----------------
<!--
/*
  The original Elektro Theme for phpBB version 2+
  Created by Totoelectro
  totoelectro@wanadoo.fr
.........................................
.......................................
到\r
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/Elektro/formIE.css");
-->
這段全刪\r
#-----[ SAVE, CLOSE]-----------------------------
#-----[ OPEN you templates adv_top5_body.tpl]--------------------

代碼: 選擇全部

#-----[ FIND ]--------------------------------------
<body bgcolor="#e4c29f">

#-----[ REPLACE WITH ]---------------------
<body background="templates/Elektro/images/bac.jpg" bgcolor="#e4c281" text="#000000" link="#000000" vlink="#000000" />

#-----[ FIND ]--------------------------------------

<tr> 
	  <th align="center" class="thCornerL" width="20%">{L_FORUM}</th>
	  <th align="center" class="thTop" width="40%">{L_TOPICS}</th>
	  <th align="center" class="thTop" nowrap>{L_AUTHOR}</th>
	  <th align="center" class="thTop" nowrap>{L_REPLIES}</th>
	  <th align="center" class="thTop" nowrap>{L_VIEWS}</th>
	  <th align="center" class="thCornerR" nowrap>{L_LASTPOST}</th>
	</tr>

#-----[ REPLACE WITH ]---------------------

<tr> 
	  <td align="center" class="thCornerL" width="20%">{L_FORUM}</td>
	  <td align="center" class="thTop" width="40%">{L_TOPICS}</td>
	  <td align="center" class="thTop" nowrap>{L_AUTHOR}</th>
	  <td align="center" class="thTop" nowrap>{L_REPLIES}</td>
	  <td align="center" class="thTop" nowrap>{L_VIEWS}</td>
	  <td align="center" class="thCornerR" nowrap>{L_LASTPOST}</td>
	</tr>

#-----[ SAVE, CLOSE]---------------------
這樣你的top5 or forum 就統一了,以後要改顏色字體也可以到you css file control..... :-D
mit
星球公民
星球公民
文章: 247
註冊時間: 2003-10-23 18:26
來自: 壞鄰居社區
聯繫:

文章 mit »

終於有人說出來了~


我在雞婆的做補充一下吧:
phpbb的預設風格subSilver的overall_header裡都有加上style標籤,
這些標籤裡都是用類似{TD_FONTCOLOR}這種變數到資料庫裡讀取你從後台儲存的style資料。
而不是用連結style sheet的方式直接使用你風格資料夾裡頭的那顆subSilver.css!
這點在FI的風格裡都修正過了,
亦即FI的風格都是直接連結使用FIXXXXX.css檔~

這有什麼差別呢?
差別在如果overall_header裡有style標籤,那網頁當然直接讀這裡的style設定,
所以你跑去改.css是沒有用的!
但是如果overall_header裡有這段:
<link rel="stylesheet" href="templates/XXXXX/XXXXXX.css" type="text/css" />
(這是連結style sheet的語法)
那網頁讀取的風格資料就會來自你的XXXXXX.css檔,
因此這時候只要改.css檔就好了~
跑到後台去編輯風格資料是沒有用的!



這些問題我剛裝好phpbb的時候也發現了,
很納悶為什麼官方要做這樣的設計。:-?
要不就乾脆把style寫進overall_header,要不就直接連結style sheet,
幹嘛這麼龜毛還兩邊都弄呢?
竹貓上也常常看到有人問這種問題「為什麼我改了.css還是沒有用」,
我總是覺得這也許就是主因,
偏偏從來都沒看過有人討論過。

總之既然被提出來了,
希望能解決那些風格一直搞不定的人的問題囉.... :mrgreen:
圖檔
神僕
星球公民
星球公民
文章: 171
註冊時間: 2003-02-13 02:45

文章 神僕 »

哦...原來是如此這般~~~

終於~~~~~~~~~~成功了!!成功了!!成功了!!成功了!!成功了!!

太好了!!!多謝各大大的幫助,實在是太好 :-P
使用版本:phpBB 3.0.2
網站位置:http://www.hkvalue.net/forum
狀況描述:

http://www.hkvalue.net/forum

很想做得更好,可否多多指點 ^^
主題已鎖定

回到「外掛問題討論」