Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
Using non-default template set on non-vB page? Details »»
Using non-default template set on non-vB page?
Version: , by MarkB MarkB is offline
Developer Last Online: Nov 2009 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 04-24-2002 Last Update: Never Installs: 0
 
No support by the author.

Hiyis,

I am setting up an external (ie, non-forum) page that is still powered by my vB database. I can pull data through and have it displayed using the default template/style of my forums, but I'd like it to be setup using another template set.

How do I do this??

Thanks :bandit:
Mark

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-24-2002, 07:22 AM
Sparkz's Avatar
Sparkz Sparkz is offline
 
Join Date: Nov 2001
Posts: 544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would think you could do this by hardcoding the templatesetid for templates only and styleid for the full package, or something like this in your script. never tried it tho.
Reply With Quote
  #3  
Old 04-24-2002, 07:35 AM
MarkB's Avatar
MarkB MarkB is offline
 
Join Date: Oct 2001
Location: London, UK
Posts: 324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tried that - it pulls the bgcolor etc through ok, but retains the default
header and footer etc :ermm:
Reply With Quote
  #4  
Old 04-24-2002, 07:39 AM
MarkB's Avatar
MarkB MarkB is offline
 
Join Date: Oct 2001
Location: London, UK
Posts: 324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then again, I could have the coding for that all messed up I have this:

PHP Code:
$templatesetid='6';
$replacementsetid='6'
Reply With Quote
  #5  
Old 04-24-2002, 08:48 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do that after require('./global.php') and you should be fine.
Reply With Quote
  #6  
Old 04-24-2002, 09:44 AM
MarkB's Avatar
MarkB MarkB is offline
 
Join Date: Oct 2001
Location: London, UK
Posts: 324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortunately, no The thing is, it pulls the <BODY> tag through ok, everything except for $header and $footer...??

This is the full content of my file:

PHP Code:
<?php
error_reporting
(7);

$templatesused='metaltours_quickgigs, metaltours_quickgigbits';

chdir('/usr/mahke/public_html/forum/');

require(
'global.php');

$style=$DB_site->query_first("SELECT templatesetid,replacementsetid FROM style WHERE styleid='6'");
//get template set and replacement set details
$templatesetid=$style['templatesetid'];
$replacementsetid=$style['replacementsetid'];


// BY MARK get latest gigs

$events $DB_site->query("SELECT eventid, DATE_FORMAT(eventdate,'%M %d') AS gigdate, eventdate, event, subject, location, country FROM calendar_events WHERE public='1' AND eventdate >= '".vbdate('Y-m-d',time())."' ORDER BY eventdate LIMIT 25");


while (
$gig $DB_site->fetch_array($events) and ++$bgcounter) {
 
$bgcolor iif($bgcounter%2==0'{firstaltcolor}''{secondaltcolor}');
 
$gigid $gig['eventid'];
 
$gigdate $gig['gigdate'];
 
$giginfo $gig['event'];
 
$gigband "<a href=$bburl/shows.php?s=&action=getinfo&eventid=" $gig['eventid'] . ">" .
 
$gig['subject'] . "</a>";
 
$gigcity $gig['location'];
 
$gigcountry $gig['country'];
 eval(
"\$gigbits .= \"".gettemplate("metaltours_quickgigbits")."\";");
}

eval(
"\$nextgigs = \"".gettemplate("metaltours_quickgigs")."\";");


// BY MARK end latest gigs

eval("dooutput(\"".gettemplate('metaltourshome')."\");");

?>
The result is http://www.ultimatemetal.com/metaltours/
Reply With Quote
  #7  
Old 04-24-2002, 09:59 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll need to eval() the header/footer/headinclude again since it's a different template now.
Code:
eval('$header = "'.gettemplate('header').'";');
And so on for the mentioned templates. But you this might not work because it will pull the cached version fo the template, which isn't the right one. Hmm... then before doing that put:
Code:
unset($templatecache['header']);
And it should work.
Reply With Quote
  #8  
Old 04-24-2002, 10:20 AM
MarkB's Avatar
MarkB MarkB is offline
 
Join Date: Oct 2001
Location: London, UK
Posts: 324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once again you assert your legendary status. Thankyou, sir.
Reply With Quote
Reply

Thread Tools

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 06:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08545 seconds
  • Memory Usage 2,280KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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