TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 411
  • Total: 411

Show blocks on non-smf page?

Started by andre, June 07, 2009, 09:40:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andre

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!

Ken.

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.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.


andre



andre

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

andre

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)

Ken.

" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

G6Cad

The layout looks horrid in Firefox and Opera  :buck2:

andre

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...

This website is proudly hosted on Crocweb Cloud Website Hosting.