MyBBThemes Community

Full Version: Rounded Cornered Themes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Someone on the MyBB Community requested to know how to round corners of a theme, so I am making a simple tutorial for the way I did it.
Note: This only places rounded corners on the index page, not on any other page.
To get rounded corners on most of all pages, download and install the MyBB Dream theme.


Open your Admin CP > Templates > *Your Template Set*. Open the Forum Bit Templates and edit forumbit_depth1_cat.

Replace the entire contents of that template with this:
Code:
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
    <tr>
        <tbody>

<tr>
<td align="left"><img src="{$theme['imgdir']}/cat_l.gif" alt="" border="0"></td>
<td style="background: url({$theme['imgdir']}/cat_tbg.gif) repeat-x" align="center" width="100%"><div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" /></div>
<span class="thead"><div style="text-align: left;"><strong><a href="forumdisplay.php?fid={$forum['fid']}">{$forum['name']}</a></strong><br /><div class="smalltext">{$forum['description']}</div></span>
</td>
<td align="right"><img src="{$theme['imgdir']}/cat_r.gif" alt="" border="0"></td>

</tr>
</tbody>
</table>
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tbody style="" id="cat_1_e">
<tr>
<td class="tcat" width="35"> </td>
<td class="tcat"><strong>{$lang->forumbit_forum}</strong></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><strong>{$lang->forumbit_threads}</strong></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><strong>{$lang->forumbit_posts}</strong></td>
<td class="tcat" width="200" align="center"><strong>{$lang->forumbit_lastpost}</strong></td>
</tr>
{$sub_forums}
</tbody>
</table>
<br />

Now, save that, and open the Index Page Templates, and edit index. Just so there's no mistakes, replace the entire contents of that template with this:
Code:
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
</head>
<body>
{$header}
{$forums}
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
    <tr>
        <tbody>

<tr>
<td align="left"><img src="{$theme['imgdir']}/cat_l.gif" alt="" border="0"></td>
<td style="background: url({$theme['imgdir']}/cat_tbg.gif) repeat-x" align="center" width="100%"><div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['boardstats']}.gif" id="boardstats_img" class="expander" alt="[-]" /></div>
<span class="thead"><div style="text-align: left;"><strong><a href="stats.php">{$lang->boardstats}</a></strong></div></span>
</td>
<td align="right"><img src="{$theme['imgdir']}/cat_r.gif" alt="" border="0"></td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tbody style="" id="boardstats_e">
{$whosonline}
{$birthdays}
{$forumstats}
</tbody>
</table>
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
        <td class="trow1">
            <table width="100%">
                <tr>
                    <td>
                        <img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /> <span class="smalltext">{$lang->new_posts}</span><br />
                        <img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /> <span class="smalltext">{$lang->no_new_posts}</span><br />
                        <img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" style="vertical-align: middle;" /> <span class="smalltext">{$lang->forum_locked}</span>
                    </td>
                    <td style="vertical-align: top; text-align: right;"><span class="smalltext">{$logoutlink}<a href="misc.php?action=markread">{$lang->markread}</a> | <a href="showteam.php">{$lang->forumteam}</a> | <a href="stats.php">{$lang->forumstats}</a></span>
                        {$loginform}
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
{$footer}
</body>
</html>
Save it.

Now, just by looking at the code, your LEFT corner image is named cat_l.gif
Your RIGHT corner image is named cat_r.gif
And the image between those corners is called cat_tbg.gif

Make those images and put them in your image directory for your theme. Tweak it to your likings. ;)
Ah! Many thanks for this tutorial. Now I can do rounded corners! :D
Great, simple and easy tutorial. I may have to try rounded corners on one of mine, when I think up something. ;)

Dr Small
Nice tutorial.., though I notice at first glance that this code breaks the forum collapse and expand ability for categories.

Also you should state to users of this tutorial that it only places rounded corners on the index page and not on sub pages.
Oww. I never noticed that. But I don't know how to fix that problem.

I added a note to the top of the tutorial. I'll have to look in on the problems and see what I can do to fix them.
arr kool thx i was looking for somting like this thx
vintagedaddyo Wrote:this code breaks the forum collapse and expand ability for categories.
Fixed now. The categories expand and collapse correctly. :)

EDIT
Another fix applied. This fixes the problem with a thead_bg.gif image appearing only behind the category text and the Board Stats text.
Ahh. I'll update the tutorial later. I have figured out how to get the rounded corners in the forum display, show thread, and quick reply.

Completed Corners:
1. Index
2. Forum Display Sub-forums
3. Forum Display
4. Show Thread
5. Quick Reply
6. User CP
7. Memberlist
8. Who's Online
9. New Reply
10. New Thread
11. Search
12. Private Messages
13. Help Documents
14. Reputation
15. Member Profile
16. Member Login Page
17. Lost Password Recovery Form
18. Registration Page(s)
19. Forum Team
20. Board Stats
21. Who's Online IP Lookup
22. Post IP Lookup
23. Polls
24. Edit Post
25. RSS Syndication

To-Do corners:

Have I missed any other place?
Not missin' anything that I can find, FFW. You must have been busy! Can't wait for you to release it. :)
Thanks. If no one finds any other missing thead's by later this evening, I'll release this tonight. :)

BTW, this theme's also on the Demo board, incase you want to check it out live. :)
Pages: 1 2 3 4
Reference URL's