TinyPortal

Development => Support => Topic started by: ibernet on November 15, 2007, 07:23:44 PM

Title: Adds panels tp
Post by: ibernet on November 15, 2007, 07:23:44 PM
I bring the code and then I explain

Quote
<?php
// CARICO IL FILE DELLA LINGUA
loadLanguage('leanowar');

// SCRIVO LA PAGINA PRINCIPALE
function template_principale() {
   global $context, $modSettings, $scripturl, $txt, $settings;
   
   echo'
   <table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
         <tr>
            <td>', theme_linktree(), '</td>
         </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
         <tr class="titlebg">';
         // in the table you can change the text to whatever you wish to say
            echo'<td>' , $txt['Principale'] , '</td>
         </tr>';
         
               // CREO IL COLLEGAMENTO ALLE VARIE PAGINE
               echo ($current_action == 'leanowar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
               <td valign="top" class="maintab_' , $current_action == 'leanowar' ? 'active_back' : 'back' , '">
                  <center>
                  <a href="', $scripturl, '?action=principale">' , $txt['mnuprincipale'] , '</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <a href="', $scripturl, '?action=regolamento">' , $txt['mnuregolamento'] , '</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <a href="', $scripturl, '?action=storia">' , $txt['mnustoria'] , '</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <a href="', $scripturl, '?action=mappa">' , $txt['mnumappa'] , '</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  </center>
               </td>' , $current_action == 'leanowar' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
               // FINE COLLEGAMENTO PAGINE
               
            // SCRIVO IL CONTENUTO DELLA PAGINA PRINCIPALE
            echo'<tr>
            <td class="windowbg">';
               echo '
                  <span style="font-family: Verdana, sans-serif; font-size: 100%; ">
                  <p>
                  ' , $txt['principale1'] , '
                  <p>
                  ' , $txt['principale2'] , '
                  <p>
                  ' , $txt['principale3'] , '
                  <p>
                  ' , $txt['principale4'] , '
                  <p>
                  ' , $txt['principale5'] , '
                  <p>
                  ' , $txt['principale6'] , '&nbsp;<a href="', $scripturl, '?action=storia">Leanowar Lands</a>&nbsp;' , $txt['principale7'] , '
                  </span>';
               echo'
            </td>
         </tr>
      </table>';
}
// FINE PAGINA PRINCIPALE
?>

I have created this page. I would now like to also add the pannallis (right and left) that I have in the first page of the tp.

Do you know how to tell me as to do?
Title: Re: Adds panels tp
Post by: ibernet on November 24, 2007, 08:52:38 AM
up post :P
Title: Re: Adds panels tp
Post by: Dragooon on November 24, 2007, 08:55:31 AM
You mean add Panels to a Non TP/SMF Page?
Title: Re: Adds panels tp
Post by: Ken. on November 24, 2007, 09:52:23 AM
One other question would be, how are you adding the page to your site... as a stand alone page or in an article.

As a stand alone page you won't be able to do what you want AFAIK, but as an article you should be able to do so.
There is however one other alternative for a stand alone page and that is to use the include command to pull it into an article.
Title: Re: Adds panels tp
Post by: Dragooon on November 24, 2007, 09:54:11 AM
Quote from: Ken. on November 24, 2007, 09:52:23 AM
As a stand alone page you won't be able to do what you want AFAIK
Wrong...
How to Make a HomePage at a different URL Yet, Keeping the TPish effect. (http://www.tinyportal.net/index.php?topic=20069.0)
Title: Re: Adds panels tp
Post by: Ken. on November 24, 2007, 10:09:00 AM
You are right Dragooon, with the "require_once" command you can have two ways to pull a page into the forum and not just the one that I suggested.  ;)
Title: Re: Adds panels tp
Post by: ibernet on November 24, 2007, 01:59:06 PM
Quote from: Dragooon on November 24, 2007, 08:55:31 AM
You mean add Panels to a Non TP/SMF Page?

yes

Example: http://forum.handofnorth.it/index.php?action=principale

I would like to add the panels of the tp to the sides
Title: Re: Adds panels tp
Post by: Dragooon on November 24, 2007, 02:03:19 PM
How to Make a HomePage at a different URL Yet, Keeping the TPish effect. (http://www.tinyportal.net/index.php?topic=20069.0)
Title: Re: Adds panels tp
Post by: ibernet on November 24, 2007, 02:27:46 PM
 it is not all right. this code creates me a copy of the forum inside the page. . .

To the pages I have to insert only the side panels. . of the tp
Title: Re: Adds panels tp
Post by: ibernet on December 02, 2007, 10:05:27 AM
up :)
Title: Re: Adds panels tp
Post by: Dragooon on December 02, 2007, 10:26:14 AM
You only want the left/right panels of TP not the center one?
Also If I am right you want the rest part right? Like the header/logo and menu.