Log in

View Full Version : how do i use a vB template on a non VB page


glo
11-24-2002, 10:49 AM
I am trying to use some vb templates on a non vb page.

For example i want to use the vBulletin "lostpw" template without the vbulletin header whilst it is on the non VB page.

I would like to do the same for "Edit Profile" template and for "private messages", but i am not sure what is the template name. I am wanting the messages section from "Show Messages From" down to the last message.

Thanks in advanced.

Xenon
11-24-2002, 01:20 PM
well, you have included global.php in your non-vb-file?

then add after that: $header="";
$footer=""

after that you can use the gettemplate and eval things as you'd use in on a vb page, just header and footer would be gone :)

glo
11-24-2002, 04:49 PM
Thanks XENON,

Would any one happen to know what are the vB templates for the "editprofile" and "private messages" template?

Thanks

Xenon
11-24-2002, 06:52 PM
the first is modifyprofile
the second i think privfolder

there is a vboption to add templatenames in comments to the site, perhaps you should enable this, could help with finding the right names ;)

glo
11-25-2002, 12:49 AM
Thanks again,

My apologies for my questions but i am trying to learn as much as i can.

How do i use the use the gettemplate and eval things ???

Xenon
11-25-2002, 02:15 PM
best way is to look into the code of vb, so you'll learn fastest way ;)

for outputing a template:
eval("dooutput(\"".gettemplate("templatenamehere")."\");");

Dean C
11-25-2002, 05:47 PM
Make sure you add that 'templatename' template to the nearest $templatesused variable so as to not add an extra query to your page :)

- miSt

glo
11-25-2002, 09:12 PM
Thanks Xenon, I have been looking into the vB code from the template section but that does not show me how to output the template, and i dont think that i can simply voew the source code from a displayed vB page as it only shows the html properties and not the php info.

Thanks Mist, from what Xenon has passed on, i cant see how to integrate your template used variable in what Xenon has written.

Xenon
11-26-2002, 06:38 PM
open for example index.php and you'll see how the templates are used ;)

there you can also see what Mist meant by $templatesused

Dean C
11-27-2002, 05:12 PM
Hehe everyone forgets the $templatesused variable hehe

- miSt

glo
11-29-2002, 09:09 PM
If each template has its own link then the templates used function would not be needed? Is this correct?

Ie. the login link will open up the login template
and the forgot password will open up the "lostpword" template etc etc hence they dont need to be interlinked like index.php

Please advise if i have the right idea about this stuff?

glo
11-29-2002, 10:42 PM
i have tried for weeks to get this to work and i cant get my head around it!

Where can i go to get some help?

If anyone can help with how to write the first code, i will then hopefully be able to nut out the other code on my own!

PLEASE HELP

glo
12-01-2002, 08:09 PM
could some one please set a sample? so that i can understand what needs to be done?