MyBB Community Forums
How do you use the theme style? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Themes (https://community.mybb.com/forum-103.html)
+---- Forum: Theme Support (https://community.mybb.com/forum-10.html)
+---- Thread: How do you use the theme style? (/thread-85537.html)

Pages: 1 2 3 4


How do you use the theme style? - Tom K. - 2011-01-03

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


RE: How do you use the theme style? - Yaldaram - 2011-01-03

<div align="center">YOUR_CONTENT_GOES_HERE</div>



RE: How do you use the theme style? - Tom K. - 2011-01-03

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


RE: How do you use the theme style? - Yaldaram - 2011-01-03

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>



RE: How do you use the theme style? - Tom K. - 2011-01-03

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\\\']}"


RE: How do you use the theme style? - faviouz - 2011-01-03

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


RE: How do you use the theme style? - Yaldaram - 2011-01-03

You can use the following function to escape '
$db->escape_string('YOUR_TEMPLATE_CODE_GOES_HERE');



RE: How do you use the theme style? - Tom K. - 2011-01-03

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


RE: How do you use the theme style? - Scoutie44 - 2011-01-03

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">';


RE: How do you use the theme style? - Tom K. - 2011-01-04

Ok, now how do I get the background in? Smile
And how would i put this in: cellspacing="{$theme['borderwidth']}"?