The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I probably have this written incorrectly, but... how do I get this info, namely the $category name at the end, to be accessible via a template variable?
Like how $forumbits is pulled from a function into the forum templates. PHP Code:
|
#2
|
|||
|
|||
![]()
Probably won't aid your actual problem but I recommend you take a read of vBulletin Code Standards (specifically the bits related to code layout), it will make it easier for others to read/understand your code and also make it easier for you to spot your own problems.
|
#3
|
||||
|
||||
![]()
Edited the indent spacing (I think that's what you meant).
|
#4
|
|||
|
|||
![]()
Where is this code being executed/the function being called. You've just written a function at the moment, it won't do anything until you execute it. You could put it in a Plugin then do something like:
PHP Code:
|
#5
|
||||
|
||||
![]()
Ok. I have it written in an external functions page that I named "atlas_functions.php" and call it through my external index page.
On my external index page, I do have this: PHP Code:
--------------- Added [DATE]1208793301[/DATE] at [TIME]1208793301[/TIME] --------------- What's weird is that the counters thing I posted about in another thread DOES work when called from the same functions page. |
#6
|
|||
|
|||
![]()
Why have you got this line:
PHP Code:
|
#7
|
||||
|
||||
![]()
It was in the original php. Removing it has made no difference.
|
#8
|
|||
|
|||
![]()
Look up what unset() does on php.net.
![]() Hmm its might be a problem with the function itself, have you checked to see if it is even returning anything? (Run a [minicode]var_dump()[/minicode] on it to see if it contains anything). |
#9
|
||||
|
||||
![]()
...ok. Please humor me
![]() Where do I put that var_dump()?? --------------- Added [DATE]1208796733[/DATE] at [TIME]1208796733[/TIME] --------------- Ok. I did this (hope it was right) PHP Code:
string(14) "get_categories" And in the area where the categories are to show up it says: get_categories ...and without the "get_categories" in there, I get this at the top: string(0) "" And in the page area, nothing. --------------- Added [DATE]1208802729[/DATE] at [TIME]1208802729[/TIME] --------------- Ok. I'm gonna start this again from scratch. Gonna have to re-write all. Thanks for the help though! ![]() |
#10
|
|||
|
|||
![]()
I recommend you also refresh yourself on the basics of PHP also you can access documentation and examples of most functions by a quick browse on the PHP site by using: http://www.php.net/function_name where function_name is the the function your looking up. So for example var_dumo() would be http://php.net/var_dump e.t.c.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|