how to render avatar to custom page??
any idea? |
I am trying to update a field I added to the thread table from a set of plugins that will be called whenever a post is edited or a new thread created. There is nothing to display. If the current post contains an image or an attachment, I want to copy the postid to my new field.
I think I need to preregister the node in the $thread array, but I am not sure how to do that. Can I freely reference an existing array in the preregister method? Here is the code I have now. The commented line is what I would expect the eventual sql statement to be. Code:
if (!$thread['thumbpostid']) //there is no thumbpost defined |
I'm currently working on an old vb addon to make it compatible to vb4.
Maybe somebody can help me with this following line: PHP Code:
PHP Code:
Thanks in advance. :) |
I think you just need something like this:
PHP Code:
since the eval has been moved in to the vB_Template class. But if the template requires any variables, they now have to be registered. So it's likely you need something like: PHP Code:
|
Thanks for your help.
That was exactly what i was looking for. :) |
I should probably mention just in case, you don't have to register *every* variable because some standard vb ones are automatically registered, like bbuserinfo, style, show, vboptions, etc.
|
I have to admit, this is going a bit beyond my scope of knowledge and I'm a bit lost.
I'm trying to place the same rotating banner ads in 4.2.2 that I currently use in 3.8.7 I've been told I need to register the templates and have been directed to this thread. I am certain the answer is here however I'm not grasping it. I currently run in house advertising via a table in the header that calls to plugins using the PHP random feature like this: In Table in header: Quote:
Quote:
Any help would be appreciated. |
At the end of that plugin, you need to register that variable for use in the header template.
PHP Code:
|
Just so I have this right before trying it and turning my vB install in to Pong game, in the Plug In PHP Code box I add that to the end like this:
PHP Code:
PHP Code:
|
Did you try it? You really should have a test site set up so you can try this stuff before doing it on a live site.
|
All times are GMT. The time now is 08:37 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|