MyBB Community Forums

Full Version: Display custon {$welcome} on various pages.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
While I'm aware my query has been asked before I'm also aware that nothing I've trued from following various threads has worked.

My query is thus.
I'm looking to make a new Template for my installation my MyBB, which will display information from one root location, to clarify what i mean by template.
Templates & Style > Templates > Template Sets > YourTemplateName > Add Template
it is to be displayed on the Portal, and Index page, so it would be great if i could update the information from one source.
Example, this.
[Image: Screenshot1.png]
can be placed "anywhere".

A template known for these purposes as InfoPortal currently placed within the uncategorised templategroups.
[Image: Screenshot3.png]

While I'm aware I can simply input a table like so.
{$header}
<tr><td valign="top" width="200">
	 <div style="float:{$right};"><table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
        <tr>
            <td class="thead"><strong>Information</strong></td>
        </tr>
        <tr>
            <td class="trow1" align="center">
Information here
            </form>
            </td>
        </tr>
</table>
{$welcome}
{$pms}
{$search}
{$stats}
{$whosonline}
{$latestthreads}

however I would prefer NOT to do so, it feels clunky, and for my purposes needs to work across multiple pages, instead add it as a {$InfoPortal} so I can keep the information together, updated from one singular source.

I attempted to follow such information on other forums. and even finding information relating to editing the portal.php and other such pages with the information, i edited it as thus
$$InfoPortal  = '';
// $InfoPortal  box
if($mybb->settings['$InfoPortal '] != 0)
{
	eval("\$InfoPortal = \"".$templates->get("InfoPortal")."\";");
}
THEN adding {$InfoPortal} to my page, still came up bust.


So once more i would like to know, How to call in my own {$InfoPortal} on multiple pages, from one root source, thank you in advance.
[Image: Screenshot2.png]

I would appreciate any insight on this, if I find anything out I will endiver to explain it in full on this post or another below it.
you can add the content to a new global template and use template conditionals plugin to call it in other templates
Thank you .m. for getting back to me, I've installed the plugin, created the Global template. this part straight forward.
 
I have searched the thread looking for an example, tried some ways i thought may work to call in the template, however i seem to be coming up bust. could you perhaps provide an example of how the Global Template {$InfoPortal} could be called in using the plugin method?
^ if your custom template at Global Templates is named as mycustomtemplate then
using <template mycustomtemplate> gets its content to the other templates
Thank you .m. that did in fact work for any other Global Template, for example my AboutUs page, Perfection.
 
My issue now still seems to remain, say getting it to work in out with other Global Templates, in for example the Default Templates's own Portal Templates > Portal or Index Page Templates > Index how would the Syntax change to receive the same result while calling the Global Template?

Scratch that, thank you .m. it works all-over, it seems my website had yet to "catch up"

Thank you so very much for your support, you have been fantastic.