 |
PNTheme and other mods |
Description: The purpose of PNTheme is to better integrate
the styles of PNphpBB2 with Postnuke themes. It goes about doing this by adding
two functions to the PNphpbb2 module.
Color matching: This part takes the basic bgcolors of the
Postnuke theme and uses them to generate the basic colors in the style sheet of
the module. The color matching takes place in the defaultcss.php file. You can
fine-tune the colors if needed in the configuration part of this file.
Custom styles: This is an optional part of PNTheme that
allows you to use a custom style with a Postnuke theme. It also allows you the
use custom images and/or cellpics if desired.
Color Matching:
The color matching part works
at default for all Postnuke themes that do not have a custom style.
This part
works automatically and needs no user adjustments unless you wish to fine-tune
the color matching.
If you wish to fine tune this file it is located in the style folder of
the template and is called defaultcss.css.
Custom styles:
A few custom styles are included in the module for PNTheme and more are
available for download. The three included are paired with the corresponding
cellpics except for styleadmin.css and are as follows:
- light.css - based on the subSilver theme also include will be the cellpics,custom images and posticons based on this same name. This is the same theme used with the postnuke ADS-Ultralight-Blue and PostnukeBlue themes at www.pnphpbb.com.
- dark.css - based on the fiblack theme. It also includes the cellpics,images
and posticons based on this same name. This is the same theme as used at
www.pnphpbb.com with the Postnuke themes Vcore and Bitrate.
- styleadmin.css - This is the custom style adapted to use the data from
edit style in PNphpBB2 admin.
Other than with the custom styles adapted for the module as examples(available
as an optional download), these will require user setup. To better understand
how to use this part of PNTheme I will explain how it works.
In general all it does is check certain directories (see below) for
predefined files or folders, if they are present then it uses them and if not it
uses default settings.
The directory setup used is as
follows:
PNTheme-----------> cellpics
--> images
-->
styles
-->ranks
-->posticons
**styles** In the styles folder you place the adapted phpbb2 style sheet
and name it based on the Postnuke theme you want it to display with. For
example say you adapted the subSilver.css for use with the PostnukeBlue
theme, you would name the file PostnukeBlue.css and place it in the styles
folder.
**images** In the images folder, you add a new folder named after the Postnuke
theme that you want the images to display with. Using the above example
the folder would be named "PostnukeBlue". Into this folder you
place the all the custom images except for the cellpics. If you want the
style to use the default images then you just don't make this folder.
**cellpics** In the cellpics folder you make a folder based on the Postnuke
theme name as above. You place all the cellpics for the style in this folder.
For most custom styles you will use cellpics.
**ranks** In the ranks folder you make a folder based on the Postnuke theme
name as above. You place all the rank images for the style in this folder.
If you want the style to use the default rank images then you just don't
make this folder.
**posticons**In the posticons folder you make a folder based on the Postnuke
theme name as above. You place all the posticons for the style in this
folder. If you want the style to use the default posticons then you just
don't make this folder.
Tips on adapting phpbb2 styles as custom styles for
PNphpBB2
It's not hard to adapt a phpbb2 style for use as a custom
style in PNphpBB2.
You should select a style that designed for either the
subSilver template or a similar template.
Usually you can just use the CSS or
style sheet for this style as the bases of the custom style. Unfortunately some
styles are not as well designed and many of the changes will be in the
theme_info.cfg file instead. I am sure other people will have different methods
of doing this but I will detail the way I do it.
****Custom style sheet
*****
(1) You will need to remove some style tags that conflict with Postnuke.
Some of the things I remove are as follows:
(a) /* General page style. The scroll bar colours only
visible in IE5.5+ */
body {
background-color:
#E5E5E5;
scrollbar-face-color: #DEE3E7;
scrollbar-highlight-color:
#FFFFFF;
scrollbar-shadow-color: #DEE3E7;
scrollbar-3dlight-color:
#D1D7DC;
scrollbar-arrow-color: #006699;
scrollbar-track-color:
#EFEFEF;
scrollbar-darkshadow-color: #98AAB1;
}
(b) /* General font
families for common tags */
font,th,td,p { font-family: Verdana, Arial,
Helvetica, sans-serif }
a:link,a:active,a:visited { color : #006699;
}
a:hover { text-decoration: underline; color : #DD6900; }
(c) /*
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;}
Depending on the style, other tags may need to be removed or
adjusted but these are the ones seen in most all phpbb2 style sheets.
(2) You need to save the converted style sheet as a css file using the
name of the Postnuke theme you wish it to be active with. For example if
you wanted to use it with the PostnukeBlue theme you would name it PostnukeBlue.css.
You upload this file to the styles folder.
****Cellpics****
In most cases you will use
cellpics with custom styles. To do this you need to do the following:
(1)
Make a folder in the /cellpics folder using the name of the Postnuke theme you
wish the cellpics to be associated with. Using the above example you would make
a folder named "PostnukeBlue" (cellpics/PostnukeBlue/). You upload the cellpics
associated with the custom style to this new folder.
****custom
images****
You can associate custom icons or images with any Postnuke
theme. All you do is create a folder in the /images folder using the name of the
Postnuke theme. Using the above example, you would make a folder name
"PostnukeBlue" (images/PostnukeBlue/). You upload all the custom images to this
folder including the language ones (lang_english,ect). Often you will just want
to use the default images and in this case, you just don't make this
folder.
After doing all this, you need to switch to the Postnuke theme
that you set this custom style for and see how it looks. If the colors don't
match what the style should look like then you will have to adjust the colors in
the style.php page using either the data from theme_info.cfg or you can use
colors from the color matching part of the theme mod. To get the colors from the
color matching part of the mod, you can temporary rename the custom style,
reload the page,and look at the inline style information in the source code of
the page.
If you want to make your own custom style (not convert one)
then you make it much like you do for phpbb2 itself. You can check the resources
there as a starting point.
A few new features where added to the theme mod in PNphpBB2 1.2. These
include the custom rank images and posticons(including custom posticons).
Among the major things are:
(1) Minimize/Maximize - This option was added. You can set a default in
PNphpBB2 admin and can also have a buttom with the top mini icons that
allows the user to switch between views. Minimize is the normal view within
postnuke with right blocks. Maximize is a full page view without any postnuke
blocks but still within the postnuke theme.
(2)Out of Postnuke Option - Not sure what to call this option but what
it does is to load the forum within postnuke but outside the postnuke theme.
The forums themes will then work similar to how they work in a standalone
forum. How this works is that it assumes that all adapted forum templates
will include the headerBB2.php file and if it is not present then it will
load the template as "out of postnuke".
(3)Subforum/Subcategory - you can read more about this below. In short
after you create forums or categories in admin, you can assign them as
subforums or subcategories to another categories.
Added version 1.0a
I know that some people like to use
the edit in styles administration to adapt a style. So I added a style.php file
that uses the information that you enter in styles administration. You will
still have to do the cellpics as above. The file is in the PNTheme/styles/
folder and it is called styleadmin.php. You can rename it to associate it with a
Postnuke theme. You could actually look at the source code of the page after
adapting it using style edit and use the inline style information to make a
custom style as described above. Its really better to use custom styles.
Added version 1.1
This version includes better
integration of the subSilver template into postnuke and adds the PNLite
template. PNLite works much the same way as PNTheme except that it includes only
the color matching and custom style part from PNTheme. Images and cellpics are
not really used that much in this template. This version also includes some core
changes that will allow new adapted templates to be added to PNphpBB2 more
easily.
version 1.2
A lot of the theme mod code that was in seperate files where moved to the
headerBB2.php file. The conversion of a phpbb2 theme was made simplier.
For support and to ask questions check
at:
http://www.pnphpbb.com/
or
http://batpuppy.drpeay.com/
If you find any bugs or have any ideas
for improvements please post at the above sites or email
me.
Thanks,
Batpuppy
Created by Vjacheslav Trushkin for phpBB2.0.5 and adapted for use in PNphpBB2.
Main features:
- Fast templates compilation and execution.
- Configurable fast cache system.
- Unlimited PHP in templates.
- Include tpl files inside templates.
- Use different tpl files with usual phpBB and this mod.
- Unlimited switches in one line in .tpl files.
- Auto-update for phpBB, styles, mods.
Configuration information for this mod is included in the Admin docs. For more information on the mod itself see this site.
This information is taken from the installation doc.
How does it work ?
You have a forum tree like this :
Index
- Cat 1
--- Forum 1.1
--- Forum 1.2
--- Sub-Cat 1.1
----- Forum 1.1.1
----- Forum 1.1.2
- Cat 2
--- Forum 2.1
--- Forum 2.2
Displaying the index (no category selected) :
vBulletin view
Index
- Cat 1
--- Forum 1.1
--- Forum 1.2
--- Sub-Cat 1.1
----- Forum 1.1.1
----- Forum 1.1.2
- Cat 2
--- Forum 2.1
--- Forum 2.2
sub-forum view
Index
- Cat 1
--- Forum 1.1
--- Forum 1.2
--- Sub-Cat 1.1
- Cat 2
--- Forum 2.1
--- Forum 2.2
Choosing one categorie, ie Cat 1, you'll get on your index this :
vBulletin view
Index > Cat 1
- Cat 1
--- Forum 1.1
--- Forum 1.2
--- Sub-Cat 1.1
----- Forum 1.1.1
----- Forum 1.1.2
sub-forum view
Index > Cat 1
- Cat 1
--- Forum 1.1
--- Forum 1.2
--- Sub-Cat 1.1
Or a sub-categorie (not limited in depth), ie Sub-Cat 1 :
vBulletin view
Index > Cat 1 > Sub-Cat 1.1
- Sub-Cat 1.1
--- Forum 1.1.1
--- Forum 1.1.2
sub-forum view
Index > Cat 1 > Sub-Cat 1.1
- Sub-Cat 1.1
--- Forum 1.1.1
--- Forum 1.1.2
Then getting in a forum, ie Forum 1.1.2, you'll get this :
Index > Cat 1 > Sub-Cat 1.1 > Forum 1.1.2
- post 1
- post 2
etc.
Setting the board
To choose the way you want to display your board :
go to Admin Configuration Panel/General Admin/Configuration
- set "Display sub-categories as forums" :
sub-forum view : Yes
vBulletin view : No ("flat" view)
To attach a category to another category :
- go to Admin Configuration Panel/Forum Admin/Management,
- create it,
- edit it,
- on the edit category screen, choose the mother cat by setting "Attached
to category"
I know this is somewhat hard to follow, but subforums are really simple
and probably the best way to understand them is to just use them.
|