vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How Do I Create Custom Template with Multi Page Catagories (https://vborg.vbsupport.ru/showthread.php?t=95143)

LEAD_WEIGHT 08-26-2005 11:35 PM

How Do I Create Custom Template with Multi Page Catagories
 
Know What I Mean Vern? :rolleyes:

How Do I get a second page or make other pages or make other pages as certain catagories like for my flash games I want Action titles then RPG.

I guess I can make a dropdown navagation for it but do I need to create different templates for each catagory & another .php file??



This is what I have for .php file



PHP Code:


<?php

// ####################### SET PHP ENVIRONMENT ###########################

error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('NO_REGISTER_GLOBALS'1);

define('THIS_SCRIPT''Online_FlashGames'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################

// get special phrase groups

$phrasegroups = array(

);

// get special data templates from the datastore

$specialtemplates = array(

);

// pre-cache templates used by all actions

$globaltemplates = array(

'Online_FlashGames',

);

// pre-cache templates used by specific actions

$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################

require_once('./global.php');

// #######################################################################

// ######################## START MAIN SCRIPT ############################

// #######################################################################

$navbits = array();

$navbits[$parent] = '';

$navbits construct_navbits($navbits);

$paypal "<iframe width=100% height=590 frameborder=1 </iframe>";

eval(
'$navbar = "' fetch_template('navbar') . '";');

eval(
'print_output("' fetch_template('Online_FlashGames') . '");');



?>





This is the custom template in the style's.





Code:



 $stylevar[htmldoctype]

<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">

<head>

<title>$vboptions[bbtitle]</title>

$headinclude

</head>

<body>

$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

<tr>

 <td class="tcat">Play My Flash Games Online</td>

</tr>

<tr>

 <td class="alt1">$online_flash_games</td>

</tr>

</table>

$footer

</body>

</html>





But I want to make look like this set up.







Code:



                              <div align="center">

                                <table border="0" cellpadding="0" cellspacing="0" width="100%">

                                  <tr>

                                    <td width="100%">

                                      <table cellPadding="2">

                                        <tbody>

                                          <tr>

                                            <td align="left">

                                              <p></p>

                                            </td>

                                          </tr>

                                        </tbody>

                                      </table>

                                      <div align="center">

                                        <!-- WHOLE TABLE #9 -->

                                        <!-- WHOLE TABLE #8 -->

                                        <!-- WHOLE TABLE 1 -->

                                        <!-- WHOLE TABLE #2 -->

                                        <!-- WHOLE TABLE #3 -->

                                        <!-- WHOLE TABLE #4 -->

                                        <!-- WHOLE TABLE #5 -->

                                        <table cellSpacing="0" cellPadding="2" width="100%" bordercolorlight="#BBAC8C" border="1" bordercolordark="#FFFFFF">

                                          <tbody>

<tr>

 <td vAlign="top" align="left" width="25%">

 <!-- GAME 001 -->

                                                <table cellSpacing="0" cellPadding="2" width="100%">

                                                  <tbody>

                                                    <tr>

                                                      <td width="70"><font face="Tahoma" size="1"><img class="image" src="http://www.mysitegame.com/image/game.jpg" width="70" height="60"></font></td>

                                                      <td vAlign="top" align="left"><b><font face="Tahoma" size="1">Little Shepherd<img src=/images/new.gif>

                                                            </font>

                                                        </b>

                                                        <div>

                                                          <font face="Tahoma" size="1">- <a href="http://game.mysitegame.com" target="_blank">Play

                                                          Game</a>

                                                            </font>

                                                          <div>

                                                            <font face="Tahoma" size="1">- <a href="<A href="http://www.mysitegame.com/downloads/game.zip">Download">http://www.mysitegame.com/downloads/game.zip">Download

                                                            it</a>

                                                            </font>

                                                            <div>

                                                          </div>

                                                        </div>

                                                        </div>

                                                      </td>

                                                    </tr>

                                                  </tbody>

                                                </table>

                                                <!-- END OF GAME 001 -->

                                              </td>

                                            </tr>

                                          </tbody>

                                        </table>

                                        <!-- WHOLE TABLE #6 -->

                                        <!-- WHOLE TABLE #7 -->

                                      </div>

                                    </td>

                                  </tr>

                                </table>

                              </div>

                            </td>

                          </tr>

                          <tr>

                            <td width="100%" height="10"></td>

                          </tr>

                        </table>

                      </div>

                    </td>

                  </tr>

                </table>

              </td>

            </tr>

          </table>

        </div>

      </td>

    </tr>

  </table>

  </center>

</div>







This is what it looks as finish.

Want to know if it is good coding plus I want to know how to add second page if first is full or make it like first page RPG the next one Action and so on. One more thing is how to make it scroll. Never mind on scroll I think I already know Duh!.





Code:



 $stylevar[htmldoctype]

<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">

<head>

<title>$vboptions[bbtitle]</title>

$headinclude

</head>

<body>

$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

<tr>

 <td class="tcat">Play My Flash Games Online</td>

</tr>



                              <div align="center">

                                <table border="0" cellpadding="0" cellspacing="0" width="100%">

                                  <tr>

                                    <td width="100%">

                                      <table cellPadding="2">

                                        <tbody>

                                          <tr>

                                            <td align="left">

                                              <p></p>

                                            </td>

                                          </tr>

                                        </tbody>

                                      </table>

                                      <div align="center">

                                        <!-- WHOLE TABLE #9 -->

                                        <!-- WHOLE TABLE #8 -->

                                        <!-- WHOLE TABLE 1 -->

                                        <!-- WHOLE TABLE #2 -->

                                        <!-- WHOLE TABLE #3 -->

                                        <!-- WHOLE TABLE #4 -->

                                        <!-- WHOLE TABLE #5 -->

                                        <table cellSpacing="0" cellPadding="2" width="100%" bordercolorlight="#BBAC8C" border="1" bordercolordark="#FFFFFF">

                                          <tbody>

<tr>

 <td vAlign="top" align="left" width="25%">

 <!-- GAME 001 -->

                                                <table cellSpacing="0" cellPadding="2" width="100%">

                                                  <tbody>

                                                    <tr>

                                                      <td width="70"><font face="Tahoma" size="1"><img class="image" src="http://www.mysitegame.com/image/game.jpg" width="70" height="60"></font></td>

                                                      <td vAlign="top" align="left"><b><font face="Tahoma" size="1">Little Shepherd<img src=/images/new.gif>

                                                            </font>

                                                        </b>

                                                        <div>

                                                          <font face="Tahoma" size="1">- <a href="http://game.mysitegame.com" target="_blank">Play

                                                          Game</a>

                                                            </font>

                                                          <div>

                                                            <font face="Tahoma" size="1">- <a href="<A href="http://www.mysitegame.com/downloads/game.zip">Download">http://www.mysitegame.com/downloads/game.zip">Download

                                                            it</a>

                                                            </font>

                                                            <div>

                                                          </div>

                                                        </div>

                                                        </div>

                                                      </td>

                                                    </tr>

                                                  </tbody>

                                                </table>

                                                <!-- END OF GAME 001 -->

                                              </td>

                                            </tr>

                                          </tbody>

                                        </table>

                                        <!-- WHOLE TABLE #6 -->

                                        <!-- WHOLE TABLE #7 -->

                                      </div>

                                    </td>

                                  </tr>

                                </table>

                              </div>

                            </td>

                          </tr>

                          <tr>

                            <td width="100%" height="10"></td>

                          </tr>

                        </table>

                      </div>

                    </td>

                  </tr>

                </table>

              </td>

            </tr>

          </table>

        </div>

      </td>

    </tr>

  </table>

  </center>

</div>



<tr>

 <td class="alt1">$online_flash_games</td>

</tr>

</table>

$footer

</body>

</html>


Marco van Herwaarden 08-27-2005 06:50 AM

Lol, this is too much so early on a saturday to read and reply. :D

LEAD_WEIGHT 08-27-2005 07:57 AM

I got it to work as is but I was wondering how to add another page. I think I have to make templates for each catagory like Action , RPG , Shooting & so on. I going to hard code the game links so I do not have to make edits in my vb.php. work.work...work.... :(

If I do this right then another Arcade comes in.. he he he blahh..


All times are GMT. The time now is 06:42 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01829 seconds
  • Memory Usage 1,820KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete