subzeros Posted August 10, 2016 Share Posted August 10, 2016 Hello I integrate my WHMCS template everything went well. I have wanted to create a module from the admin manage links menus, links social networks etc ... that are recorded in my database. In the administration against everything works but how to retrieve variables in my header.tpl? Here are my files create the module: <?php /* WHMCS Wizard Panel with GNU/GPL Licence * AktuelHost - http://www.doctor-pc.fr * * Developed at Doctor PC (www.doctor-pc.fr) * */ if (!defined("WHMCS")) die("This file cannot be accessed directly"); function wizardpanel_config() { $configarray = array( "name" => "Wizard panel", "description" => "description", "version" => "1", "author" => "my author", "language" => "english" ); return $configarray; } function wizardpanel_activate() { $query = "CREATE TABLE IF NOT EXISTS `mod_wizardpanelsettings` (`id` INT(11) NOT NULL AUTO_INCREMENT, `favicon` varchar(75) NOT NULL, `active_facebook` INT(1) NOT NULL DEFAULT '1', `url_facebook` varchar(75) NOT NULL, `active_twitter` INT(1) NOT NULL DEFAULT '1', `url_twitter` varchar(75) NOT NULL, `active_youtube` INT(1) NOT NULL DEFAULT '1', `url_youtube` varchar(75) NOT NULL, `active_googleplus` INT(1) NOT NULL DEFAULT '1', `url_googleplus` varchar(75) NOT NULL, `active_linekedin` INT(1) NOT NULL DEFAULT '1', `url_linekedin` varchar(75) NOT NULL, `active_livechat` INT(1) NOT NULL DEFAULT '0', `active_langage` INT(1) NOT NULL DEFAULT '0' PRIMARY KEY (`id`));"; $result = mysql_query($query); $query = "INSERT INTO `mod_wizardpanelsettings` (`id`, `favicon`, `active_facebook`, `url_facebook`, `active_twitter`, `url_twitter`, `active_youtube`, `url_youtube`, `active_googleplus`, `url_googleplus`, `active_linekedin`, `url_linekedin`, `active_livechat`, `active_langage`) VALUES ('', '', '1', '', '1', '', '1', '', '1', '', '1', '', '0', '0');"; mysql_query($query); # Return Result return array('status' => 'success', 'description' => ''); } /* Désactivation du module */ function wizardpanel_deactivate() { # Supprime la table de configuration du module $query = "DROP TABLE `mod_wizardpanelsettings`"; $result = mysql_query($query); # Return Result return array('status' => 'success', 'description' => ''); } function wizardpanel_upgrade($vars) { $version = $vars['version']; switch ($version) { case "1": break; } } function wizardpanel_clientarea($vars) { $modulelink = $vars['modulelink']; $version = $vars['version']; $LANG = $vars['_lang']; # Inclus la classe et l'initialise require_once("class_settings.php"); $class = new WizardPanel(); return array( /*'pagetitle' => 'Addon Module', 'breadcrumb' => array('index.php?m=demo'=>'Demo Addon'),*/ 'templatefile' => 'header', 'requirelogin' => false, 'forcessl' => false, 'vars' => array( 'favicon' => $settings['favicon'], ), ); } ?> Thank you 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.