The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi, I was referred here from vbulletin.com.
I created a "new template" in the CP (VB3) and want to link to it in the following way.. My forum home page will have a banner. I want to link that banner to the "new template" User clicks the banner, new template opens (just like with any banner in any other web site). I can't figure out how to make the link work though. Suggestions? (thanks!) |
#2
|
||||
|
||||
![]()
Well, first off, if you want to display any custom template you'll need to parse it. Add the following code to your PHPINCLUDE_START template
PHP Code:
The link to the template in you're header should read HTML Code:
<a href="index.php?do=PAGE">LINK ME</a> PHP Code:
|
#3
|
|||
|
|||
![]()
Thanks for your reply...
[QUOTE=Michael Morris]Well, first off, if you want to display any custom template you'll need to parse it. Add the following code to your PHPINCLUDE_START template PHP Code:
// Example of how to include a seperate file: // ob_start(); // require("yourheader.html"); // $header = ob_get_contents(); // ob_end_clean(); eval('$supermoto_swag = "' . fetch_template('supermoto_swag') . '";'); [QUOTE]Now as to the rest of you're question, I'm not sure I fully understand. Are you wanting to open a page which is defined in that template?? If so, then do this..] Not really sure what you mean. I intend to use the new template as a shopping page. All the page will have on it is the site logo (and maybe forum navigation bar) Below that will be the stuff for sale. Users will see an advertisement on the forum home page that says click here to buy t-shirts etc. They click on the banner and the new template opens (in a new window). The new template has t-shirts and such for sale. When they're done looking at that page, they just close the window and they're back to the forum. If you're on a web site and click on an ad, it takes you to the site that is sponsoring that ad. Mine is the same thing only it takes you to the new template. Hope that makes more sense? |
#4
|
||||
|
||||
![]()
You're confusing the terms "template" and "page"
A "template" is a file in vbulletin that defines how to display an element of the page - from the header to the footer to the navbar or what have you. A "page" is a file that users can access. Most vbulletin pages are dynamically generated using multiple templates. |
#5
|
||||
|
||||
![]()
BTW,
PHP Code:
Commented out code doesn't do anything - you can erase it if you want. |
#6
|
|||
|
|||
![]()
Forgive me for being a total novice here. I was thrown into this...
I guess I'm calling it a template instead of a page because to create it I went to style manager and "add new template" Was creating a template the wrong thing to do? Is there another way to create just a regular page? Should I be doing that? I am just trying to have a page that has stuff for sale which I can link to from a banner ad. (and I'd like to put the forum navigation bar on the page too... thought I could just copy the code) ![]() Thank you. P.S. So, on the PHP code, if I can erase all the // comment stuff, is what I inserted done properly? |
#7
|
||||
|
||||
![]()
First, rename your template. It seems you named it supermoto_swag, right? Rename it to custom_supermoto_swag. Now, link to it using this URL:
http://supermotojunkie.com/misc.php?do=page&template=supermoto_swag |
#8
|
|||
|
|||
![]() Quote:
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|