Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // /social-profile/resources/modules.php
- if (!defined('SMF'))
- die('Hacking attempt...');
- function loadModule($module = array())
- {
- // No module?
- if (empty($module) || !is_array($module))
- fatal_error('Sorry, the intended module could not be loaded properly.', false); # !! Change to fatal_lang_error(); eventually.
- // The Controller.
- global $sourcedir;
- if (file_exists($sourcedir . '/social-profile/modules/' . $module['identifier'] . '.php') === true)
- require_once($sourcedir . '/social-profile/modules/' . $module['identifier'] . '.php');
- else
- fatal_error('Sorry, the intended module controller could not be found.', false); # !! Change to fatal_lang_error(); eventually.
- echo '<pre>', var_dump( $module), '</pre>';
- }
Add Comment
Please, Sign In to add comment