How To Use eXtreme Styles on non phpBB Pages

Tutorials for <a href="http://www.phpbbstyles.com/viewtopic.php?t=356">eXtreme Styles mod</a> for phpBB 2.0.

Moderator: Moderators

Postby rm249 on Sun Nov 05, 2006 7:15 am

Ok I figured out how to use it with files:
Code: Select all
// First define it:
$template->set_filenames(array(
   'page' => SITE_TEMPLATE .'/page.tpl',
   'page_file' => PAGES_PATH . $_GET['page'] . PAGES_EXT,
));

// Then assign from handler:
$template->assign_var_from_handle('page', 'page_file');


The ONLY problem I am having with that is when you use it in TPL files that have PHP echo statements in them.

The pparse function does not properly replace the variable within the PHP so after parsing the template, it actually outputs the PHP to output the variable:
Code: Select all
<?php echo isset(Array['DEFINE']['.']['path']) ? Array['DEFINE']['.']['path'] : ''; ?>


in place of {path} in the PHP echo statement.

Does anyone have any suggestions as to how to get it to show the variable within PHP echo statements?

Any help is greatly appreciated.
Thanks again.
Ryan
rm249
Registered User
Registered User
 
Posts: 10
Joined: Mon Jun 27, 2005 8:04 pm

Postby rm249 on Sun Nov 05, 2006 10:11 am

Never mind I figured out how to do it using $this->vars['var_name']
rm249
Registered User
Registered User
 
Posts: 10
Joined: Mon Jun 27, 2005 8:04 pm

Postby sddfg on Tue Feb 13, 2007 3:11 pm

Hello,

First I want to say thank you for this great tutorial. But I have a question:

Is there a way to speed up the template system by reducing the size of the file?
For example to remove functions which are not necessary any more?
sddfg
Registered User
Registered User
 
Posts: 4
Joined: Tue Feb 13, 2007 2:48 pm

Postby PostBot on Tue Feb 13, 2007 8:09 pm

There isn't any code in tpl files that you don't need, so no. The only thing you can do is remove css in overall_header.tpl of subSilver (other styles already have it removed)
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby sddfg on Tue Feb 13, 2007 8:37 pm

Sorry, I mean the file template.php :oops:
sddfg
Registered User
Registered User
 
Posts: 4
Joined: Tue Feb 13, 2007 2:48 pm

Postby PostBot on Tue Feb 13, 2007 8:38 pm

Sure, remove everything you aren't using.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby sddfg on Tue Feb 13, 2007 8:45 pm

So, I can remove all other functions which I do not use in my code?

Functions I use:
Code: Select all
- set_filenames
- assign_block_vars
- assign_vars
- pparse
sddfg
Registered User
Registered User
 
Posts: 4
Joined: Tue Feb 13, 2007 2:48 pm

Postby PostBot on Tue Feb 13, 2007 8:47 pm

Just look at code and check which parts you are using. There are few functions you most likely can remove, hovewer to do that you do need to understand how all functions work. If you don't know what functions do then don't bother removing it because you'll break something.
Do NOT pm me, I don't visit this forum anymore, don't own it, don't provide any support and don't moderate.
User avatar
PostBot
Moderator
Moderator
 
Posts: 10659
Joined: Sat Aug 02, 2003 3:52 pm
Location: Mars

Postby sddfg on Tue Feb 13, 2007 8:48 pm

Okay, I´ll try. Thanks!
sddfg
Registered User
Registered User
 
Posts: 4
Joined: Tue Feb 13, 2007 2:48 pm

Postby tatlidj on Wed Feb 14, 2007 4:58 pm

thank you pentapenguin...
tatlidj
Registered User
Registered User
 
Posts: 40
Joined: Mon Mar 14, 2005 12:48 pm
Location: turkey

Previous

Return to eXtreme Styles mod tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron