The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Alright, let me give a little background info before everyone notices my lack of intelligence. I have a decent amount of programming experience (at least enough to be able to read much of anything and write a good bit). However, I'm new to plugins, in fact, I'm new to many coding aspects of vBulletin, but I've been able to edit templates on my own and fix things up for sometime. With the help of a person over at vBulletin.com, I was able to make my first plugin to add advert content into the Ad Location templates automatically.
Now I'm trying to make a plugin to automatically use a gender modification. I'm using the hook parse_templates: PHP Code:
|
#2
|
|||
|
|||
![]()
You can't use PHP in templates. You must do all PHP in plugins.
|
#3
|
||||
|
||||
![]() Quote:
You are trying to insert template conditionals into a cached template - the cached versions are not the same as the raw versions - they are compiled into php code so you cannot do the replacements you are trying to do. |
#4
|
|||
|
|||
![]()
Thanks Paul! But I don't know what else to do. I'm just trying to replace it with what the modification requires:
Quote:
|
#5
|
||||
|
||||
![]()
You cannot do that on the fly easily, you will either need to manually edit the template, or find a suitable template hook.
|
#6
|
|||
|
|||
![]()
Okay, I see. Is there anyway I can edit the raw versions of the templates through plugins?
--------------- Added [DATE]1212182629[/DATE] at [TIME]1212182629[/TIME] --------------- Oh wait, can't I use something like this in the plugin code? PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|