MyBB Community Forums

Full Version: How do you use the theme style?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
How (HTML) would I show a box in the dead center of the page, using the current theme's TCAT and stuff Smile As well as the backgound for the theme. I'm making a plugin and I need to create a new page Toungue
<div align="center">YOUR_CONTENT_GOES_HERE</div>
Ok, i know that bit Toungue

Its making a table that uses the theme correctly Big Grin There was a tutorial somewhere but I can't find it Confused
You mean something like this: http://yaldaram.com/showthread.php?tid=46&highlight=box

You can add your own box as well;
<table border="0" cellspacing="{$theme[\\\'borderwidth\\\']}" cellpadding="{$theme[\\\'tablespace\\\']}" class="tborder">
<tr>
<td class="thead">
<strong>BOX NAME</strong>
</td>
</tr>
<tr>
<td class="trow1">
BOX CONTENT
</td>
</tr>
</table>
How would I echo that in PHP? What do I need to escape?
EG:

<td class="thead"> becomes <td class=\"thead\">

What about:
"{$theme[\\\'borderwidth\\\']}"
The \\\ is not part of the code.

First line should be:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">

Not sure how to escape it though, sorry. Toungue
You can use the following function to escape '
$db->escape_string('YOUR_TEMPLATE_CODE_GOES_HERE');
I know how to escape code, just not where to in this case Wink
I wanna try do it without having to make a template too Toungue
You shoudn't have to escape the singles quotes in the variable brackets, but just put the code in single quotation marks so you can use the regular ones for your code. ie. $template = '< href="blacdfsfsd">';
Ok, now how do I get the background in? Smile
And how would i put this in: cellspacing="{$theme['borderwidth']}"?
Pages: 1 2 3 4