Not Solved Own template doesn't load via {}
#1
Not Solved
Hi,

We are having the tempate Codebuttons. when you change it and add there any other html editor, click save - it works perfectly.

But when you create for example –°odebuttons2, the different one from codebuttons and add this one let's say to newthread.php only by applying {codebuttons2}. it's not working.

{codebuttons} works fine {codebuttons2} not working? (after the new Codebuttons2 template created

Mybb sees Master Templates and plugs them in properly.

But how to create your own template that could be attached the same way just by writing its name in {}.

For example {codebuttons2}, {codebuttons3}, {codebuttons4}

Huh
Reply
#2
Not Solved
You don't load a template by just adding {$codebuttons2}

// New Thread Example
Open newthread.php
Find
	eval("\$newthread = \"".$templates->get("newthread")."\";");
	output_page($newthread);

Add Above
eval("\$VAR_NAME = \"".$templates->get("TEMPLATE_NAME")."\";");

Then you can show the custom template by adding {$VAR_NAME} into the newthread template.
Reply
#3
Not Solved
(2008-08-06, 07:17 PM)LeX- Wrote: You don't load a template by just adding {$codebuttons2}

// New Thread Example
Open newthread.php
Find
	eval("\$newthread = \"".$templates->get("newthread")."\";");
	output_page($newthread);

Add Above
eval("\$VAR_NAME = \"".$templates->get("TEMPLATE_NAME")."\";");

Then you can show the custom template by adding {$VAR_NAME} into the newthread template.

Perfectly nice, LeX! Big Grin thank you. But could you plase also help me with one more thing that I was strying to find answer for a week?

i need to re-create Welcome Block on my site's home page (not forum) that has nicely worked on my 12.14 version.

The idea is simple but when i'm trying to do the following it never defines whether the user is logged in or not and always showing the guest block.

echo "$headerinclude 
    <div>
$welcomeblock </div>";
} 

How to make it properly working? Help my friend, i don't know php well..

The old one work perfectly under these settings. (Download my old index.php)

Thank you, LeX


Attached Files
.php   index_old.php (Size: 2.86 KB / Downloads: 71)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)