Theme Selection (rely on forum) works ?
|
Posted
#1570
(In Topic #369)
|
|
|---|---|
|
Fan in training |
Theme Selection (rely on forum) works ?i get this Notice: Undefined index: x_z in f:\ocportal\sources\forum\phpbb.php on line 463 (x_z is my theme name) Does it happen 2 anyone 2 ? |
|
Posted
|
|
|
Fan in training |
Found the problem , it relys on my /themes/map.ini file … Fixed |
|
Posted
|
|
|
Fan in training |
When a guest enters the portal, the default theme is selected by these order (i think) [see phpbb.php] :
well in these last one, if u want, u can do this (in file sources\forum\phpbb.php) : instead: Code
$def="default";
Code
$def=$map["default"];
This allows u to configure in map.ini the default theme u wanna! (setting default = your_default_theme) |
|
Posted
|
|
|
Fan in training |
Is this the way OCP is supposed to work (i.e. it only maps the template style, not the color-scheme)? |
|
Posted
|
|
|
Community saint |
|
|
Posted
|
|
|
Community saint |
Code
default = default
In this example i have four themes on my forum (Norm, DustyGreen, subSilver, and bluetabs) and they are linked to the ocp themes gusblue, default, and alien. If you create, or add a new theme to your forum, then you have to edit the map.ini file in the ocp themes folder to link your forum theme to one you have on ocp. if you dont, it will use the default theme for users who select the new (unlinked) theme. Hope this helps, if not, pm, email, or catch me on msn |
|
Posted
|
|
|
Fan in training |
because this code runs before trying the ini file …notice that this code selects the phpbb theme (id = 1) [most of the times subSilver] . Code
/*
If in your case doesnt work comment that code or remove the #1 phpbb theme |
|
Posted
|
|
|
Community saint |
Im kinda new to php, but im learning all the time, so please be patient with me |
|
Posted
|
|
|
Fan in training |
Code
/*
this code (that ived comment) selects the #1 (id) theme name from phpbb_themes table and uses the result (example: subSilver) as the index to find the correspondent ocp_theme at ini file ($def=$map[$phpbb]; i. e. $def=$map['subSilver'] If these runs ok then the next condition : Code
// Default then!
will not "run" !(strlen($def)>0) …. I did this cause i want to have a default skin for guests … when a guest enters the site it always returns me subSilver theme not my default theme at ini file …. Im sorry this could be confusing, cause my english…. if u dont understand tell me and ill try to be more explicit. (im watching tv. so im a little distracted) |
|
Posted
|
|
|
Community saint |
|
|
Posted
|
|
|
Fan in training |
|
1 guests and 0 members have just viewed this: None
Control functions:






