Thread: vBindex v2.1
View Single Post
  #1476  
Old 07-30-2003, 06:30 PM
mccollin mccollin is offline
 
Join Date: Jul 2003
Location: North Carolina, USA
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, combining a couple of things here, let me see if this is correct.

Let's use my car example again. I have a main site that deals with all cars. I have various forums for the different types of cars. I want to combine all car news on my home page. I want individual portal pages for the car types that only show news for them... chevy, ford, dodge, etc.

In this example, chevy has one news forum, ford has two, and dodge has one.

I first add the multiple forum hack that was just posted about 5 or 6 posts back. That replaces

PHP Code:
... WHERE forumid '$newsforum' ... 
with

PHP Code:
... WHERE forumid in ($newsforum) ... 
You can then put multiple forums in the field in the control panel and it will work, but you would get all the forums on all the pages. I want to segregate forums on pages. So.....

I add the following just below the opening comments where it says support is only provided in this forum.

PHP Code:
// Set variables for this page

if ($mode=='') { 
  
$newsforum '3, 5, 8, 9';
} elseif (
$mode=='chevy') { 
  
$newsforum '3';
} elseif (
$mode=='ford') { 
  
$newsforum '5, 8';
} elseif (
$mode=='dodge') { 
  
$newsforum '9';
} else { 
  
$newsforum "$newsforum";  // default to what is in cp

Then you would call the home page using

or chevy with

etc, etc.

OK, that solves the multiple forums problem. But, I want to have different page layout as well... in particular I want to have targeted adds, and a panel of different info at the top of each page that talks about that car type. If I modify the code to this...


PHP Code:
// Set variables for this page

if ($mode=='') { 
  
$newsforum '3, 5, 8, 9';
  
$page ''
} elseif (
$mode=='chevy') { 
  
$newsforum '3';
  
$page 'chevypage';     
} elseif (
$mode=='ford') { 
  
$newsforum '5, 8';
  
$page 'fordpage'
} elseif (
$mode=='dodge') { 
  
$newsforum '9';
  
$page 'dodgepage'
} else { 
  
$newsforum "$newsforum";
  
$page ''


I can now have a different template page for each one. These need to be added in the control panel as "home_extra_chevypage", "home_extra_fordpage", and home_extra_dodgepage". No problem, now I have some more control.... but I ran into a problem here... my lack of knowledge on vBulletin.

I want to have other custom templates for the other bits... "home_newsbits", home_header", etc. I tried adding "home_custom_news" and added it to one of the "extra" pages, but I ended up with nothing showing up, telling me that it couldn't find my template. I tried adding the templates in the list at the head of vbindex.php, but that also didn't work. This is probably a basic vB question, but how do I add and call custom templates within the vB template system.

Thanks. (almost done )
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01291 seconds
  • Memory Usage 1,795KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete