TinyPortal

Development => Resources => Topic started by: Dragooon on November 15, 2007, 04:44:28 PM

Title: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on November 15, 2007, 04:44:28 PM
Here is just my 22 cents :P
Want to make something like http://yoursite.com being your homepage and http://forum.yoursite.com being your Forum yet keep it only till SMF/TP? It can also be any page, not just a homepage.
Want to? But don't know how to? Well I have done it, and here is a *alternative* way to do this
A example is http://gforumx.com being the homepage showing TP and SMF whereas the actual TP/SMF is at http://forum.gforumx.com

I took the help of this guide:
   
[SMF 1.1.x] Integrating the forum into your site using SMF's layer system (http://www.simplemachines.org/community/index.php?topic=145838.0)
And all I used on that page was:
<?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();
?>

Yup, only that.
It was mainly derived from that Guide only, but I changed a few stuff(see for yourself) and I made this possible :D.

This was my tip for you to make a nice homepage :).

Hope you like it!
Title: Re: How to Make a HomePage at a different URL Yet, Keeping the TPish effect.
Post by: IchBin on November 15, 2007, 06:02:40 PM
For future reference TP 1.0 will have the option to use a page without requiring the other layers of SMF. Pretty much just add your own custom blank page. :up:
Title: Re: How to Make a HomePage at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on November 16, 2007, 01:32:34 AM
Thats even cooler :P
Title: Re: How to Make a HomePage at a different URL Yet, Keeping the TPish effect.
Post by: CampCounselor on November 16, 2007, 01:55:12 AM
good deal!
Title: Re: How to Make a HomePage at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on November 16, 2007, 01:57:19 AM
Thanks :)
I'll soon implement this on my site, once I am done buying SMF Theme shop subscription.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: MinasC on December 02, 2007, 10:48:52 AM
that's pretty cool Dragooon , way to go !  :up:
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 02, 2007, 10:51:28 AM
Thanks :)
And if you want to hide some panels you can use tp_hidebars function
Before
template_main_above(); Add
tp_hidebars('YOUR BAR');
'center' For Center
'left' For Left
'right' For right.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 07, 2007, 05:00:28 AM
A Demo of this can be also found at my own site, http://gforumx.com and http://forum.gforumx.com being my forum.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: fangweile on December 07, 2007, 06:00:34 AM
Great!. That was what i am looking for. Thanks for sharing  ;D
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 27, 2007, 04:58:24 PM
Hi Dragoon,

Great code!

I have created a page but can't get the ssi_shutdown(); to show at the bottom of the page. When I navigate to this new page it doesnt recognise that I'm logged in and all my menu options disappear.

Any advice? My code is below?

<?php
$ssi_theme 
1;
global 
$context;
require_once(
'/home/rewind01/public_html/forum/SSI.php');
TPortal_init();
tp_hidebars('right');
tp_hidebars('center');
template_main_above();

include_once (
'includes/config.php');
include_once (
'includes/tbs_class.php');


// GET NETWORK TO IMPORT FROM

if ($service != "") {//get service from processor e.g mygmail.php  $service = 'mygmail';

    
$get $service;

}
else {
    
$get $_GET["domain"];
}
if (
$get =="") {

    
$script "myhotmail.php";

    
$img "myhotmail.gif";

}
else {

    
$script $get.'.php';

    
$img $get.'.gif';
}
//select template inner table [var.which] in TBS (email or cvs upload)
if ($table != "") {
    
$which $table;
}
else {
    
$which $_GET['tbl'];
$poweredby_top $footer//powered by
}

//if loading index.php for first time
if ($which == "") {
    
$which 1;
$poweredby_top $footer//powered by
}


$TBS = new clsTinyButStrong;
$TBS->NoErr true;// no more error message displayed.
$TBS->LoadTemplate('template.html');
$TBS->MergeBlock('blk1',$display_array);
$TBS->Show();

echo 
$show;
ssi_shutdown();

?>



Regards and thanks again for the code.

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 27, 2007, 07:52:52 PM
I've managed to sort the session issue, I needed to enable sub domain cookies. I'm still struggling with getting the footer to display though?

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 09:42:28 AM
Quote from: Dragooon on December 02, 2007, 10:51:28 AM
Thanks :)
And if you want to hide some panels you can use tp_hidebars function
Before
template_main_above(); Add
tp_hidebars('YOUR BAR');
'center' For Center
'left' For Left
'right' For right.

Can we use some code to show front page blocks?

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 28, 2007, 09:45:20 AM
I am not sure about front page blocks,
Can I see a URL or the Page code you use which is causing the Footer trouble?
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 10:16:26 AM
Quote from: Dragooon on December 28, 2007, 09:45:20 AM
I am not sure about front page blocks,
Can I see a URL or the Page code you use which is causing the Footer trouble?

Hi Dragoon,

The url is http://www.rewindlancs.com/forum/importer/

Many thanks!

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 28, 2007, 10:56:13 AM
whats the full code you use at that page?
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 11:15:02 AM
Hi Dragooon,

I have attached the index.php file and the template.html (renamed template.txt) file which it calls.

Many thanks again.

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 28, 2007, 12:12:01 PM
I am not sure but maybe because you are declaring Head and Body again.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 12:13:14 PM
Quote from: Dragooon on December 28, 2007, 12:12:01 PM
I am not sure but maybe because you are declaring Head and Body again.


Thanks for looking Dragooon, its had me beat for days :(

Great site BTW ;)

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 28, 2007, 12:15:46 PM
I can help you out making that,
Rather than using a Incluude on that html page, move the JS Include on the Head part of the index.template of the theme which's ID is 21.
No remove the Head and Body tags and include it. It should then work.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 01:09:48 PM
Hi Dragooon,

Apologies if I'm sounding a bit of a noob but I havent quite understood your advice. I have attached the index.template.php file in case it helps.

Thanks for taking the time to try and help me, it's appreciated.

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 28, 2007, 01:14:01 PM
xD
All the part in your <head></head> tags in your template.html(Excluding the tags itself), copy them and put them before your </head> tag of your index.template.php
Now Remove the <head></head> part(including the stuff between them) and remove the <body></body> tags(Only tags not the stuff between them).
And then try and see what happens.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 01:27:47 PM
Hi Dragooon,

Thanks once again.

I tried that and it produced a template parse error. Can you check the code and see if I screwed up? I've attached the files  :)

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 28, 2007, 01:31:09 PM
I forgot to tell you,
Any single quote ( ' ) Must be escaped with a backslash ( \ ).
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 01:36:09 PM
Thanks Dragoon,

Trying it now ;)

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 01:38:51 PM
Still no joy  :'(

This is the relevant part of the index.php code, am I missing something?

<script language="javascript1.3" src="importer/js/emailvalidation.js" ></script>
<script language="javascript1.3" src="importer/js/ahah.js" ></script>
<script>

//Check all radio/check buttons script- by javascriptkit.com
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use 


function checkall(thestate){
var el_collection = document.forms['/form_results'/].elements['/list[]'/];
for (var c=0;c<el_collection.length;c++)
el_collection[c].checked=thestate
}

</script>
<style type="text/css">

td.off {
background: #A4A4A4;
}

</style>


echo '
</head>
<body>';


Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 28, 2007, 01:40:43 PM
You escaped with forward slashed,
They should be like
\'
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 01:50:18 PM
Hi Dragooon,

No errors this time, the script seems to be working ok, but still no blocks and no footer.

http://www.rewindlancs.com/forum/importer/myhotmail.php

It's crazy isn't it  :(

Thanks again for your help and patience.

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 28, 2007, 02:01:11 PM
Blocks aren't there because you used tphidebars, it hides them :P
And what is your template.html, post it in a Code box.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 02:10:43 PM
Lol, you're right re the blocks. I've removed that code now from index.php but they're still not showing.

Thanks for helping Dragooon, it really is appreciated. The code in template.html is as below.

<div align="center">
  <center>

            <div align="center">

            <TABLE cellSpacing=0 cellPadding=5 width=720
            bgColor=#ffffff border=0 height="1" id="table16">
              <TBODY>
              <TR>
                <TD vAlign=top height=20 width="141"><IMG src="images/[var.img]">
                <TD width=467 height="20">
                  <p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<font color="#5B5B5B">
</font>
<p>
<font color="#5B5B5B" face="Verdana" size="2">It's easy to invite friends to RWL - It's also fun and a great way to make sure your friends can join in. We do not store your email address, password, your friends emails or any other details at all so rest assured this is the only time we will contact them!<p>
</font></TD></TR>
              <TR>
                <TD vAlign=top width=618 colspan="2" height="0">
<div align="center">
                    <center>
                  <table border="0" width="720" cellspacing="0" cellpadding="0" id="table17">
                    <tr>
                      <td width="100%">
                        <table border="0" width="100%" cellspacing="1" cellpadding="0" height="22" id="table18">
                          <tr>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="7%" bgcolor="#CCCCCC" align="center">
<font face="Arial">
<a href="index.php?domain=myyahoo&tbl=1">
<font color="#FFFFFF" style="font-size: 9pt">Yahoo</font></a></font></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="7%" bgcolor="#CCCCCC" align="center">
<font face="Arial">
<a href="index.php?domain=mygmail&tbl=1">
<font color="#FFFFFF" style="font-size: 9pt">Gmail</font></a></font></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="8%" bgcolor="#CCCCCC" align="center">
<font face="Arial">
<a href="index.php?domain=myhotmail&tbl=1">
<font color="#FFFFFF" style="font-size: 9pt">Hotmail</font></a></font></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="5%" bgcolor="#CCCCCC" align="center">
<font face="Arial">
<a href="index.php?domain=myaol&tbl=1">
<font color="#FFFFFF" style="font-size: 9pt">AOL</font></a></font></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="7%" bgcolor="#CCCCCC" align="center">
<a href="index.php?domain=mylycos&tbl=1">
<font face="Arial" color="#FFFFFF" style="font-size: 9pt">
Lycos</font></a></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="6%" bgcolor="#CCCCCC" align="center">
<a href="index.php?domain=myrediffmail&tbl=1">
<font face="Arial" color="#FFFFFF" style="font-size: 9pt">
Rediff</font></a></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="8%" bgcolor="#CCCCCC" align="center">
<a href="index.php?domain=mymail&tbl=1">
<font face="Arial" color="#FFFFFF" style="font-size: 9pt">
Mail.com</font></a></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="8%" bgcolor="#CCCCCC" align="center">
<font face="Arial" style="font-size: 9pt">
<a href="index.php?domain=myoutlook&tbl=2"><font color="#FFFFFF">
Outlook</font></a></font></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="8%" bgcolor="#CCCCCC" align="center">
<font face="Arial" style="font-size: 9pt">
<a href="index.php?domain=myexpress&tbl=2">
<font color="#FFFFFF">Express</font></a><font color="#FFFFFF">
</font></font></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="12%" bgcolor="#CCCCCC" align="center">
<font face="Arial" style="font-size: 9pt">
<a href="index.php?domain=mythunderbird&tbl=2">
<font color="#FFFFFF">Thunder Bird</font></a></font></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="5%" bgcolor="#CCCCCC" align="center">
<a href="index2.php">
<font face="Arial" style="font-size: 9pt" color="#FFFFFF">
I</font></a><font face="Arial" style="font-size: 9pt"><a href="index.php?domain=myicq&tbl=1"><font color="#FFFFFF">CQ</font></a></font></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="9%" bgcolor="#CCCCCC" align="center">
<font face="Arial" style="font-size: 9pt" color="#FFFFFF">
<a href="index.php?domain=mykatamail&tbl=1">
<font color="#FFFFFF">Katamail</font></a></font></td>
                            <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" width="8%" bgcolor="#CCCCCC" align="center">
<font face="Arial" style="font-size: 9pt" color="#FFFFFF">
<a href="index.php?domain=myemailit&tbl=1">
<font color="#FFFFFF">Email.it</font></a></font></td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                    <tr>
                      <td width="100%" bgcolor="#FFFFFF" height="0">

<div align="center">
  <center>
  <hr color="#FFFFFF">
  <table border="0" width="500" id="table19" style="border: 1px solid #D8D8D8; " cellspacing="0" cellpadding="0">
  <form name=emailform action="[var.script]"  method="post" onSubmit="return emailCheck(this.username.value);">
    <tr>
      <td width="88%" bgcolor="#FFFFFF">
        <div align="center">
          <table border="0" width="100%" id="table20" cellspacing="0" cellpadding="0">
            </center>
                    </center>

  </center>
            <tr>
    <td align="right" width="176" height="43" bgcolor="#FFFFFF">
      <b>
      <font face="Arial" size="2" color="#333333">Email address&nbsp; </font>
    </b>
    </td>
  <center>
                    <center>
  <center>
    <td align="right" width="5" height="43">
    <p align="left">&nbsp;</td>
    <td align="right" width="350" height="43">
<input name="username" size="34" style="float: left"></td>
            </tr>
            <tr>
    <td align="right" width="176" height="43" bgcolor="#FFFFFF" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
      <b>
      <font face="Arial" size="2" color="#333333">Password&nbsp; </font>
    </b>
    </td>
    <td width="5" height="43" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">&nbsp;</td>
    <td width="350" height="43" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px"> <input type="password" name="password" size="34"></td>
            </tr>
            <tr>
    <td align="right" width="176" height="40" bgcolor="#F2F2F2">
      <font face="Arial" size="2" color="#333333">No details are stored&nbsp;
</font>
    </td>
    <td width="5" height="40" bgcolor="#F2F2F2">
&nbsp;
</td>
    <td width="350" height="40" bgcolor="#F2F2F2">
<input type="submit" value="Invite My Friends" style="background-color: #FFFFFF; border: 1px solid #A4A4A4; ; font-family:Arial; font-size:10pt; color:#5B5B5B"></td>
            </tr>
          </table>
        </div>
      </center></center></center>
      </td>
    </tr>
    </form>
    <!--[onload_11;block=table;when [var.which]=1;comm]-->
  </table>
</div>
</td>

                    </tr>
                    <tr>
                      <td width="100%" bgcolor="#FFFFFF" height="0">

<div align="center">

<table border="0" width="500" id="table21" cellspacing="0" cellpadding="0" style="border: 1px solid #D8D8D8">
<form name="emailform2" enctype="multipart/form-data" action="[var.script]"  method="post">
    <tr>
      <td width="91%">
        <div align="center">
          <table border="0" width="100%" id="table22" cellspacing="0" cellpadding="0">
            </center>
                    </center>

  </center>
            <tr>
    <td align="right" width="526" colspan="2" bgcolor="#F9F9F9">
      <p align="center">
</td>
  <center>
                    <center>
  <center>
            </tr>
            <tr>
    <td align="right" width="192" height="40">
<font face="Arial" size="1">&nbsp; </font></td>
    <td width="382" height="40">
<font face="Arial" size="2" color="#333333">Email CSV <strong style="font-weight: 400">&nbsp;(Limit file size 2MB)</strong></font></td>
            </tr>
            <tr>
    <td align="right" width="192" height="40" bgcolor="#FFFFFF">
<p><font face="Arial" size="2" color="#333333">&nbsp;&nbsp;&nbsp;&nbsp; Select File&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></p>
</td>
    <td width="382" height="40" bgcolor="#FFFFFF">
<input name="ufile" type="file" id="ufile" size="28" /></td>
            </tr>
            <tr>
    <td align="right" width="192" height="40" bgcolor="#F2F2F2" style="border-top: 1px solid #C0C0C0">
  <font face="Arial" size="2" color="#333333">No details are stored&nbsp;
</font>
    &nbsp;&nbsp;
    </td>
    <td width="382" height="40" bgcolor="#F2F2F2" style="border-top: 1px solid #C0C0C0">
<input type="submit" value="Invite My Friends" style="background-color: #FFFFFF; border: 1px solid #A4A4A4; ; font-family:Arial; font-size:10pt; color:#5B5B5B"></td>
            </tr>
            </table>
        </div>
      </center></center></center>
      </td>
    </tr>
  </form>
  <!--[onload_12;block=table;when [var.which]=2;comm]-->
  </table>
</div>
</td>
                    </tr>
                  </table>
                  </div>
                </TD>
              </TR>
              </TBODY></TABLE>
</div>
<p>
      <div id='target'>
      </div>
</p>
&nbsp;&nbsp;
<!--[var.poweredby_top;htmlconv=no;comm]-->
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="500" id="table3" style="border: 1px solid #D8D8D8">
<!--[onload_13;block=table;when [var.show_result]=1;comm]-->
<form name="form_results" action="postage.php" method="post">
<tr>
<td bgcolor="#F2F2F2" height="27" width="27%">
<b><font face="Arial" color="#3366CC">
<p align="center"><font face="Arial" style="font-size: 9pt"><a href="javascript:checkall(true)">
<font color="#333333">Check All</font></a></font></font><font face="Arial" style="font-size: 9pt"><font face="Arial" color="#333333"> | </font><font face="Arial" color="#3366CC">
<a href="javascript:checkall(false)"><font color="#333333">Uncheck All</font></a></font></font><font face="Arial" size="1" color="#333333">&nbsp; </font></b></td>
<td bgcolor="#F2F2F2" height="27" width="73%">
<b><font face="Arial" size="2" color="#333333">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MY CONTACTS</font></b></td>
</tr>
<tr>
<td height="25" colspan="2">
<div align="center">
<table cellpadding="0" cellspacing="0" width="100%" id="table4" style="border-top: 1px solid #D8D8D8; ">
<tr>
<td width="34" bgcolor="#FFFFFF" style="border-left-width: 1px; border-right: 1px solid #D8D8D8; border-top-width: 1px; border-bottom-width: 1px">
<p align="center">
<input type="checkbox" name="list[]" value="[blk1.contacts_email;block=table]x22z[blk1.contacts_name;block=table]" checked></td>
<td height="25" bgcolor="#FFFFFF" width="212" style="border-left-width: 1px; border-right: 1px solid #D8D8D8; border-top-width: 1px; border-bottom-width: 1px">
<p align="center">
<font face="Arial" size="2" color="#333333">[blk1.contacts_name;block=table]</font></td>
<td height="25" bgcolor="#FFFFFF">
<p align="center">
<font face="Arial" size="2" color="#333333">[blk1.contacts_email;block=table;ope=max:35]<font color="#333333"></font></font></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td height="42" style="border-left-width: 1px; border-right-width: 1px; border-top: 1px solid #D8D8D8; border-bottom-width: 1px" bgcolor="#F2F2F2" colspan="2">
<p align="center">
<input type="hidden" name = "sendersemail" value="[var.sendersemail]">
<input type="submit" value="  Invite friends  " name="B1" style="font-family: Arial; font-size: 10pt; font-weight: bold; color: #5B5B5B; border: 1px solid #D8D8D8; background-color: #FFFFFF"></td>
</tr>
</form>
</table>
</div>
<div id="notfound" align="center">
&nbsp;&nbsp;
<table border="0" cellpadding="0" cellspacing="0" width="499" id="table5" style="border: 1px solid #D8D8D8">
<!--[onload_2;block=table;when [var.show]=1;comm]-->
<tr>
<td bgcolor="#FFFFFF" height="80">
<p align="center"><b><font face="Arial" size="2" color="#3366CC">!Error
- No contacts were found, please check your logins.</font></b></td>
</tr>
</table>
<p align="center">&nbsp;</div>
<div align="center">
<!--[var.poweredby_bottom;htmlconv=no;comm]-->
</div>


Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on December 28, 2007, 03:41:26 PM
What happens if you stop calling that template file?
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 03:57:16 PM
Hi Dragooon,

If I comment out $TBS->Show(); as below then the blocks are there as is the footer.

Quote$TBS = new clsTinyButStrong;
$TBS->NoErr = true;// no more error message displayed.
$TBS->LoadTemplate('template.html');
$TBS->MergeBlock('blk1',$display_array);
//$TBS->Show();

echo $show;

ssi_shutdown();

?>

Regards,

Wilsy.

P.S. I can mail you the zip of files for the importer script if you wish?
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on December 28, 2007, 05:24:38 PM
Quote from: wilsy on December 28, 2007, 09:42:28 AM
Quote from: Dragooon on December 02, 2007, 10:51:28 AM
Thanks :)
And if you want to hide some panels you can use tp_hidebars function
Before
template_main_above(); Add
tp_hidebars('YOUR BAR');
'center' For Center
'left' For Left
'right' For right.

Can we use some code to show front page blocks?

Regards,

Wilsy.

Thanks for all your help today Dragooon regarding integrating the getmycontacts script, guess it just wasn't to be but your help was very much appreciated.

Can anyone provide any pointers on showing frontpage blocks on an external page. So far we can have left/right/centre but not front?

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on February 16, 2008, 12:38:48 PM
Quote

Can anyone provide any pointers on showing frontpage blocks on an external page. So far we can have left/right/centre but not front?


Is it possible to include the frontpage blocks?

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on February 16, 2008, 01:06:35 PM
Hmm Must be, But no idea how :P
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on February 16, 2008, 03:15:38 PM
Thanks Dragooon - if you cant solve it then it may well be impossible! ;)
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on February 16, 2008, 03:22:16 PM
Nothing is impossible in this criteria ;)
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on February 17, 2008, 10:18:00 AM
I managed to just use block code in the new page and it works pretty well. This page is at http://www.rewindlancs.com whilst the main site is at http://rewindlancs.com/forum/index.php

I'm hoping it may help with search engines a little as I was redirecting with .htaccess previously.

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on February 17, 2008, 10:57:40 AM
I spoke too soon.

I'm now getting this error on the new page at www.rewindlancs.com

Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/rewind01/public_html/forum/SSI.php on line 162

This is the code in this page: -


<?php
require_once('/home/rewind01/public_html/forum/SSI.php');
$ssi_theme 21;
global 
$context;
TPortal_init();

template_main_above();

$banners = array (
'<div align="center"><a href="http://rewindlancs.com/forum/index.php?action=register"><img src="http://www.rewindlancs.com/forum/images/splash/spit_image3.jpg"></a>',
'<div align="center"><a href="http://rewindlancs.com/forum/index.php?action=register"><img src="http://www.rewindlancs.com/forum/images/splash/spit_image.jpg"></a>',

);

shuffle($banners);

echo 
$banners[0];

echo 
'
<p>
<div align="center">
<TABLE width="600px" border="0" cellspacing="0" cellpadding="10">
<tr> 
    <td align="center" valign="top"><IMG SRC="http://rewindlancs.com/forum/gallery/thumb_529_16_09_07_6_55_57.jpg" ALT="some RWL members" WIDTH=104 HEIGHT=78>
    <p>
    <IMG SRC="http://rewindlancs.com/forum/gallery/thumb_88_12_07_07_3_04_59.jpg" ALT="Anglezarke Falls" WIDTH=104 HEIGHT=78>
    <p>
    <IMG SRC="http://rewindlancs.com/forum/gallery/thumb_1_16_01_07_3_08_11.jpg" ALT="who says that\'s the boundary!" WIDTH=104 HEIGHT=78>
    <p>
     <IMG SRC="http://rewindlancs.com/forum/gallery/thumb_574_16_11_07_4_15_14.jpg" ALT="the hill" WIDTH=104 HEIGHT=78>
 
    </td>
    <td><b>Welcome to RWL - Lancashire\'s Original and Best Online Community</b><p>

There\'s lots to do at RWL but firstly we need to give you some background as to why this site was established in the first place!<p>
In 1974 Lancashire was carved up in a local government re-organisation. This meant that towns such as Bolton, Bury, Wigan and lots of others had \'Lancashire\' removed from their postal address. These were towns that were proud of their long association with Lancashire and many wanted that to continue. RWL was established in January 2007, not to become a pressure group, but simply to provide a community for all true Lancastrians, irrespective of their postal address. It is also a place where ex-pat\'s from all over the world can stop by.<p>
<p>
At RWL you will find very lively discussion forums where you can debate the latest news stories, things you find unbelievable, incredible, or just downright stupid! 
<p>
You can create a profile, add photos to it or tell the world a little bit about yourself. We have a games arcade with well over 100 games. You can arrange tournaments or just see if you can become a champion and beat the current high scores. 
<p>
There is a chat room which is always open and in there lives our resident chat host, Kelli, who will always have a few words to say if theres nobody else around to talk to ...but beware, she is rather sassy!! 
<p>
RWL is absolutely free to use, the only thing we ask you to spend is your time, and we hope that every minute with us in an enjoyable experience.
<p></td>
  </tr>
  <tr> 
    <td align="center" valign="top"><IMG SRC="http://rewindlancs.com/forum/gallery/thumb_293_22_08_07_7_14_13.jpg" ALT="some RWL members" WIDTH=104 HEIGHT=78></td>
    <td><b>Preston</b><p>

Night life in Preston is rich and varied. The town boasts a delightful array of restaurants and cafe bars along with many different pubs to choose from. For the younger crowd Preston is also host to many nightclubs.

The Grey Friar is a JD Wetherspoons situated at the bottom of Friargate, which is a perfect stopping point on your way into town. It usually packed but it is excellent value for money. Across the ring-road are Mood and Bar Censsa, which both have modern interiors and play cheesy music. Mood also has a dancefloor and has lots of drinks offers.
<p>
Off Fishergate trendy bars such as Voodoo Lounge, Loft, Browns and Hush are great if you fancy dressing up smart and fancy something a bit more \'up market\'. 
<p></td>
  </tr>
  <tr> 
    <td align="center" valign="top"><IMG SRC="http://rewindlancs.com/forum/gallery/thumb_293_22_08_07_7_14_53.jpg" ALT="some RWL members" WIDTH=104 HEIGHT=78></td>
    <td><b>Lancaster</b><p>

The nightlife in Lancaster can be as exciting as you want it to be. The city offers a diverse nightlife scene that can be enjoyed by all persons.

Depending on what you are looking for, there are many places you can go out to at night. For those who like to party, you\'ll be glad to know that most clubs are open every night. Some of the clubs and bars include The Sugarhouse, Revolution, Liquid, Toast, the Lounge and Bentleys.
<p>
Lancaster has a great selection of traditional pubs. There are plenty to choose from, as you would expect from a City with a large resident student population. If you are not to keen on dancing and just want to spend some time with your mates, there are a number of pubs to choose from where you can do just that.
</td>
  </tr>
  
</TABLE>
</div>

'
;

ssi_shutdown();
?>


Does anyone have any ideas?

Regards,

Rick.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on February 17, 2008, 11:06:51 AM
Admin > Server Settings > Feature and configuration
Make sure the fol. is correct :
Enable local storage of cookies (unchecked)
Use subdomain independent cookies (checked)
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on February 17, 2008, 12:06:34 PM
Hi Dragoon,

Yes, I have that correct. I'm wondering if the path to SSI.php has been called correctly, it seems to be right?

Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on February 17, 2008, 12:34:49 PM
I've amended the file to call the SSI.php file right at the beginning and it seems to have sorted it. Should this cause me any problems?

<?
require_once('/home/rewind01/public_html/forum/SSI.php');
?>

<?php
$ssi_theme 
21;
global 
$context;
TPortal_init();

template_main_above();

$banners = array (
'<div align="center"><a href="http://rewindlancs.com/forum/index.php?action=register"><img src="http://www.rewindlancs.com/forum/images/splash/spit_image3.jpg"></a>',
'<div align="center"><a href="http://rewindlancs.com/forum/index.php?action=register"><img src="http://www.rewindlancs.com/forum/images/splash/spit_image.jpg"></a>',

);

shuffle($banners);

echo 
$banners[0];

echo 
'
<p>
<div align="center">
<TABLE width="600px" border="0" cellspacing="0" cellpadding="10">
<tr> 
    <td align="center" valign="top"><IMG SRC="http://rewindlancs.com/forum/gallery/thumb_529_16_09_07_6_55_57.jpg" ALT="some RWL members" WIDTH=104 HEIGHT=78>
    <p>
    <IMG SRC="http://rewindlancs.com/forum/gallery/thumb_88_12_07_07_3_04_59.jpg" ALT="Anglezarke Falls" WIDTH=104 HEIGHT=78>
    <p>
    <IMG SRC="http://rewindlancs.com/forum/gallery/thumb_1_16_01_07_3_08_11.jpg" ALT="who says that\'s the boundary!" WIDTH=104 HEIGHT=78>
    <p>
     <IMG SRC="http://rewindlancs.com/forum/gallery/thumb_574_16_11_07_4_15_14.jpg" ALT="the hill" WIDTH=104 HEIGHT=78>
 
    </td>
    <td align="left"><b>Welcome to RWL - Lancashire\'s Original and Best Online Community</b><p>

There\'s lots to do at RWL but firstly we need to give you some background as to why this site was established in the first place!<p>
In 1974 Lancashire was carved up in a local government re-organisation. This meant that towns such as Bolton, Bury, Wigan and lots of others had \'Lancashire\' removed from their postal address. These were towns that were proud of their long association with Lancashire and many wanted that to continue. RWL was established in January 2007, not to become a pressure group, but simply to provide a community for all true Lancastrians, irrespective of their postal address. It is also a place where ex-pat\'s from all over the world can stop by.<p>
<p>
At RWL you will find very lively discussion forums where you can debate the latest news stories, things you find unbelievable, incredible, or just downright stupid! 
<p>
You can create a profile, add photos to it or tell the world a little bit about yourself. We have a games arcade with well over 100 games. You can arrange tournaments or just see if you can become a champion and beat the current high scores. 
<p>
There is a chat room which is always open and in there lives our resident chat host, Kelli, who will always have a few words to say if theres nobody else around to talk to ...but beware, she is rather sassy!! 
<p>
RWL is absolutely free to use, the only thing we ask you to spend is your time, and we hope that every minute with us in an enjoyable experience.
<p></td>
  </tr>
  <tr> 
    <td align="center" valign="top"><IMG SRC="http://rewindlancs.com/forum/gallery/thumb_293_22_08_07_7_14_13.jpg" ALT="some RWL members" WIDTH=104 HEIGHT=78></td>
    <td align="left"><b>Preston</b><p>

Night life in Preston is rich and varied. The town boasts a delightful array of restaurants and cafe bars along with many different pubs to choose from. For the younger crowd Preston is also host to many nightclubs.

The Grey Friar is a JD Wetherspoons situated at the bottom of Friargate, which is a perfect stopping point on your way into town. It usually packed but it is excellent value for money. Across the ring-road are Mood and Bar Censsa, which both have modern interiors and play cheesy music. Mood also has a dancefloor and has lots of drinks offers.
<p>
Off Fishergate trendy bars such as Voodoo Lounge, Loft, Browns and Hush are great if you fancy dressing up smart and fancy something a bit more \'up market\'. 
<p></td>
  </tr>
  <tr> 
    <td align="center" valign="top"><IMG SRC="http://rewindlancs.com/forum/gallery/thumb_293_22_08_07_7_14_53.jpg" ALT="some RWL members" WIDTH=104 HEIGHT=78></td>
    <td align="left"><b>Lancaster</b><p>

The nightlife in Lancaster can be as exciting as you want it to be. The city offers a diverse nightlife scene that can be enjoyed by all persons.

Depending on what you are looking for, there are many places you can go out to at night. For those who like to party, you\'ll be glad to know that most clubs are open every night. Some of the clubs and bars include The Sugarhouse, Revolution, Liquid, Toast, the Lounge and Bentleys.
<p>
Lancaster has a great selection of traditional pubs. There are plenty to choose from, as you would expect from a City with a large resident student population. If you are not to keen on dancing and just want to spend some time with your mates, there are a number of pubs to choose from where you can do just that.
</td>
  </tr>
  
</TABLE>
</div>

'
;

ssi_shutdown();
?>


Regards,

Wilsy.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: Dragooon on February 17, 2008, 12:44:21 PM
the error disappeared for me. Try clearing your cookies and try logging in again.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: wilsy on February 17, 2008, 03:53:36 PM
Seems ok now. if anybody else gets the error can they let me know?

Regards,

Wilsy
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: fangweile on April 18, 2008, 12:05:50 PM
I am using this code and it's really great. I have some small problems here. I integrated my smf and my coppermine gallery. I have gallery button in my forum (My theme is dilbermc btw). When i try to view my gallery, the selected menu bar is pointed to "HOME" button, What code should i use to make it point to my gallery button. I think that this is related to current action I use. Do i have to create a custom action for my coppermine gallery button. What code should I used. 

Hope someone could help, thanks in advance:o :o

when I view my coppermine gallery the buttons shows like this.

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg155.imageshack.us%2Fimg155%2F9523%2Fclipimage002zy1.jpg&hash=b5284772d632ccfd227e99f44a4c50c9fbfa7771)
the selected menu must be at the gallery button, not in the home.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: IchBin on April 18, 2008, 08:53:17 PM
coppermine is not part of SMF so that means that your menu won't be able to pick it up. No way I can think of that would make the menu active when you are in the forum.
Title: Re: How to Make a Page at a different URL Yet, Keeping the TPish effect.
Post by: fangweile on June 10, 2008, 04:44:45 AM
Hello there,

I have a custom action mod installed in my forum and I have an action for my gallery.

action=gallery

It is possible to use this code to tell smf that the page current action is on gallery.

Maybe adding some codes in
<?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();
?>


any idea



[edit]

I have figured it out

I have modified the forum index.template.php

Find

    // Work out where we currently are.
   $current_action = 'home';


After it add this code
   if (defined('IN_COPPERMINE'))
      $current_action = 'gallery';


I really works.