The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Pulling Templates
I am developing a File Sharing system, which after it's done, I would like to release it here. I have only one problem, vbulletin template based system. I need a way to retrieve the header, headinclude, and footer. I started doing it my way, which was this.
I'd search the table user for the persons username, and then check out what their default style was. After that, I did a search in the table template with the conditions being styleid, and searching for the specific template I wanted (eg navbar). Once I did that, I saw that I would need to search the phrase table in order to replace things like, $vbphrase[members_list]. I think I could eventually get it to work right, but I think it would be a heck of a lot of code, and querying. I'm hoping someone could show me a easier way in retrieving templates. So if someone wouldn't mind taking me under the wing, I'd really appreciate it. p.s. I'll give recognition to who ever helps me when I release the File Sharing system Thank you, Osterling. |
#2
|
|||
|
|||
I'm still a bit of a coding rookie but using:
PHP Code:
Source: https://vborg.vbsupport.ru/showthread.php?t=98009 |
#3
|
|||
|
|||
Thank you, that got line of code got me a bit further but still having problems. It displays the header, but it doesn't display the navbar or footer. It is almost like it stops loading after that line.
PHP Code:
|
#4
|
|||
|
|||
Look at the source link I provided in the first post. If you follow it through it should show you how to use templates to create custom vBulletin pages.
|
#5
|
|||
|
|||
I did check it out. Though the page I am creating, I don't want to call it from the template system, instead call it from a flat file using PHP. So I want to display the Header, Navbar, then have it load my file, followed by the footer.
For some reason, it just stops loading after PHP Code:
I did check it out. Though the page I am creating, I don't want to call it from the template system, instead call it from a flat file using PHP. So I want to display the Header, Navbar, then have it load my file, followed by the footer. For some reason, it just stops loading after PHP Code:
|
#6
|
|||
|
|||
Try to change the print_output to just print then as the print_output stops the execution. Also I don't think you need the echo function at the start.
|
#7
|
||||
|
||||
Take a look at the article about creating vBulletin-powered pages.
|
#8
|
||||
|
||||
Here's your general problem:
PHP Code:
PHP Code:
Prior to including global.php, be sure to populate an array of all the templates you plan to use and name it $globaltemplates, so vBulletin can cache them for you. (Do read that tutorial) |
#9
|
|||
|
|||
I subscribe to this thread .. I am exactly in the same position and I have the exact same reason why I need header, footer etc.
|
#10
|
||||
|
||||
Did you read the replies to the thread?
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|