![]() |
How do i call dooutput() from files within admin directory?
I'm writing a hack based on a modified /admin/user.php that tracks an association's financial members details in a separate table of the vb database.
I am trying to call PHP Code:
If I put that code in another php file in /forums and call that file, it works well, but if I just include the above code in my main program (in forums/admin/) I get a blank screen. grrr This seems like an "include" or a path issue but I can work it out. Any suggestions? (I have the following code at the start of my program) PHP Code:
|
The admin CP is not designed to use templates. You might have to use an iframe.
|
what's an iframe?
can't I just define doutput() somewhere else? Or is using templates in the admin area a security risk? |
PHP doesn't let you override functions, so you can't redefine it.
An iframe is a frame not bound to any sides of a window. Search around. |
dooutput works in adminfiles as well, but as filburt said the gettemplate function makes problems, because it doesn't know which styleid to use and so on..
|
Hi Stefan
So, could I just define a modified gettemplate() function maybe (using another function name in my program file!) that would work? I had a close look at gettemplate() in functions.php but it doesn't seem to reference anything like styleid - maybe I don't understand how that works? Is there any security risk in calling templates from within the admin area? |
No there is no risk im aware of, but it will be alot of stuff to work around to use them. If i where you i would just use echo and some html to display the message in the admin cp.
|
Well I think I did it with the following hacked function. I used a sculptor's technique ... removed bits of code until it worked.
PHP Code:
|
Quote:
Basicly any template called in the file that is not in this line will add a query. however sometimes its better not to add a template here if it wont be used 90% of the time because it adds a bit of overhead. |
the templatecache is irrelevant on adminfiles, because no templates are called normally.
just the templatesetid has to be specified, or you'd always get the original templates and not your modified ones. |
All times are GMT. The time now is 07:59 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|