MyBB Community Forums

Full Version: Merging Portal boxes to one box
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi all
I was trying to merge the portal boxes to one box I have managed to add private messages,today's posts, new posts to portal_Welcome no problem but the search and whose online boxes appear to be more difficult
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<if $mybb->user['uid'] then>
<td class="thead"><strong>At a Glance</strong></td>
</if>
</tr>
<tr>
<td class="trow1">
{$welcometext}<br>
<if $mybb->user['uid'] then>
<span class="smalltext">
<a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', 'buddyList', 350, 350);">{$lang->welcome_open_buddy_list}</a><br>
<a href="{$mybb->settings['bburl']}/private.php"><span class="smalltext">{$lang->welcome_pms} </a><span class="smalltext">{$lang->welcome_pms_usage}<br>
</if>
</td>
</tr>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>{$lang->search_forums}</strong></td>
</tr>
<tr>
<td class="trow1" align="center">
<form method="post" action="{$mybb->settings['bburl']}/search.php">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="threads" />
<input type="text" class="textbox" name="keywords" value="" />
{$gobutton}
</form><br />
<span class="smalltext">
(<a href="{$mybb->settings['bburl']}/search.php">{$lang->advanced_search}</a>)
</span>
</td>
</tr>
</table>

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>{$lang->online}</strong></td>
</tr>
<tr>
<td class="trow1">
<span class="smalltext">
{$lang->online_users}<br /><strong>&raquo;</strong> {$lang->online_counts}<br />{$onlinemembers}
</span>
</td>
</tr>
</table>
<br />
from this mod you get the search box but no go button and the online section just shows the variable names and not the variable contents I guess I have not closed a tag or something .. but I just can not see it, so if anyone can help it would be good ... to see the problem look at my poor effort
Regards Jim
So what you are trying to do is to get rid of the separate boxes? Go into each of the portal sub templates - example is portal search - and take the table tags out. Make sure each one begins with <tr> and ends in </tr>

<tr>
<td class="trow1" align="center">
<form method="post" action="{$mybb->settings['bburl']}/search.php">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="threads" />
<input type="text" class="textbox" name="keywords" value="Search" onfocus="if
(this.value==this.defaultValue) this.value='';" />
{$gobutton}
</form><br />
<span class="smalltext">
(<a href="{$mybb->settings['bburl']}/search.php">{$lang->advanced_search}</a>)
</span>
</td>
</tr>

Revert your portal template and then it should all work. I wonder if those conditional tags are still going to work in 1.6.4. I have not tried.


(2011-07-26, 04:54 PM)Leefish Wrote: [ -> ]So what you are trying to do is to get rid of the separate boxes? Go into each of the portal sub templates - example is portal search - and take the table tags out. Make sure each one begins with <tr> and ends in </tr>

<tr>
<td class="trow1" align="center">
<form method="post" action="{$mybb->settings['bburl']}/search.php">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="threads" />
<input type="text" class="textbox" name="keywords" value="Search" onfocus="if
(this.value==this.defaultValue) this.value='';" />
{$gobutton}
</form><br />
<span class="smalltext">
(<a href="{$mybb->settings['bburl']}/search.php">{$lang->advanced_search}</a>)
</span>
</td>
</tr>

Revert your portal template and then it should all work. I wonder if those conditional tags are still going to work in 1.6.4. I have not tried.

So I have to remove the private messages count,todays,new with the revert ... ? so where should I add those mods ? but it works. .... wonder why the conditional tags would be removed or not supported !
hmm, I am not quite sure what you mean. In the portal settings you can specify which blocks you want to show. In the html of the portal templates the sub-templates are referenced as variables - eg
{$header}
<table width="100%" cellspacing="0" cellpadding="{$theme['tablespace']}" border="0" align="center">
<tr><td valign="top" width="15%" >
{$welcome}   	
{$pms}

Whatever you have inside the templates that those variables refer to will be visible according to portal settings.

Re the conditionals - I refer to the allowed variables in 1.6.4 templates.
(2011-07-26, 07:49 PM)Leefish Wrote: [ -> ]Re the conditionals - I refer to the allowed variables in 1.6.4 templates.

which are ?
Old news Jim - RateU over at mybb hacks has confirmed that php in templates and conditional templates is working in those conditionals he has in use.

Re allowed variables - read the blog post about 1.6.4 linked at the index of this board and good luck with your portal.
(2011-07-27, 10:36 PM)Leefish Wrote: [ -> ]Old news Jim - RateU over at mybb hacks has confirmed that php in templates and conditional templates is working in those conditionals he has in use.

Re allowed variables - read the blog post about 1.6.4 linked at the index of this board and good luck with your portal.

it is old news and the conditionals work Big Grin but I notice from your sig you have something to do with proportal will the code I have developed work using proportal and what advantages does proportal offer ?
Hi Jim, I missed this answer - actually, I have nothing to do with Pro_portal - I just made a couple of plugins for it.

Personally - I don't use pro_portal. There is nothing pro_portal does that you cant do yourself with a bit of HTML knowledge. Also (and this is a rather BIG disadvantage) it seems to be that the pro_portal install routine is borked on 1.6.4. The only way you can install it is to install in 1.6.3 and upgrade.
(2011-08-03, 05:09 AM)Leefish Wrote: [ -> ]Hi Jim, I missed this answer - actually, I have nothing to do with Pro_portal - I just made a couple of plugins for it.

Personally - I don't use pro_portal. There is nothing pro_portal does that you cant do yourself with a bit of HTML knowledge. Also (and this is a rather BIG disadvantage) it seems to be that the pro_portal install routine is borked on 1.6.4. The only way you can install it is to install in 1.6.3 and upgrade.

Thanks for the answer Big Grin why I am asking these questions is I am using mysideboxes plugin to display the portal boxes on the index .. I have merged them to one but this screws up the portal display of the boxes and content Sad so in effect I need 2 sets of these boxes one for portal & one for index ... the plugin allows you to use html code to add an extra box but if I use say {$pmsbox} all I have displayed is a box with {$pmsbox} printed in it .... I guess I am not declaring the array correctly
Regards Jim
Hi. I think that you are maybe still not quite using the power of the templates - you should be able to change the separate portal "box" templates and still use them both in the index and the portal.

Can you post a copy of your index template html? Same for the portal.
Pages: 1 2