My question is, since my site has two template folders, in what does phpBB store the name of the template currently in use?
I've been looking through includes/template.php and whatnot, but I can't seem to figure this out.
Here's how I do it:


Code:
global $phpbb_root_path;
$template_name = './forum/templates/';
$sql = "SELECT * FROM " . THEMES_TABLE . " WHERE themes_id = '" . $userdata['user_style'] . "'";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, 'Could not obtain template information for toolbar', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
   $template_name .= $row['template_name'];
   $style_name = $row['style_name'];
}
Thanks Kerm =D
I had initially looked at my SQL database but apparently not well enough to notice the themes table ^^;;

Anywho, thanks yet again for the help =D
KeithJohansen wrote:
Thanks Kerm =D
I had initially looked at my SQL database but apparently not well enough to notice the themes table ^^;;

Anywho, thanks yet again for the help =D
No problem, hope that helps you out. Smile
Oh yes, indeed it did ^_^
Of course, now I have to work on fixing the redundancy of the site because I pretty much have not only two templates for each page, but two clones of the information....

I guess I can't procrastinate on making those pages dynamic anymore Laughing
KeithJohansen wrote:
Oh yes, indeed it did ^_^
Of course, now I have to work on fixing the redundancy of the site because I pretty much have not only two templates for each page, but two clones of the information....

I guess I can't procrastinate on making those pages dynamic anymore 0x5
Haha, I know the feeling; that's what I'm going through with Cemetech6.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
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

 

Advertisement