MyBB Community Forums

Full Version: Template is not visible
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?

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
You need to assign $codebuttons2 in newthread.php/newreply.php before you can use it in the template.

I suggest you open newthread.php, and search for $codebuttons to see how it is created. Also you probably need to see the build_mycode_inserter function in inc/functions.php
(2008-08-06, 08:22 PM)DennisTT Wrote: [ -> ]You need to assign $codebuttons2 in newthread.php/newreply.php before you can use it in the template.

I suggest you open newthread.php, and search for $codebuttons to see how it is created. Also you probably need to see the build_mycode_inserter function in inc/functions.php

Thanks, DennisTT! Wink
(2008-08-06, 08:22 PM)DennisTT Wrote: [ -> ]You need to assign $codebuttons2 in newthread.php/newreply.php before you can use it in the template.

I suggest you open newthread.php, and search for $codebuttons to see how it is created. Also you probably need to see the build_mycode_inserter function in inc/functions.php

I was trying it for an hour but I need professional advice:

1. I created Global Template "codebuttons_private"
2. I inserted in the end of the private. php file the following:
eval("\$codebuttons_private = \"".$templates->get("codebuttons_private")."\";"); 
before
eval("\$folder = \"".$templates->get("private")."\";");

3. at the beginning of the private.php in $templatelist .= I added: ,codebuttons_private ,

4. I edited private_send template and inserted {codebuttons_private} instead of {codebuttons}

I also tried
eval("\$codeinsert = \"".$templates->get("codebuttons_private")."\";"); 


Why it's not working? What did I miss?

Thank you very much,
Ilia