![]() |
Using adminincludes in misc.php
This is misc_start plugin is not working. How can I include adminfunctions_ within misc.php?
Quote:
Code:
if ( $_REQUEST['do'] == 'test') |
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 |
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). |
Thank you both!
It works now with Code:
require_once(DIR . '/includes/adminfunctions.php'); Quote:
|
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).
|
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)?
|
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. |
Thanks to you, my new forum statistics product is online :)
|
All times are GMT. The time now is 01:06 AM. |
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:
|