// RECUPERATION des mods déjà installés et NON installés // $sql = 'SELECT id_mod, nom FROM ' . AREABB_MODS . ' ORDER BY nom ASC'; if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Impossible d'afficher la liste des blocs", '', __LINE__, __FILE__, $sql); } $listes_mods = array(); $liste_id = array(); while ($row = $db->sql_fetchrow($result)) { $listes_mods[] = $row['nom']; $liste_id[$row['nom']] = $row['id_mod']; } $plugins->getPlugins(true); $plugins_list = $plugins->getPluginsList(); // -------------------------------------------------------------------------------------------- // AFFiCHAGE // $template->set_filenames(array('body' => 'admin/areabb_mods.tpl')); foreach ($plugins_list as $k => $v) { $titre = !empty($v['label']) ? $v['label'] : $v['nom']; if (file_exists(CHEMIN_MODS . $k . '/logo.png')) { $image = CHEMIN_MODS . $k . '/logo.png'; } $template->assign_block_vars('mods', array('ID' => $k, 'TITRE' => $titre, 'IMAGE' => $image, 'DESC' => $v['description'], 'AUTEUR' => $v['auteur'], 'VERSION' => $v['version'], 'SUPPRIMER' => append_sid('admin_areabb_mods.php?action=supprime&titre=' . $k . '&id_mod=' . $liste_id[$k]), 'INSTALLER' => append_sid('admin_areabb_mods.php?action=install&titre=' . $k . '&page=' . $v['page']), 'PACKAGER' => append_sid('admin_areabb_mods.php?action=package&titre=' . $k . '&version=' . $v['version']), 'TELECHARGER' => $phpbb_root_path . 'areabb/dl.php?extension=' . $liste_id[$k])); // mod déjà installé ? if (in_array($k, $listes_mods)) { // Lien pour le supprimer $template->assign_block_vars("mods.supprimer", array()); } else {
# along with DotClear; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ***** END LICENSE BLOCK ***** # # Contributors : # - Olivier Meunier # require dirname(__FILE__) . '/lib.php'; $err = ''; $tool_url = 'tools.php?p=packager'; # Liste des thèmes $themes_root = dirname(__FILE__) . '/../../../themes'; $themes = new plugins($themes_root, 'theme'); $themes->getPlugins(false); $themes_list = $themes->getPluginsList(); $plugins_root = dirname(__FILE__) . '/..'; $plugins = new plugins($plugins_root); $plugins->getPlugins(false); $plugins_list = $plugins->getPLuginsList(); # Préparation des tableaux pour les combo $t_list = $p_list = array(); foreach ($themes_list as $k => $v) { $t_list[$v['label'] . ' - ' . __('version') . ' ' . $v['version']] = $k; } foreach ($plugins_list as $k => $v) { $p_list[$v['label'] . ' - ' . __('version') . ' ' . $v['version']] = $k; } # Téléchargement ou sauvegarde d'un plugin if (!empty($_POST['p_plugin'])) { $fname = 'plugin-' . $_POST['p_plugin'];