The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
OK, I was just testing it out on forumhome. I don't really know how hook locations work, but I knew forumhome_start would work for my template in forumhome (I thought so).
The following code, though, works. PHP Code:
My plugin with hook location forumhome_start: PHP Code:
Code:
<vb:if condition="$hourofday==19">stuff to do here</vb:if> What I'm really trying to do is change the background (CSS) depending on the time of day. There might be an easier way than the templates... I just don't exactly understand how plugins work because I'm still new to vB. |
#12
|
|||
|
|||
Did you register $hourofday?
$templater->register('hourofday', $hourofday); |
#13
|
||||
|
||||
Doesn't he have to make that global since he is not rendering any templates?
Jeremy8, Take a look at this hack and it will give you an idea of how to do what you are wanting to do. https://vborg.vbsupport.ru/showthread.php?t=244519 |
#14
|
|||
|
|||
His question specifically is that when the uses "his" template, the var don't work. The first example was to prove his logic where he tagged it to an existing template hook var.
So where I see the problem is in rendering his template and registering his vars. |
#15
|
||||
|
||||
Ok, I must have misunderstood. I thought he was just adding it to an already rendered template. I'll let you handle it then, sir.
|
#16
|
|||
|
|||
No problem I read that post twice last night, didn't reply, then read it again a few times before I answered again this morning. I even mocked up some code to make sure I made sense. But if we get him going, we'll have done good.
|
#17
|
|||
|
|||
Well I think I have not been so clear about what I'm trying to do lol.
I was really just testing the time stuff out with that code I posted in my previous post. So let me say what I'm really trying to do, and then you could maybe put me in the right direction. Because I don't really know what approach to take. Plugins? Templates? CSS? Xml thingies... lol idk. Anyway, what I'm trying to do is have the background of one of my styles change according to the time (hour of day). Do I make a plugin at one of the CSS hook locations? I don't know... edit: I've moved on to this topic: https://vborg.vbsupport.ru/showthread.php?t=244834 Thanks for the info. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|