![]() |
How to create custom template ?
1 Attachment(s)
Hi all !
I'm trying to create a new navigation bar, based on the existing one, but with fewer infos inside, so I can put it at the end of the subjects list in thread view. So, I've created a "new template", assigned it a name : "mybar", and simply copied the content of the existing "navbar" code inside, to test that it can work. Sadly enough, it doesn't work :( I've added $mybar in the SHOWTHREAD default template where I want it to appear but nothing appears. If I add $navbar or a string like "my stuff" then it works, but if I use $mybar it doesn't. I think something is missing somewhere, as I can see this Quote:
So my question is : how or where should I put this php code ? or what am I doing wrong ? I have successfully made other modifications, like adding a "go top" bar under member icon (in messages list), but it seems that all my "custom" stuff is not seen or isn't used :( Thanks in advance for any tip. |
You would create a new plugin on a location that gets called by the page you want your template to appear with something like the following:
PHP Code:
|
1 Attachment(s)
Thx a lot, Marco ;)
Now it works (see attachment). As I'm beginning with vB, I had to try the hard way to find the right location to "link" my template : showthread_complete (it may not be the best one, though). This little thing is quite useful for going way back when reading long threads, along with the "Go Top" link just under the IP icon. Thx again for your help ! |
Yes it can be difficult to find the right hook location. The best (because you learn the most) way to find out is to read the source of the php-file of the page where you want your plugin to be active. Alternative would be to use a small modification (posted by me in the Tutorial section) that will make all called locations on a pge show in teh bottom when running in debug mode.
|
All times are GMT. The time now is 10:17 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|