The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
This is misc_start plugin is not working. How can I include adminfunctions_ within misc.php?
Quote:
Code:
if ( $_REQUEST['do'] == 'test') { require_once(DIR . '/includes/adminfunctions_stats.php'); print_cp_header($vbphrase['statistics']); } |
#2
|
|||
|
|||
![]()
You don't need to include global.php in a plugin.
The print_cp_XXXX functions are designed to be used inside the AdminCP, not on front-end scripts. If you need to include any admin functions, then you will need to include (at least) adminfunctions.php |
#3
|
|||
|
|||
![]()
adminfunctions_xxxx.php files are for usage in the AdminCP/ModCP files.
functions_xxxxx.php files are for usage in the normal root files. (You should be using templates when creating a "normal" page). |
#4
|
||||
|
||||
![]()
Thank you both!
It works now with Code:
require_once(DIR . '/includes/adminfunctions.php'); |
#5
|
|||
|
|||
![]()
In misc.php you should be using templates though. Using other admin functions is fine but you shouldn't use the print_* functions that are defined in adminfunctions(_xxx).php files. Notice that other pages like "showthread.php", "forumdisplay.php" use print_* functions, they use templates (even for forms).
|
#6
|
||||
|
||||
![]()
I understand that but I need these built-in functions. And I do not want to copy and paste existing functions just to get rid of print_* functions. Could I not integrate these echo functions (I asked about that in my other thread)?
|
#7
|
|||
|
|||
![]()
Why exactly do you need them? (Why can't you make them using templates? Which functions do you want to use?)
May be worth reading: [How-To] vBulletin API Basics: Creating Custom Pages & Misc. if you haven't already done so. |
#8
|
||||
|
||||
![]()
Thanks to you, my new forum statistics product is online
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|