Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6
Author Message
prekill
Worker
Worker



Joined: Oct 22, 2005
Posts: 201

PostPosted: Sat Aug 18, 2007 7:46 am Reply with quote

Hey guys,

I am trying to add more then 1 theme to my phpbb module. I am uploading the theme to the templates folder in "modules/Forums/templates/" them install in using the forum admin panel.

When I choose as a user the new theme it keep on giving me the subSilver theme. only the admin panel do change.

p.s the overide option to defualt them is off. so users should able to change themes.

anyone know on how to solve this problem?

thank you!
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sat Aug 18, 2007 3:20 pm Reply with quote

Well I'm not quite sure what you are trying to do so lets do a litle backgrounding first.
The nuke THEME is stored in webroot/themes/
You can set the default THEME in the main administration under 'Preferences'.
Note: Some THEMES also come with a forum TEMPLATE and these are located in
webroot/themes/yourthemename/forums/

To change the actual forum TEMPLATE you will either have to modify the existing forum template files that your theme is using OR;

Remove the forums folder from webroot/themes/forum
Upload a new forum TEMPLATE which lives at
webroot/modules/Forums/templates/
then turn the template on in the Forums administration under 'Configuration'

Hope that helps Smile
 
View user's profile Send private message Send e-mail
prekill







PostPosted: Sat Aug 18, 2007 4:55 pm Reply with quote

umm no.

lol

I did everything you say. the problem is that I want to have 2 different forum themes in webroot/modules/Forums/templates/ so I upload 2 theme but the forum theme wont change.

It do change in the admin forum panel but not in the forum itself... thats the problem...

any idea?
 
Guardian2003







PostPosted: Sat Aug 18, 2007 5:32 pm Reply with quote

There is a setting on the forum configuration to allow users to change the forum template.
If they still cannot change the forum template with that turned on it is because the site theme already has one and will overide it.
 
prekill







PostPosted: Sun Aug 19, 2007 2:17 am Reply with quote

As I wrote in the first post, in my forum configuration I allow users to swich templates... but when a user try to change his template it wont change.

my theme has no forum folder in it, I duble checked it.

When I (site admin) try to change my template in forums only my forum admin page change to the new template but not the forum it self.

any clue?
 
Guardian2003







PostPosted: Sun Aug 19, 2007 3:39 am Reply with quote

Thank you for the clarification.

It sounds like either the template is not for phpnuke (is it possible the template is for phpBB and not BBtoNuke)?
Can you give me a link to the template download so I can see?

Doe the template you have installed appear in the drop down option in forum configuration for the 'default' template?
 
prekill







PostPosted: Mon Aug 20, 2007 4:05 am Reply with quote

umm the template is for stand alone phpBB.

named RedSilver from phpbb forum, link:
http://www.phpbb.com/styles/db/index.php?i=misc&mode=display&download=1&contrib_id=2579

The template apper in the drop down option in forum configuration but not as 'default' because I want it to be an option.

Thank you very much for the help.

p.s I now noticed that the private messages change to the new template too but main forum keep on showing subsilver.

(Basically what I am trying to do is duplicate my main template, subsilver, in order to install in one of them a resize image mod to keep forum border but still let my users the option to choose use this mod or not. any easier why of duplicating my subsilver template?)
 
Guardian2003







PostPosted: Mon Aug 20, 2007 4:24 am Reply with quote

Not really as you would need to go through every file and replace all references to subSilver with the name of your new template.

It might be easier, depending on the MOD and how it works to add users to a specific forum 'group' and allow that group to use the MOD.
If I remember correctly the MOD resizes the image in the browser and not when it is added to the forum so unless you are using the mod all the time, the image will appear in it's natural (full) size.
 
prekill







PostPosted: Mon Aug 20, 2007 4:39 am Reply with quote

ok and what about the changing template that not working?

any idea?
 
Guardian2003







PostPosted: Mon Aug 20, 2007 5:16 am Reply with quote

You would need to get a template for 'BBtoNuke' as this is the ported version of phpBB that phpnuke uses.
But remember, if anyone who isn't using your alternative template with the mod added, some images might expand the template and force the window to scroll.

Is it absolutely a requirement that only some users have access to this mod?
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Aug 20, 2007 4:44 pm Reply with quote

Note that the template still needs to be "installed" through phpBB's Admin panel before it can be user-selected

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
prekill







PostPosted: Tue Aug 21, 2007 5:09 pm Reply with quote

ok guys I have found the problem, the problem is in includes/functions.php in the "function setup_style($style)" code:

With this code the template is NOT working:

Code:
                cookiedecode($user);

            $info=$db->sql_query("select * from ".$prefix."_bbconfig where config_name='default_style'");
            $get_info=$db->sql_fetchrow($info);
            $default_style=$get_info['config_value'];
            if($cookie[1] == "" AND $style != "$default_style") {
                $style = "$default_style";
            }
        }



With this code the template IS working:

Code:
cookiedecode($user);

            $info=sql_query("select * from ".$prefix."_bbconfig where config_name='default_style'", $dbi);
            $get_info=mysql_fetch_array($info);
            $default_style=$get_info[config_value];
            if($cookie[1] == "" AND $style != "$default_style") {
                $style = "$default_style";
            }
        }


Whats the difference? and is it ok to use the code that does work? or it is not safe?
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.6

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©