phpbb3的风格文件存放于style目录中,其层次结构为:
--styles文件夹
----以风格名称命名的文件夹(如:subsilver2)
--------imageset文件夹
------------en文件夹
------------zh_cmn_hans文件夹
------------zh_cmn_hant文件夹
--------template文件夹
--------theme文件夹
--------style.cfg文件
下面我们来大体说一下这些文件和文件夹的作用。
- styles文件夹:用来存放phpbb3所使用的各种风格,如里面的prosilver文件夹、subsilver2文件夹等。
- 以风格名称命名的文件夹:用来保存本风格所使用的所有文件及文件夹,里面包含了上面所列出的imageset文件夹、template文件夹、theme文件夹和style.cfg文件,共三个文件夹和一个文件。
- imageset文件夹:此文件夹中包含了phpbb3风格使用的所有系统图标,比如有新帖、无新帖、锁定、置顶等等此类图标和一个imageset.cfg文件。在imageset文件夹还包含了不同语言的功能图标,比如发贴、回帖、编辑、引用等,都放置在与其语言文件同名的文件夹中,如en文件夹中放置了支持英文的功能图标,zh_cmn_hans文件夹为简体中文,zh_cmn_hant文件夹为繁体中文,在这些文件夹中分别也都包含一个imageset.cfg文件。
- template文件夹:包含了风格所要使用的所有模板(模板用来控制页面的布局,起框架的作用)和一个template.cfg文件,有的还含有支持一些特效的js文件等。
- theme文件夹:包含images文件夹(用于存放风格中所使用的所有背景图片如页面背景图片、表格背景图片等等),css文件(大多数以subsilver2为基础的风格中只含有一个stylesheet.css文件,但是以prosilver为基础的风格可能含有很多,毕竟使用DIV为基础的风格需要巨量的CSS支持,其CSS文件的大小比以表格为基础的风格大出7倍左右),和一个theme.cfg文件。
- style.cfg文件:这个文件包含了作者信息、风格信息、版权信息和版本信息,你可以在风格管理后台中看到这些信息。我们以subsilver2为例大体说下:
#
# phpBB Style Configuration File
#
# @package phpBB3 (程序名称)
# @copyright (c) 2005 phpBB Group (程序版权信息)
# @license http://opensource.org/licenses/gpl-license.php GNUPublic License (许可证信息)
#
#
# At the left is the name, please do not change this
# At the right the value is entered
# For on/off options the valid values are on, off, 1, 0, true andfalse
#
# Values get trimmed, if you want to add a space in front or at theend of
# the value, then enclose the value with single or doublequotes.
# Single and double quotes do not need to be escaped.
#
#
(以上的内容为phpbb的程序信息,不需修改,下面的为风格信息,需要修改)
# General Information about this style
name = subsilver2 (这里为风格名称,需将其改为你的和你的风格文件夹同名)
copyright = © 2005 phpBB Group (风格的版权信息,将2005 phpBBGroup替换为你的信息)
version = 3.0.2 (风格的版本信息)
其他的.cfg文件(以subsilver2为例)也在这里说明一下,这些文件和style.cfg文件一样都是必须修改的,否则系统就不能正常加载你的风格 - imageset中的imageset.cfg文件
#
# phpBB Imageset Configuration File
#
# @package phpBB3
# @copyright (c) 2005 phpBB Group
# @license http://opensource.org/licenses/gpl-license.php GNUPublic License
#
#
# At the left is the name, please do not change this
# At the right the value is entered
# For on/off options the valid values are on, off, 1, 0, true andfalse
#
# Values get trimmed, if you want to add a space in front or at theend of
# the value, then enclose the value with single or doublequotes.
# Single and double quotes do not need to be escaped.
#
#
# General Information about thisstyle(将以下三行改为与style.cfg一样的内容)
name = subsilver2
copyright = © phpBB Group, 2003
version = 3.0.2
(将以下等号右边的部分替换为你的内容,等号左边不能修改)
# Images
img_site_logo = site_logo.gif*94*170(logo图片的文件名及大小设置)
img_upload_bar = upload_bar.gif*16*280(文件上传过程中显示的图片)
img_poll_left = poll_left.gif*12*4(投票示意图图片,由三个部分构成,这是左端背景图片)
img_poll_center = poll_center.gif*12*(投票示意图图片,由三个部分构成,这是中间背景图片)
img_poll_right = poll_right.gif*12*4(投票示意图图片,由三个部分构成,这是右端背景图片)
img_icon_friend=(好友图标)
img_icon_foe=(损友即黑名单图标)
img_forum_link =forum_link.gif*25*46(如果版块为一个外部链接时所显示的图标)
img_forum_read =forum_read.gif*25*46(没有新帖的版块图标)
img_forum_read_locked =forum_read_locked.gif*25*46(没有新帖的被锁定的版块图标)
img_forum_read_subforum = forum_read_subforum.gif*25*46(含子版块的没有新帖的版块图标)
img_forum_unread = forum_unread.gif*25*46(有新帖的版块图标)
img_forum_unread_locked = forum_unread_locked.gif*25*46(有新帖的被锁定的版块图标)
img_forum_unread_subforum = forum_unread_subforum.gif*25*46(含子版块的没有新帖的版块图标)
img_topic_moved = topic_moved.gif*18*19(被移动的帖子的图标)
img_topic_read = topic_read.gif*18*19 (无新帖的帖子的图标)
img_topic_read_mine = topic_read_mine.gif*18*19 (无新帖的自己的帖子图标)
img_topic_read_hot = topic_read_hot.gif*18*19(无新帖的热门帖子的图标)
img_topic_read_hot_mine =topic_read_hot_mine.gif*18*19(无新帖的自己的热门帖子图标)
img_topic_read_locked = topic_read_locked.gif*18*19(无新帖的被锁定帖子的图标)
img_topic_read_locked_mine =topic_read_locked_mine.gif*18*19(无新帖的自己的被锁定帖子的图标)
img_topic_unread = topic_unread.gif*18*19 (有新帖的帖子的图标)
img_topic_unread_mine = topic_unread_mine.gif*18*19(有新帖的自己的帖子的图标)
img_topic_unread_hot = topic_unread_hot.gif*18*19(有新帖的热门帖子图标)
img_topic_unread_hot_mine =topic_unread_hot_mine.gif*18*19(有新帖的自己的热门帖子图标)
img_topic_unread_locked =topic_unread_locked.gif*18*19(无新帖的被锁定帖子的图标)
img_topic_unread_locked_mine = topic_unread_locked_mine.gif*18*19(无新帖的自己的被锁定帖子的图标)
img_sticky_read = sticky_read.gif*18*19 (置顶且无新帖的帖子图标)
img_sticky_read_mine = sticky_read_mine.gif*18*19(无新帖的自己的置顶帖子的图标)
img_sticky_read_locked = sticky_read_locked.gif*18*19(无新帖的置顶且锁定的帖子图标)
img_sticky_read_locked_mine = sticky_read_locked_mine.gif*18*19(无新帖的置顶且锁定的自己的帖子图标)
img_sticky_unread = sticky_unread.gif*18*19 (置顶的有新帖的帖子图标)
img_sticky_unread_mine = sticky_unread_mine.gif*18*19(置顶的有新帖的自己的帖子的图标)
img_sticky_unread_locked = sticky_unread_locked.gif*18*19(有新帖子的置顶的且锁定的帖子的图标)
img_sticky_unread_locked_mine =sticky_unread_locked_mine.gif*18*19(有新帖子的置顶的且锁定的自己的帖子的图标)
img_announce_read = announce_read.gif*18*19 (无新帖的通知图标)
img_announce_read_mine = announce_read_mine.gif*18*19(无新帖的自己的通知的图标)
img_announce_read_locked = announce_read_locked.gif*18*19(无新帖的被锁定的通知的图标)
img_announce_read_locked_mine = announce_read_locked_mine.gif*18*19(无新帖的被锁定的自己的通知的图标)
img_announce_unread = announce_unread.gif*18*19 (有新帖的通知图标)
img_announce_unread_mine = announce_unread_mine.gif*18*19(有新帖的自己的通知的图标)
img_announce_unread_locked = announce_unread_locked.gif*18*19(有新帖的被锁定的通知的图标)
img_announce_unread_locked_mine =announce_unread_locked_mine.gif*18*19(有新帖的被锁定的自己的通知的图标)
img_global_read = announce_read.gif*18*19 (无新帖的全局通知图标)
img_global_read_mine =announce_read_mine.gif*18*19(无新帖的自己的全局通知的图标)
img_global_read_locked =announce_read_locked.gif*18*19(无新帖的被锁定的全局通知的图标)
img_global_read_locked_mine = announce_read_locked_mine.gif*18*19(无新帖的被锁定的自己的全局通知的图标)
img_global_unread = announce_unread.gif*18*19 (有新帖的全局通知图标)
img_global_unread_mine = announce_unread_mine.gif*18*19(有新帖的自己的全局通知图标)
img_global_unread_locked = announce_unread_locked.gif*18*19(有新帖的被锁定的全局通知的图标)
img_global_unread_locked_mine =announce_unread_locked_mine.gif*18*19 (有新帖的被锁定的自己的通知的图标)
img_subforum_read=(无新帖的子论坛显示的图标)
img_subforum_unread=(有新帖的子论坛显示的图标)
img_pm_read = topic_read.gif*18*19(没有新的短消息所显示的图标)
img_pm_unread = topic_unread.gif*18*19 (有新的短消息所显示的图标)
img_icon_back_top =(返回顶部的图标)
img_icon_post_target = icon_post_target.gif*9*12(帖子标志)
img_icon_post_target_unread = icon_post_target_unread.gif*9*12(有新帖的帖子标志)
img_icon_topic_attach = icon_topic_attach.gif*18*14(含附件帖子的图标)
img_icon_topic_latest =icon_topic_latest.gif*9*18(无新内容帖子的图标)
img_icon_topic_newest = icon_topic_newest.gif*9*18 (最新帖子图标)
img_icon_topic_reported = icon_topic_reported.gif*18*19(举报帖子的图标)
img_icon_topic_unapproved = icon_topic_unapproved.gif*18*19(未批准的帖子的图标)
(有新帖可理解为有新的主题或者新的回复,自己的可理解为作者是自己的)
imageset/zh_cmn_hans中的imageset.cfg
#
# phpBB Imageset Configuration File
#
# @package phpBB3
# @copyright (c) 2008 Chita Community
# @license http://opensource.org/licenses/gpl-license.php GNUPublic License
#
#
# At the left is the name, please do not change this
# At the right the value is entered
# For on/off options the valid values are on, off, 1, 0, true andfalse
#
# Values get trimmed, if you want to add a space in front or at theend of
# the value, then enclose the value with single or doublequotes.
# Single and double quotes do not need to be escaped.
#
#
# Images
img_icon_contact_aim = icon_contact_aim.gif(AIM图标)
img_icon_contact_email = icon_contact_email.gif (Email图标)
img_icon_contact_icq = icon_contact_icq.gif(ICQ图标)
img_icon_contact_jabber = icon_contact_jabber.gif (jabber图标)
img_icon_contact_msnm = icon_contact_msnm.gif(MSN图标)
img_icon_contact_pm = icon_contact_pm.gif(发短消息图标)
img_icon_contact_yahoo = icon_contact_yahoo.gif(Yahoo图标)
img_icon_contact_www = icon_contact_www.gif(个人网站图标)
img_icon_post_delete = icon_post_delete.gif(删除帖子图标)
img_icon_post_edit = icon_post_edit.gif(编辑帖子图标)
img_icon_post_info = icon_post_info.gif(帖子信息图标)
img_icon_post_quote = icon_post_quote.gif(引用帖子图标)
img_icon_post_report = icon_post_report.gif(报告帖子图标)
img_icon_user_online = icon_user_online.gif(用户在线时显示的图标)
img_icon_user_offline = icon_user_offline.gif(用户不在线时显示的图标)
img_icon_user_profile = icon_user_profile.gif(个人资料的图标)
img_icon_user_search = icon_user_search.gif(搜索图标)
img_icon_user_warn = icon_user_warn.gif(警告图标)
img_button_pm_forward =(转发短消息按钮)
img_button_pm_new = button_pm_new.gif(发短信息按钮)
img_button_pm_reply = button_pm_reply.gif(回复短消息按钮)
img_button_topic_locked = button_topic_locked.gif(锁定主题按钮)
img_button_topic_new = button_topic_new.gif(发新帖按钮)
img_button_topic_reply = button_topic_reply.gif(发回复按钮)
- template中的template.cfg
#
# phpBB Template Configuration File
#
# @package phpBB3
# @copyright (c) 2005 phpBB Group
# @license http://opensource.org/licenses/gpl-license.php GNUPublic License
#
#
# At the left is the name, please do not change this
# At the right the value is entered
# For on/off options the valid values are on, off, 1, 0, true andfalse
#
# Values get trimmed, if you want to add a space in front or at theend of
# the value, then enclose the value with single or doublequotes.
# Single and double quotes do not need to be escaped.
#
#
(与style.cfg做相同修改)
# General Information about this template
name = subsilver2
copyright = © phpBB Group, 2003
version = 3.0.2
- theme中的theme.cfg
#
# phpBB Theme Configuration File
#
# @package phpBB3
# @copyright (c) 2005 phpBB Group
# @license http://opensource.org/licenses/gpl-license.php GNUPublic License
#
#
# At the left is the name, please do not change this
# At the right the value is entered
# For on/off options the valid values are on, off, 1, 0, true andfalse
#
# Values get trimmed, if you want to add a space in front or at theend of
# the value, then enclose the value with single or doublequotes.
# Single and double quotes do not need to be escaped.
#
# Available and used values:
# parse_css_file
#
(与style.cfg做同样修改)
# General Information about this theme
name = subsilver2
copyright = © phpBB Group, 2003
version = 3.0.2
# Some configuration options
#
# You have to turn this option on if you want to use the
# path template variables ({T_IMAGESET_PATH} for example)within
# your css file.
# This is mostly the case if you want to use languagespecific
# images within your css file.
#
parse_css_file = off
(这一句最好不要改,如果改成on,则在css文件中图片的路径也要使用模板变量中的{T_IMAGESET_PATH}表示)
- imageset中的imageset.cfg文件
转载自:http://blog.sina.com.cn/s/blog_51c0555701009zql.html