I still cannot figure out how in the heck to work this new template system.
Code:
eval('$awarduserslist .= ", ' . fetch_template('awards_awardusers_bit') . '";'); However Code:
$displayTemplate = vB_Template::create('awards_awardusers_bit'); |
Thanks for this guide, at the beginning I was totally confused about this new system.
On the other hand, is there a system to preregister a var in all templates with a single call? |
Thanks for the guide :)
|
Quote:
Absolutly a great introduction how things now working on VB4. It answere`s many questions to me now. I just wanne thank you cellarius for this. btw. many thanks to Lynne who also allways help out. i`m absolutly new to stuff like "vb" or "php" but with your "helping hand`s" alot of work is possible to do for me too. Sorry about my englisch, its not "my one" :) Thanks again an enjoy the hollydays ...... if there some ........ |
I have question:
How to change content of existing template inside of plugin? I'm remaking my mod for vB4. I'm adding there flags to header of footer. In vB3 version I simply change insides of template using templatecache. I.e.: PHP Code:
How to change this line of code to make it working in vB4? EDIT: Ok - I already found it here :) Now check if its working :P --------------- Added [DATE]1262746169[/DATE] at [TIME]1262746169[/TIME] --------------- Other question: In vB3 my mod have possibility to put additional data in custom place - so user just manually adds variable into required template and he has flags where he put it. How to do this in vB4 where variables have to be preregistered????... --------------- Added [DATE]1262746545[/DATE] at [TIME]1262746545[/TIME] --------------- Quote:
Also this solution is working on already parsed template - I need fresh one, not parsed yet. Anyone have idea how to do that? EDIT Ok I have it :) need to use hook parse_templates |
Awesome guide. It has helped me move forward a bit, but I still don't have it all down yet. If anyone has this down pat, I'd be interested in some more tutorials that show old 3.x code and then below shows the 4.x code. This way I can test myself and see how well I have it down.
In the meantime though, is the new rendering needed for redirects? For example: Code:
$vbulletin->url = "misc.php?do=editform&fid=$fid"; Code:
$templater = vB_Template::create('redirect_insertform'); |
No, standard redirects and errors still work the old way. If you want to know something like that, just look one up in the original vB4 php files.
|
I have a template that I need to insert into multiple pre-existing templates (I add some additional graphics/formatting to the header and footer of most tables ... and my CSS skills aren't good enough to achieve what I'm trying to do through CSS alone, so I need to add old HTML table coding). I do it this way so that if I want to make changes, I don't have to change lots of different templates. After a bit of struggling, I have managed to get the following code running.
Code:
$templater = vB_Template::create('layout_start'); I have two questions. Is there any way to preRegister for more than one pre-existing template (or a global registration), or do I have to create Plugins for every page I want to add this to (*groan*)? And what is the best hook to have this on. I am currently using 'parse_templates'. The other unusual thing I'm finding happening is if I include my template in postbit_legacy, it will show on the first post, but not on the posts after that. Thanks in advance... |
Quote:
Code:
$templater = vB_Template::create('layout_start'); Code:
$templater = vB_Template::create('layout_start'); Quote:
|
...
|
All times are GMT. The time now is 11:18 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|