Log in

View Full Version : Including templates in an external file.


Dark_Konoko
09-26-2006, 11:51 AM
I apologise in advance as I'm sure this question crops up every other day, but for some reason I can't seem to find a clear answer to it when searching the forums.

I'd like to be able to include my forum templates in an external page. I am aware that if I include global.php I am able to do simple things like exclude user groups from viewing content but how do I go about including vB templates (including the stylesheet?)

Thank you for your time.

Dark_Konoko
09-29-2006, 03:57 PM
No one seems to want to reply here... would this be an acceptable question for vBulletin.com or is it too mod/hack-ish?

ZacUSNYR
09-29-2006, 04:24 PM
You should be able to get the template by caching it ($globaltemplates array). As far as the CSS - include global.php and that'll include the header (css is called in headinclude)

Dark_Konoko
09-29-2006, 08:10 PM
I'm afraid I don't follow - Could you possibly go into more detail? I've require_once global.php to no effect.

Dark_Konoko
10-04-2006, 09:00 AM
I've managed to find the answer on these forums via google (you'd think the internal search would have yielded the same results, but no)

https://vborg.vbsupport.ru/showthread.php?t=62164

A big thank you to Gary King for the original post! Also thank you to ZacUSNYR as I see what he means now by viewing Gary's code.

ZacUSNYR
10-04-2006, 06:31 PM
Sorry I didn't get back to this thread sooner. I never subscribe to stuff and forget what I reply too lol.

Glad you were able to find the answer - all the info is on this forum, but as you mentioned the internal search is kind of weak :)