Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

Hook Question

Aloittaja The Wizard, helmikuu 16, 2014, 10:41:46 IP

« edellinen - seuraava »

The Wizard

Hello:

I was wondering if I need to have the
'integrate_admin_include' => '$sourcedir/Subs-Toy_Shophooks.php',
Twice like I wrote it below OR can I remove it and just keep the     
'integrate_admin_areas' => 'toy_shop_admin_areas_sub_hooks',
???

Wanted to ask before I try this

thanks

Wiz


$hooks = array(
'integrate_pre_include' => '$sourcedir/Subs-Toy_Shophooks.php',
'integrate_actions' => 'toy_shop_add_hook',
'integrate_admin_include' => '$sourcedir/Subs-Toy_Shophooks.php',
'integrate_admin_areas' => 'toy_shop_admin_areas',
  'integrate_admin_include' => '$sourcedir/Subs-Toy_Shophooks.php',
'integrate_admin_areas' => 'toy_shop_admin_areas_sub_hooks',
);

foreach ($hooks as $hook => $function)
add_integration_function($hook, $function, true);

margarett

You just need once. In fact, you don't get an error regarding duplicate functions because SMF uses a require_once to load the pointed file ;)

// Any files to include for administration?
if (!empty($modSettings['integrate_admin_include']))
{

..................................

require_once($include);
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

LainaaOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

The Wizard

Thanks for the answer margarett I thought that was the case, but i wanted to be sure.

Wiz 8)


Advertisement: