Print custom templates.
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #1
Print custom templates.
I'm using this at the beginning of my custom php file:

PHP Code:
<?php
chdir('foros'); // path to MyBB
define("IN_MYBB", 1);
require './global.php';
?>


If I write this:

PHP Code:
<?php echo($header) ?>


The header is show correctly, but I want to use custom templates for some reasons, is there a way to call this templates?

I can call templates from Global Templates using the code above, but if the template is under "Ungrouped Templates" group nothing is show.

I have tried this three:

PHP Code:
	<?php echo($GLOBALS['templates']['templatename']) ?>
	<?php echo($GLOBALS['templates']->get('templatename')) ?>
	<?php echo($templates['templatename']) ?>


Can somebody give me a clue or something Erf?

Edit: Or is there a way I can use the <template templatename> line that comes with the Template Conditionals plugin, but of course, outside the forum.


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
(This post was last modified: 10-19-2011 06:21 AM by Sama34.)
10-19-2011 06:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Print custom templates. - Sama34 - 10-19-2011 06:17 AM
RE: Print custom templates. - RateU - 10-19-2011, 06:56 AM
RE: Print custom templates. - Sama34 - 10-19-2011, 07:48 AM
RE: Print custom templates. - ZiNgA BuRgA - 10-19-2011, 08:55 AM
RE: Print custom templates. - Sama34 - 10-23-2011, 03:04 PM
RE: Print custom templates. - ZiNgA BuRgA - 10-23-2011, 03:47 PM
RE: Print custom templates. - Sama34 - 10-23-2011, 08:28 PM

 Standard Tools
Forum Jump: