Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2005, 12:35 AM
LEAD_WEIGHT LEAD_WEIGHT is offline
 
Join Date: Feb 2005
Location: Canada
Posts: 369
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How Do I Create Custom Template with Multi Page Catagories

Know What I Mean Vern?

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>
Reply With Quote
  #2  
Old 08-27-2005, 07:50 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lol, this is too much so early on a saturday to read and reply.
Reply With Quote
  #3  
Old 08-27-2005, 08:57 AM
LEAD_WEIGHT LEAD_WEIGHT is offline
 
Join Date: Feb 2005
Location: Canada
Posts: 369
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:14 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.03781 seconds
  • Memory Usage 2,222KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete