MyBB Community Forums

Full Version: Common information to be displayed across forum/thread/post pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I have edited the forum index page and added one box to right and one box to the left of the main forum, i want this to be displayed across all pages of the forum , for example currently it displays the box only in index page , if the user clicks any thread it should get displayed.Do we need to create any common template so that it can be used displayed across the entire forum ?

check website http://desiblm.com/ where you can see two side box(Placholder 1 at left and Live traffic box at rigth)
note:I don't need any plugins , instead want to edit directly to display these boxes whenever user clicks the thread or post information.I'm sure that i can edit thread templates, but don't want to do for every singe template in Mybb.
add this in either global template or header/footer template.
The best solution would be to edit the header and footer templates as these two are common across all MyBB pages. If you paste the code of your header, index and footer templates I'll show you what to modify.
(2012-06-30, 11:17 AM)euantor Wrote: [ -> ]The best solution would be to edit the header and footer templates as these two are common across all MyBB pages. If you paste the code of your header, index and footer templates I'll show you what to modify.

Hi ... here are the code for Header,footer and Index.

Header template:-
<table width="98%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class ="thead" align ="center"><strong>Welcome to Desiblm.com</strong></td>
</tr>
</table>

<div id="container">
<a name="top" id="top"></a>
<div id="header">
<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
<div class >
<iframe src="http://files.bannersnack.com/iframe/embed.html?hash=bu3lrsfi&wmode=transparent&useOnSW=true&t=1341030370" width="728" height="90" seamless="seamless" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
</div>
<div class="menu">
<ul>

<li><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />Home</a></li>
<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
<li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>


</ul>
</div>
<hr class="hidden" />
<div id="panel">
{$welcomeblock}
</div>
</div>
<hr class="hidden" />
<br class="clear" />
<div id="content">
{$pm_notice}
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
{$pending_joinrequests}
<hr/>
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class ="thead" align ="center"><U><strong>Inline Ads </strong></U></td>
</tr>
<tr>
<Td> &nbsp;</td>
</tr>
</table>

<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class ="thead" align ="center"><U><strong><navigation></strong></U></td>

</tr>
</table>

Footer template:

<table width="98%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class ="thead" align ="center"><strong>Welcome to Desiblm.com</strong></td>
</tr>
</table>

<div id="container">
<a name="top" id="top"></a>
<div id="header">
<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
<div class >
<iframe src="http://files.bannersnack.com/iframe/embed.html?hash=bu3lrsfi&wmode=transparent&useOnSW=true&t=1341030370" width="728" height="90" seamless="seamless" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
</div>
<div class="menu">
<ul>

<li><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />Home</a></li>
<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
<li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>


</ul>
</div>
<hr class="hidden" />
<div id="panel">
{$welcomeblock}
</div>
</div>
<hr class="hidden" />
<br class="clear" />
<div id="content">
{$pm_notice}
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
{$pending_joinrequests}
<hr/>
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class ="thead" align ="center"><U><strong>Inline Ads </strong></U></td>
</tr>
<tr>
<Td> &nbsp;</td>
</tr>
</table>

<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class ="thead" align ="center"><U><strong><navigation></strong></U></td>

</tr>
</table>

Index template:

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
lang.no_new_posts = "{$lang->no_new_posts}";
lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}

<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class ="thead" align ="center"><strong>Desiblm.com -Pulse of Bloomington desis</strong></td>
</tr>
</table>

<table width="100%" cellspacing="0" cellpadding="{$theme['tablespace']}" border="0" align="center">
<tr>
<td class="thead" align="center" border ="3"><strong>US/INR</strong></td>
<td class="thead" align ="center" border ="4"><strong>Weather</strong></td>
<td class="thead" align="center" border ="3"><strong>Gold|-$/INR LIVE!</strong></td>
<td class="thead" align="center" border ="3"><strong>Sensex/NSE</strong></td>
</tr>
<tr>
<td class="thead" align="center">
<script type="text/javascript" src="http://www.fx-rate.net/conversion.php?layout=horizontal&currency=USD&tcolor=ffffff&currency_pair=INR&default_pair=INR/USD"> </script></div> <!--
End of Currency Converter script -->
</td>

<td class="thead" align="center">

<object type="application/x-shockwave-flash" data="http://swf.yowindow.com/yowidget3.swf" width="200" height="90">
<param name="movie" value="http://swf.yowindow.com/yowidget3.swf"/>
<param name="allowfullscreen" value="true"/>
<param name="wmode" value="opaque"/>
<param name="bgcolor" value="#FFFFFF"/>
<param name="flashvars"
value="location_id=4885164&amp;location_name=Bloomington&amp;time_format=12&amp;unit_system=us&amp;background=#FFFFFF&amp;copyright_bar=false"
/>

</object>

</td>

<td class="thead" align="center">Test</td>
<td class="thead" align ="center">
<!--<iframe name="I1" src="http://182.18.143.117/autobulls/data.aspx" frameborder="1" marginwidth="1" marginheight="1" scrolling="no" align="left" width="300" height="100"></iframe></strong></dt> -->

<script type="text/javascript" src="http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js"></script><script type="text/javascript">if (WIDGETBOX) WIDGETBOX.renderWidget('6585de0d-1b21-4b0c-82a3-852477cc23f4');</script>
</td>
<tr>
</table>


<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td class ="thead" align ="center" >Placeholder</td>
<td class="thead" align="center" width ="100%" > Forum</td>
<td class ="thead" align ="center">Desiblm Visitors</td>
</tr>
<tr>
<td Class="thead" ><strong>Live feed-Forum</strong></td>
<td width ="100%">
{$forums}
</td>
<td Valign ="top" halign="right" width="100%">
<script type="text/javascript" src="http://feedjit.com/serve/?vv=955&amp;tft=3&amp;dd=0&amp;wid=89e7e6441bd9fbdb&amp;pid=0&amp;proid=0&amp;bc=ffffff&amp;tc=000000&amp;brd1=012b6b&amp;lnk=135d9e&amp;hc=ffffff&amp;hfc=135d9e&amp;btn=c99700&amp;ww=177&amp;wne=10&amp;wh=Live+Traffic+Feed&amp;hl=0&amp;hlnks=0&amp;hfce=0&amp;srefs=1&amp;hbars=0"></script><noscript><a href="Feedjit'>http://feedjit.com/">Feedjit Live Blog Stats</a></noscript>
</td>
</tr>
<tr>
<script type="text/javascript" src="http://api.simplyhired.com/c/jobs-api/js/xml-v2.js"></script>
</tr>
</table>
{$boardstats}

<dl class="forum_legend smalltext">
<dt><img src="{$theme['imgdir']}/on.gif" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dd>{$lang->new_posts}</dd>
<dt><img src="{$theme['imgdir']}/off.gif" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
<dd>{$lang->no_new_posts}</dd>
<dt><img src="{$theme['imgdir']}/offlock.gif" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
<dd>{$lang->forum_locked}</dd>
</dl>
<br style="clear: both" />
{$footer}
</body>
</html>
bump ...