TinyPortal

Development => Support => Topic started by: andre on June 07, 2009, 09:40:18 PM

Title: Show blocks on non-smf page?
Post by: andre on June 07, 2009, 09:40:18 PM
Link to my site: http://www.xtremelean.us
SMF version: 1.1.9
TP version: 1.075 (v1.0 beta 3)
Theme name and version: Adagio (115)
Browser Name and Version: Any
Mods installed: Several. Will post if relevant
Related Error messages: No forum errors

Hi,
I have a website at the above link. I added a forum and TP to it after creating the website. I use only the left blocks with TP. I would like to know how I can echo the TP left blocks onto the index page. I can't figure out how to do this with SSI. Any help or hints at all would be greatly appreciated. I tried using this code in the head of the page:
<?php
require("forum/SSI.php");
function 
template_main()
{
        global 
$modSettings$scripturl$context$settings$options$txt;
         
loadtemplate('TPortalBlocks');

     
// The main content should go here.  A table is used because IE 6 just can't handle a div.
        
echo '<div id="bodyarea" style="padding: 10px 8px 0px 8px;">
            <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>'
;
         
              echo 
'<td width="' ,$context['TPortal']['leftbar_width'], '" style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' 'px; background-color: #D4D4D4; padding-top: 4px;" valign="top">
                 <div id="leftbarHeader"'
, empty($options['collapse_leftbar']) ? '' ' style="display: none;"'' style="padding-top: 5px; width: ' ,$context['TPortal']['leftbar_width'], 'px;">';
                 
TPortal_sidebar('left');
              echo 
'</div></td>';
         
        echo 
'<td width="100%" align="left" valign="top" style="padding-top: 10px; padding-bottom: 10px;" id="bodyarea">';
        
        echo 
'</td>';

        
        echo 
'</tr></table></div>';
}
?>

But no blocks are displayed  :(. http://www.xtremelean.us/test.php

Thanks!
Title: Re: Show blocks on non-smf page?
Post by: Ken. on June 07, 2009, 10:08:34 PM
Hi andre, welcome to TinyPortal.

In looking at your posted link there are no pages for SMF/TP showing and so AFAIK you won't be able to get the blocks to work with that setup.

While it may be that someone could write a code that would let you do this we require that SMF/TP be in use and visible before we offer support for a site.
Title: Re: Show blocks on non-smf page?
Post by: Petee on June 07, 2009, 10:27:23 PM
http://www.xtremelean.us/forum/index.php
Title: Re: Show blocks on non-smf page?
Post by: andre on June 07, 2009, 10:59:18 PM
Hi,

SMF and TP are setup. They are at...
http://www.xtremelean.us/forum
Title: Re: Show blocks on non-smf page?
Post by: IchBin on June 08, 2009, 12:57:48 AM
http://www.tinyportal.net/index.php/topic,20069.0.html
Title: Re: Show blocks on non-smf page?
Post by: andre on June 10, 2009, 12:37:34 AM
Quote from: IchBinâ„¢ on June 08, 2009, 12:57:48 AM
http://www.tinyportal.net/index.php/topic,20069.0.html

Hi. Thank you for the reply. I tried using that code in the head of my page:
<?php
$ssi_theme 
1;
global 
$context;
require_once(
'..path..to...my...forum...test/smf1/SSI.php');
TPortal_init();
template_main_above();

echo 
'
This is to show you the divine power of SMF and TP!!!'
;

ssi_shutdown();
?>


The result was my page with the top and bottom of my forum, and no blocks. For the life of me I can't figure out what I'm missing... sorry
Title: Re: Show blocks on non-smf page?
Post by: andre on June 14, 2009, 02:07:53 AM
done.


<?php require("forum/SSI.php"); ?>
<link rel="stylesheet" type="text/css" href="http://www.xtremelean.us/forum/Themes/default/tp-style.css?fin11" />
<link rel="stylesheet" type="text/css" href="http://www.xtremelean.us/forum/Themes/adagio_115/tp-style.css?fin11" />
  <?php
  
$ssi_theme 4;
  global $modSettings$scripturl$context$settings$options$txt;
  TPortal_init();
  template_tp_above();
  ?>

<?php ssi_shutdown(); ?>


http://www.xtremelean.us  8)
Title: Re: Show blocks on non-smf page?
Post by: Ken. on June 14, 2009, 02:30:27 AM
Good job Andre. :up:
Title: Re: Show blocks on non-smf page?
Post by: G6Cad on June 14, 2009, 03:24:19 PM
The layout looks horrid in Firefox and Opera  :buck2:
Title: Re: Show blocks on non-smf page?
Post by: andre on June 14, 2009, 04:51:36 PM
Quote from: G6 on June 14, 2009, 03:24:19 PM
The layout looks horrid in Firefox and Opera  :buck2:

I'm using Firefox. It might be your resolution...