Changeset 9369 for extensions
- Timestamp:
- Feb 24, 2011, 4:45:43 PM (13 years ago)
- Location:
- extensions/PWG_Stuffs
- Files:
-
- 2 added
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PWG_Stuffs/admin/add_module.php
r7855 r9369 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 5 global $template, $conf; 6 7 include_once(STUFFS_PATH . 'include/functions.inc.php'); 8 include_once(STUFFS_PATH . 'admin/functions.inc.php'); 9 load_language('plugin.lang', STUFFS_PATH); 10 11 if (!isset($_GET['type']) or !is_dir(STUFFS_PATH . 'modules/' . $_GET['type'])) 5 if ($page['tab'] == 'add_module') 12 6 { 13 die('Wrong parameters...'); 14 } 15 else 16 { 17 $type = $_GET['type']; 7 if (!isset($_GET['path']) or !isset($modules[$_GET['path']])) 8 { 9 die('Wrong module path.'); 10 } 11 else 12 { 13 $module_path = $_GET['path']; 14 } 18 15 } 19 16 20 // Cas particulier des News 21 if ($type == 'News') include(STUFFS_PATH . 'modules/News/config.inc.php'); 22 23 // Enregistrement du module 17 // Save module 24 18 if (isset($_POST['submit']) and !is_adviser()) 25 19 { 26 include( STUFFS_PATH . 'modules/' . $type . '/config.inc.php');20 include($module_path.'config.inc.php'); 27 21 if (empty($page['errors'])) 28 22 { … … 34 28 { 35 29 $module_name = $_POST['module_name']; 36 $desc = (!empty($_POST['module_desc']) ? '"' . $_POST['module_desc'] . '"' : 'NULL');37 $groups = (!empty($_POST['groups']) ? '"' . implode(',', $_POST['groups']) . '"' : 'NULL');38 $users = (!empty($_POST['users']) ? '"' . implode(',', $_POST['users']) . '"' : 'NULL');30 $desc = !empty($_POST['module_desc']) ? '"' . $_POST['module_desc'] . '"' : 'NULL'; 31 $groups = !empty($_POST['groups']) ? '"' . implode(',', $_POST['groups']) . '"' : 'NULL'; 32 $users = !empty($_POST['users']) ? '"' . implode(',', $_POST['users']) . '"' : 'NULL'; 39 33 $show_title = isset($_POST['show_title']) ? '"true"' : '"false"'; 40 34 $on_home = isset($_POST['on_home']) ? '"true"' : '"false"'; … … 42 36 $on_picture = isset($_POST['on_picture']) ? '"true"' : '"false"'; 43 37 44 38 $sav_datas = (!empty($datas) ? '"' . addslashes(serialize($datas)) . '"' : 'NULL'); 45 39 46 40 if (isset($_GET['edit'])) 47 { 41 { 48 42 pwg_query(' 49 43 UPDATE ' . STUFFS_TABLE . ' 50 44 SET name ="' . $module_name . '", 51 descr=' . $desc . ', 52 type="' . $type . '", 53 datas=' . $sav_datas . ', 54 users=' . $users . ', 55 groups=' . $groups . ', 45 descr=' . $desc . ', 46 datas=' . $sav_datas . ', 47 users=' . $users . ', 48 groups=' . $groups . ', 56 49 show_title=' . $show_title .', 57 50 on_home=' . $on_home .', … … 59 52 on_picture='. $on_picture . ' 60 53 WHERE id = ' . $_GET['edit'] . ';'); 54 if (isset($_GET['redirect'])) 55 { 56 redirect(urldecode($_GET['redirect'])); 57 } 61 58 } 62 59 else … … 69 66 70 67 $query = ' 71 INSERT INTO ' . STUFFS_TABLE . ' ( id, pos, name, descr, type, datas, users, groups, show_title, on_home, on_cats, on_picture, id_line, width )68 INSERT INTO ' . STUFFS_TABLE . ' ( id, pos, name, descr, path, parent, datas, users, groups, show_title, on_home, on_cats, on_picture, id_line, width ) 72 69 VALUES (' . $next_element_id . ' , 73 ' . $pos . ', 74 "' . $module_name . '", 75 ' . $desc . ', 76 "' . $type . '", 77 ' . $sav_datas . ', 78 ' . $users . ', 79 ' . $groups . ', 70 ' . $pos . ', 71 "' . $module_name . '", 72 ' . $desc . ', 73 "' . $module_path . '", 74 ' . (isset($modules[$module_path]['parent']) ? '"'.$modules[$module_path]['parent'].'"' : 'NULL') .', 75 ' . $sav_datas . ', 76 ' . $users . ', 77 ' . $groups . ', 80 78 ' . $show_title . ', 81 79 ' . $on_home . ', … … 86 84 pwg_query($query); 87 85 } 88 89 86 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php'); 90 87 } … … 92 89 } 93 90 94 // Récupération des données du module 95 if (isset($_GET['edit'])) 96 { 97 $q = ('SELECT * FROM ' . STUFFS_TABLE . ' WHERE id = ' . $_GET['edit'] . ';'); 98 $module = mysql_fetch_array(pwg_query($q)); 99 100 $module['users'] = explode(',', $module['users']); 101 $module['groups'] = explode(',', $module['groups']); 102 103 $datas = (!empty($module['datas']) ? unserialize($module['datas']) : false); 104 105 $template->assign(array( 106 'STUFFS_TITLE' => l10n('stuffs_edit_mod') . ' <i>' . trigger_event('render_stuffs_name', $module['name']) . '</i>', 107 'MODULE_NAME' => $module['name'], 108 'DESC_VALUE' => (isset($module['descr']) ? $module['descr'] : ''), 109 'show_title_CHECKED' => ($module['show_title'] == 'true' ? 'checked="checked"' : ''), 110 'on_home_CHECKED' => ($module['on_home'] == 'true' ? 'checked="checked"' : ''), 111 'on_cats_CHECKED' => ($module['on_cats'] == 'true' ? 'checked="checked"' : ''), 112 'on_picture_CHECKED' => ($module['on_picture'] == 'true' ? 'checked="checked"' : ''))); 113 } 114 else 91 // Default module data 92 if ($page['tab'] == 'add_module') 115 93 { 116 94 $module['users'] = array('guest', 'generic', 'normal', 'admin', 'webmaster'); … … 118 96 $template->assign(array( 119 97 'STUFFS_TITLE' => l10n('stuffs_add_mod'), 120 'MODULE_NAME' => l10n('module_name_' . strtolower($type)),98 'MODULE_NAME' => $modules[$module_path]['name'], 121 99 'show_title_CHECKED' => 'checked="checked"', 122 100 'on_home_CHECKED' => 'checked="checked"')); 123 101 } 124 102 125 // Selection des utilisateurs103 // Users perm 126 104 $template->assign('user_perm', array( 127 105 'GUEST' => (in_array('guest', $module['users']) ? 'checked="checked"' : ''), … … 131 109 'WEBMASTER' => (in_array('webmaster', $module['users']) ? 'checked="checked"' : ''))); 132 110 133 // Selection des groupes111 // Groups perm 134 112 $groups = get_all_groups(); 135 113 if (!empty($groups)) … … 138 116 } 139 117 140 // Configuration du module141 include_once( STUFFS_PATH . 'modules/' . $type . '/config.inc.php');118 // Module configuration 119 include_once($module_path.'config.inc.php'); 142 120 143 121 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/template/add_module.tpl')); -
extensions/PWG_Stuffs/admin/admin.php
r3609 r9369 14 14 // | Tabsheet 15 15 // +-----------------------------------------------------------------------+ 16 if (!isset($_GET['tab'])) 17 $page['tab'] = 'manage'; 18 else 19 $page['tab'] = $_GET['tab']; 16 $page['tab'] = isset($_GET['tab']) ? $_GET['tab'] : 'manage'; 20 17 21 18 $tabsheet = new tabsheet(); 22 $tabsheet->add('manage', 23 l10n('stuffs_mods_management'), 24 $my_base_url.'&tab=manage'); 25 $tabsheet->add('new', 26 l10n('stuffs_add_mod'), 27 $my_base_url.'&tab=new'); 19 $tabsheet->add('manage', l10n('stuffs_mods_management'), $my_base_url.'&tab=manage'); 20 if ($page['tab'] == 'add_module') 21 { 22 $tabsheet->add('add_module', l10n('stuffs_add_mod'), $my_base_url.'&tab=add_module&path='.$_GET['path']); 23 } 24 else 25 { 26 $tabsheet->add('new', l10n('stuffs_add_mod'), $my_base_url.'&tab=new'); 27 } 28 if ($page['tab'] == 'edit_module') 29 { 30 $tabsheet->add('edit_module', l10n('stuffs_edit_mod'), $my_base_url.'&tab=edit_module'); 31 } 28 32 $tabsheet->select($page['tab']); 29 33 $tabsheet->assign(); 30 34 31 //Ajout d'un module 32 if (isset($_POST['addModule']) and !is_adviser()) 35 //Récupération des modules disponibles 36 add_event_handler('get_stuffs_modules', 'get_default_stuffs_modules'); 37 $disp_modules = trigger_event('get_stuffs_modules', array()); 38 uasort($disp_modules, 'name_compare'); 39 40 $modules = array(); 41 foreach($disp_modules as $module) 33 42 { 34 if (!isset($_POST['module'])) 43 $module['path'] = PHPWG_ROOT_PATH.trim($module['path'], './').'/'; 44 45 if (preg_match('#^'.preg_quote(PHPWG_PLUGINS_PATH).'([^/]*?)/#', $module['path'], $match) and $match[1] != 'PWG_Stuffs') 35 46 { 36 array_push($page['errors'], l10n('stuffs_error_no_mod_selected')); 37 } 38 else 39 { 40 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . STUFFS_DIR . '%2Fadmin%2Fadd_module.php&type=' . $_POST['module']); 41 } 47 $module['parent'] = $match[1]; 48 } 49 $modules[$module['path']] = $module; 42 50 } 43 44 //Suppression d'un module45 if (isset($_GET['del']) and !is_adviser())46 {47 pwg_query('DELETE FROM ' . STUFFS_TABLE . ' WHERE id = ' . $_GET['del'] . ' LIMIT 1;');48 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php');49 }50 51 //Récupération des modules disponibles52 $modules = get_stuffs_modules();53 51 54 52 // Include file -
extensions/PWG_Stuffs/admin/functions.inc.php
r6230 r9369 1 1 <?php 2 2 3 function get_ stuffs_modules()3 function get_default_stuffs_modules($modules) 4 4 { 5 $dir = opendir(STUFFS_PATH . 'modules/'); 6 while ($file = readdir($dir)) { 7 if ($file != '.' and $file != '..' and $file != '.svn') { 8 $path = STUFFS_PATH . 'modules/' . $file; 9 if (is_dir($path) and !is_link($path)) { 10 $modules[$file] = array('type' => $file, 11 'name' => l10n('module_name_' . strtolower($file)), 12 'description' => l10n('module_desc_' . strtolower($file))); 13 } 14 } 5 $dir = opendir(STUFFS_PATH . 'modules/'); 6 while ($file = readdir($dir)) 7 { 8 if ($file != '.' and $file != '..' and $file != '.svn') 9 { 10 $path = STUFFS_PATH . 'modules/' . $file; 11 if (is_dir($path) and !is_link($path)) 12 { 13 array_push($modules, array( 14 'path' => $path, 15 'name' => l10n('module_name_' . strtolower($file)), 16 'description' => l10n('module_desc_' . strtolower($file)), 17 ) 18 ); 19 } 15 20 } 16 closedir($dir);17 uasort($modules, 'name_compare');18 21 } 22 closedir($dir); 23 return $modules; 19 24 } 20 25 -
extensions/PWG_Stuffs/admin/manage.php
r7855 r9369 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 5 // Enregistrement de l'ordre 5 global $pwg_loaded_plugins; 6 7 // Delete module 8 if (isset($_GET['del']) and !is_adviser()) 9 { 10 pwg_query('DELETE FROM ' . STUFFS_TABLE . ' WHERE id = ' . $_GET['del'] . ' LIMIT 1;'); 11 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php'); 12 } 13 14 // Save order 6 15 if (isset($_POST['submitOrder']) and !is_adviser()) 7 16 { … … 27 36 } 28 37 29 // Affichage des modules et de leur position30 $q = 'SELECT id, name, descr, type, id_line, width, datas38 // Display 39 $q = 'SELECT id, name, descr, path, parent, id_line, width, datas 31 40 FROM ' . STUFFS_TABLE . ' 32 41 ORDER BY pos ASC;'; … … 34 43 $num = 0; 35 44 $pos = 1; 36 $cat_mod = array('name' => l10n('Categories'), 'type' => '-', 'description' => '');37 45 $id_line_options = array( 38 46 '' => '-', … … 50 58 while ($module = mysql_fetch_assoc($result)) 51 59 { 52 $module['name'] = $module['type'] != 'MainBlock'? $module['name'] : l10n('stuffs_main_block');60 $module['name'] = !empty($module['path']) ? $module['name'] : l10n('stuffs_main_block'); 53 61 54 62 $template->append('modules', array( … … 56 64 'NAME' => trigger_event('render_stuffs_name', $module['name']), 57 65 'DESC' => $module['descr'], 58 ' TYPE' => $module['type'],59 'TYPE_NAME' => (isset($modules[$module[' type']]['name']) ? $modules[$module['type']]['name'] : ''),66 'PATH' => $module['path'], 67 'TYPE_NAME' => (isset($modules[$module['path']]['name']) ? $modules[$module['path']]['name'] : ''), 60 68 'POS' => 10 * $pos++, 61 69 'ID_LINE_OPTIONS' => $id_line_options, 62 70 'ID_LINE_SELECTED' => $module['id_line'], 63 64 65 'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fad d_module.php&type=' . $module['type'] . '&edit=' .$module['id'],71 'WIDTH' => $module['width'], 72 'ID' => $module['id'], 73 'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&tab=edit_module&edit='.$module['id'], 66 74 'U_DELETE' => !is_adviser() ? PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'] : '', 67 )); 75 'MISSING' => (isset($module['parent']) and !isset($pwg_loaded_plugins[$module['parent']])), 76 ) 77 ); 68 78 69 if ( $module['type'] == 'MainBlock'and !empty($module['datas']))79 if (empty($module['path']) and !empty($module['datas'])) 70 80 { 71 81 $datas = unserialize($module['datas']); -
extensions/PWG_Stuffs/admin/new.php
r3609 r9369 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 5 //Ajout d'un module 6 if (isset($_POST['addModule']) and !is_adviser()) 7 { 8 if (!isset($_POST['module'])) 9 { 10 array_push($page['errors'], l10n('stuffs_error_no_mod_selected')); 11 } 12 else 13 { 14 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&tab=add_module&path=' . urlencode($_POST['module'])); 15 } 16 } 17 5 18 // Affichages des modules à ajouter 6 19 foreach($modules as $module) 7 20 { 8 9 'MODULE ' => $module['type'],21 $template->append('add_module', array( 22 'MODULE_PATH' => $module['path'], 10 23 'NAME' => $module['name'], 11 'DESC' => $module['description'])); 24 'DESC' => $module['description'], 25 ) 26 ); 12 27 } 13 28 -
extensions/PWG_Stuffs/admin/template/manage.tpl
r7855 r9369 51 51 52 52 <li class="categoryLi virtual_cat" id="module_{$module.ID}"> 53 {if $module.TYPE != 'MainBlock'}53 {if !empty($module.PATH)} 54 54 <ul class="categoryActions"> 55 55 <li class="stuffs_line"> … … 63 63 <input type="text" size="2" maxlength="2" value="{$module.WIDTH}" name="width[{$module.ID}]" > % 64 64 </li> 65 {if !$module.MISSING} 65 66 <li><a href="{$module.U_EDIT}" title="{'stuffs_edit'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'stuffs_edit'|@translate}"/></a></li> 67 {/if} 66 68 {if !empty($module.U_DELETE) } 67 69 <li><a href="{$module.U_DELETE}" title="{'stuffs_delete'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'stuffs_delete'|@translate}" /></a></li> … … 72 74 <p> 73 75 <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="button drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}"/> 74 <strong>{if $module.TYPE == 'MainBlock'}<span class="MainBlock">{$module.NAME}</span>{else}<a href="{$module.U_EDIT}">{$module.NAME}</a>{/if}</strong>75 {if $module.TYPE != 'MainBlock'} - {$module.TYPE_NAME}{/if}76 <strong>{if empty($module.PATH)}<span class="MainBlock">{$module.NAME}</span>{else}<a href="{$module.U_EDIT}">{$module.NAME}</a>{/if}</strong> 77 {if !empty($module.TYPE_NAME)} - {$module.TYPE_NAME}{/if} 76 78 </p> 77 79 78 {if !empty($module.DESC)} 80 {if $module.MISSING} 81 <p style="margin-left: 30px;">{'stuffs_parent_plugin_is_missing'|@translate}</p> 82 {elseif !empty($module.DESC)} 79 83 <p style="margin-left: 30px;"><i>{$module.DESC}</i></p> 80 {elseif $module.TYPE == 'MainBlock'}84 {elseif empty($module.PATH)} 81 85 <p style="margin-left: 30px;"><input name="hidemb" type="checkbox" {if $HIDEMB}checked="checked"{/if}> {'Hide on home page'|@translate}</p> 82 86 {/if} -
extensions/PWG_Stuffs/admin/template/new.tpl
r3609 r9369 11 11 {foreach from=$add_module item=module} 12 12 <tr> 13 <td><input type="radio" value="{$module.MODULE }" name="module"/>13 <td><input type="radio" value="{$module.MODULE_PATH}" name="module"/> 14 14 <b>{$module.NAME}</b> : {$module.DESC}</td> 15 15 </tr> -
extensions/PWG_Stuffs/include/class.inc.php
r7855 r9369 7 7 var $user_groups = array(); 8 8 var $modules = array(); 9 10 9 var $blocks = array(); 10 var $pos = 'begin'; 11 11 12 12 function stuffs() … … 36 36 37 37 $query = ' 38 SELECT id, name, type, datas, groups, show_title, id_line, width38 SELECT id, name, path, parent, datas, groups, show_title, id_line, width 39 39 FROM ' . STUFFS_TABLE . ' 40 40 WHERE users LIKE "%' . $user['status'] . '%" … … 68 68 function process_modules() 69 69 { 70 global $pwg_loaded_plugins; 71 70 72 foreach ($this->modules as $module) 71 73 { 72 if ($module[' type'] == 'MainBlock')73 { 74 74 if ($module['name'] == 'MainBlock') 75 { 76 $this->pos = 'end'; 75 77 if (!empty($module['datas']) 76 78 and $datas = unserialize($module['datas']) … … 79 81 add_event_handler('loc_end_index', 'hide_main_block'); 80 82 } 81 continue; 82 } 83 if (!empty($module['groups'])) 84 { 85 $authorized_groups = explode(',', $module['groups']); 86 if (array_intersect($this->user_groups, $authorized_groups) == array()) continue; 87 } 88 89 $datas = (!empty($module['datas']) ? unserialize($module['datas']) : false); 83 continue; 84 } 85 if (isset($module['parent']) and !isset($pwg_loaded_plugins[$module['parent']])) 86 { 87 continue; 88 } 89 if (!empty($module['groups'])) 90 { 91 $authorized_groups = explode(',', $module['groups']); 92 if (array_intersect($this->user_groups, $authorized_groups) == array()) continue; 93 } 94 95 $datas = (!empty($module['datas']) ? unserialize($module['datas']) : false); 90 96 $block = array(); 91 97 92 if ((include(STUFFS_PATH . 'modules/' . $module['type'] . '/main.inc.php')) === false) continue; 93 94 $block['ID'] = $module['id']; 95 if ($module['show_title'] == 'true') 96 { 97 $block['TITLE'] = trigger_event('render_stuffs_name', $module['name']); 98 } 99 if (is_admin()) 100 { 101 $block['U_EDIT'] = PHPWG_ROOT_PATH.'admin.php?page=plugin&section='.STUFFS_DIR.'%2Fadmin%2Fadd_module.php&type='.$module['type'].'&edit='.$module['id']; 102 } 103 $block['TEMPLATE'] = 'stuffs_'.strtolower($module['type']).'.tpl'; 104 $this->set_tpl_block($block, $module); 98 include($module['path'].'main.inc.php'); 99 100 if (!empty($block['TEMPLATE'])) 101 { 102 $block['ID'] = $module['id']; 103 if ($module['show_title'] == 'true') 104 { 105 $block['TITLE'] = trigger_event('render_stuffs_name', $module['name']); 106 } 107 if (is_admin()) 108 { 109 $block['U_EDIT'] = PHPWG_ROOT_PATH.'admin.php?page=plugin&section='.STUFFS_DIR.'%2Fadmin%2Fadmin.php&tab=edit_module&edit='.$module['id'].'&redirect='.urlencode(urlencode($_SERVER['REQUEST_URI'])); 110 } 111 $this->set_tpl_block($block, $module); 112 } 105 113 } 106 114 } 107 115 /* Set template blocks */ 108 109 110 116 function set_tpl_block($block, $module) 117 { 118 if (!empty($module['id_line'])) 111 119 { 112 120 $block['id_line'] = $module['id_line']; … … 172 180 $block['end_line'] = true; 173 181 $block['CLASS'] = 'middle_block'; 174 175 182 $this->blocks[$this->pos][] = $block; 183 } 176 184 177 185 static function prefilter_index_css($source, &$smarty) -
extensions/PWG_Stuffs/include/functions.inc.php
r7402 r9369 7 7 function get_user_language_desc($desc) 8 8 { 9 9 global $user; 10 10 11 11 $user_lang = substr($user['language'], 0, 2); 12 12 13 14 15 13 if (!substr_count(strtolower($desc), '[lang=' . $user_lang . ']')) 14 { 15 $user_lang = 'default'; 16 16 } 17 17 18 18 if (substr_count(strtolower($desc), '[lang=' . $user_lang . ']')) 19 19 { 20 20 // la balise avec la langue de l'utilisateur a été trouvée 21 21 $patterns[] = '#(^|\[/lang\])(.*?)(\[lang=(' . $user_lang . '|all)\]|$)#is'; -
extensions/PWG_Stuffs/include/stuffs.inc.php
r5727 r9369 30 30 { 31 31 $template->assign('blocks', $stuffs->blocks['begin']); 32 $template->concat($begin, 32 $template->concat($begin, $template->parse('stuffs', true)); 33 33 } 34 34 if (!empty($stuffs->blocks['end'])) 35 35 { 36 36 $template->assign('blocks', $stuffs->blocks['end']); 37 $template->concat($end, 37 $template->concat($end, $template->parse('stuffs', true)); 38 38 } 39 39 -
extensions/PWG_Stuffs/language/ar_SA/plugin.lang.php
r8677 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'لم تختر اية موديول'; 41 41 $lang['stuffs_no_name'] = 'يجب ان تحدد اسم الموديول'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ -
extensions/PWG_Stuffs/language/cs_CZ/plugin.lang.php
r7340 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Nevybrali jste žádný modul.'; 41 41 $lang['stuffs_no_name'] = 'Musíte zadat název modulu'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ -
extensions/PWG_Stuffs/language/de_DE/plugin.lang.php
r7352 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Sie haben kein Modul ausgewählt.'; 41 41 $lang['stuffs_no_name'] = 'Sie müssen dem Modul einen Titel geben'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ 44 // 45 // Module LastComs 45 46 //------------------------------------------------------------------------------ 46 47 … … 60 61 61 62 //------------------------------------------------------------------------------ 62 // 63 // Module Logon 63 64 //------------------------------------------------------------------------------ 64 65 … … 70 71 71 72 //------------------------------------------------------------------------------ 72 // 73 // Module Personal 73 74 //------------------------------------------------------------------------------ 74 75 … … 80 81 81 82 //------------------------------------------------------------------------------ 82 // 83 // Module Tags 83 84 //------------------------------------------------------------------------------ 84 85 … … 93 94 94 95 //------------------------------------------------------------------------------ 95 // 96 // Module Piclenswall 96 97 //------------------------------------------------------------------------------ 97 98 … … 109 110 110 111 //------------------------------------------------------------------------------ 111 // 112 // Module Most Visited 112 113 //------------------------------------------------------------------------------ 113 114 … … 126 127 127 128 //------------------------------------------------------------------------------ 128 // 129 // Module Best Rated 129 130 //------------------------------------------------------------------------------ 130 131 … … 133 134 134 135 //------------------------------------------------------------------------------ 135 // 136 // Module Recent 136 137 //------------------------------------------------------------------------------ 137 138 … … 140 141 141 142 //------------------------------------------------------------------------------ 142 // 143 // Module Random 143 144 //------------------------------------------------------------------------------ 144 145 … … 147 148 148 149 //------------------------------------------------------------------------------ 149 // 150 // Module Citation 150 151 //------------------------------------------------------------------------------ 151 152 … … 156 157 157 158 //------------------------------------------------------------------------------ 158 // 159 // Module Featured Photos 159 160 //------------------------------------------------------------------------------ 160 161 -
extensions/PWG_Stuffs/language/en_UK/plugin.lang.php
r7340 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'You didn\'t select any module.'; 41 41 $lang['stuffs_no_name'] = 'You must specify name module'; 42 $lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ 44 // 45 // Module LastComs 45 46 //------------------------------------------------------------------------------ 46 47 … … 60 61 61 62 //------------------------------------------------------------------------------ 62 // 63 // Module Logon 63 64 //------------------------------------------------------------------------------ 64 65 … … 70 71 71 72 //------------------------------------------------------------------------------ 72 // 73 // Module Personal 73 74 //------------------------------------------------------------------------------ 74 75 … … 80 81 81 82 //------------------------------------------------------------------------------ 82 // 83 // Module Tags 83 84 //------------------------------------------------------------------------------ 84 85 … … 93 94 94 95 //------------------------------------------------------------------------------ 95 // 96 // Module Piclenswall 96 97 //------------------------------------------------------------------------------ 97 98 … … 109 110 110 111 //------------------------------------------------------------------------------ 111 // 112 // Module Most Visited 112 113 //------------------------------------------------------------------------------ 113 114 … … 126 127 127 128 //------------------------------------------------------------------------------ 128 // 129 // Module Best Rated 129 130 //------------------------------------------------------------------------------ 130 131 … … 133 134 134 135 //------------------------------------------------------------------------------ 135 // 136 // Module Recent 136 137 //------------------------------------------------------------------------------ 137 138 … … 140 141 141 142 //------------------------------------------------------------------------------ 142 // 143 // Module Random 143 144 //------------------------------------------------------------------------------ 144 145 … … 147 148 148 149 //------------------------------------------------------------------------------ 149 // 150 // Module Citation 150 151 //------------------------------------------------------------------------------ 151 152 … … 156 157 157 158 //------------------------------------------------------------------------------ 158 // 159 // Module Featured Photos 159 160 //------------------------------------------------------------------------------ 160 161 -
extensions/PWG_Stuffs/language/es_ES/plugin.lang.php
r7348 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Usted no seleccionó ningun módulo a añadir.'; 41 41 $lang['stuffs_no_name'] = 'Usted debe indicar por lo menos un nombre para el módulo'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ 44 // 45 // Module LastComs 45 46 //------------------------------------------------------------------------------ 46 47 … … 60 61 61 62 //------------------------------------------------------------------------------ 62 // 63 // Module Logon 63 64 //------------------------------------------------------------------------------ 64 65 … … 70 71 71 72 //------------------------------------------------------------------------------ 72 // 73 // Module Personal 73 74 //------------------------------------------------------------------------------ 74 75 … … 80 81 81 82 //------------------------------------------------------------------------------ 82 // 83 // Module Tags 83 84 //------------------------------------------------------------------------------ 84 85 … … 92 93 93 94 //------------------------------------------------------------------------------ 94 // 95 // Module Piclenswall 95 96 //------------------------------------------------------------------------------ 96 97 … … 108 109 109 110 //------------------------------------------------------------------------------ 110 // 111 // Module Most Visited 111 112 //------------------------------------------------------------------------------ 112 113 … … 125 126 126 127 //------------------------------------------------------------------------------ 127 // 128 // Module Best Rated 128 129 //------------------------------------------------------------------------------ 129 130 … … 132 133 133 134 //------------------------------------------------------------------------------ 134 // 135 // Module Recent 135 136 //------------------------------------------------------------------------------ 136 137 … … 139 140 140 141 //------------------------------------------------------------------------------ 141 // 142 // Module Random 142 143 //------------------------------------------------------------------------------ 143 144 … … 146 147 147 148 //------------------------------------------------------------------------------ 148 // 149 // Module Citation 149 150 //------------------------------------------------------------------------------ 150 151 … … 155 156 156 157 //------------------------------------------------------------------------------ 157 // 158 // Module Featured Photos 158 159 //------------------------------------------------------------------------------ 159 160 -
extensions/PWG_Stuffs/language/fr_FR/plugin.lang.php
r7340 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Vous n\'avez pas sélectionné de module à ajouter.'; 41 41 $lang['stuffs_no_name'] = 'Vous devez indiquer un nom pour le module'; 42 $lang['stuffs_parent_plugin_is_missing'] = 'LE PLUGIN PARENT N\'EST PLUS ACTIVÉ. Veuillez supprimer ce module ou réactiver le plugin parent.'; 42 43 43 44 //------------------------------------------------------------------------------ 44 // 45 // Module LastComs 45 46 //------------------------------------------------------------------------------ 46 47 … … 60 61 61 62 //------------------------------------------------------------------------------ 62 // 63 // Module Logon 63 64 //------------------------------------------------------------------------------ 64 65 … … 70 71 71 72 //------------------------------------------------------------------------------ 72 // 73 // Module Personal 73 74 //------------------------------------------------------------------------------ 74 75 … … 80 81 81 82 //------------------------------------------------------------------------------ 82 // 83 // Module Tags 83 84 //------------------------------------------------------------------------------ 84 85 … … 93 94 94 95 //------------------------------------------------------------------------------ 95 // 96 // Module Piclenswall 96 97 //------------------------------------------------------------------------------ 97 98 … … 109 110 110 111 //------------------------------------------------------------------------------ 111 // 112 // Module Most Visited 112 113 //------------------------------------------------------------------------------ 113 114 … … 126 127 127 128 //------------------------------------------------------------------------------ 128 // 129 // Module Best Rated 129 130 //------------------------------------------------------------------------------ 130 131 … … 133 134 134 135 //------------------------------------------------------------------------------ 135 // 136 // Module Recent 136 137 //------------------------------------------------------------------------------ 137 138 … … 140 141 141 142 //------------------------------------------------------------------------------ 142 // 143 // Module Random 143 144 //------------------------------------------------------------------------------ 144 145 … … 147 148 148 149 //------------------------------------------------------------------------------ 149 // 150 // Module Citation 150 151 //------------------------------------------------------------------------------ 151 152 … … 156 157 157 158 //------------------------------------------------------------------------------ 158 // 159 // Module Featured Photos 159 160 //------------------------------------------------------------------------------ 160 161 -
extensions/PWG_Stuffs/language/hr_HR/plugin.lang.php
r7340 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Niste odabrali niti jedan modul.'; 41 41 $lang['stuffs_no_name'] = 'Morate navesti naziv modula'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ -
extensions/PWG_Stuffs/language/hu_HU/plugin.lang.php
r7411 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Nincs modul kiválasztva.'; 41 41 $lang['stuffs_no_name'] = 'Meg kell adni a modul címét'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ 44 // 45 // Module LastComs 45 46 //------------------------------------------------------------------------------ 46 47 … … 60 61 61 62 //------------------------------------------------------------------------------ 62 // 63 // Module Logon 63 64 //------------------------------------------------------------------------------ 64 65 … … 70 71 71 72 //------------------------------------------------------------------------------ 72 // 73 // Module Personal 73 74 //------------------------------------------------------------------------------ 74 75 … … 80 81 81 82 //------------------------------------------------------------------------------ 82 // 83 // Module Tags 83 84 //------------------------------------------------------------------------------ 84 85 … … 93 94 94 95 //------------------------------------------------------------------------------ 95 // 96 // Module Piclenswall 96 97 //------------------------------------------------------------------------------ 97 98 … … 109 110 110 111 //------------------------------------------------------------------------------ 111 // 112 // Module Most Visited 112 113 //------------------------------------------------------------------------------ 113 114 … … 126 127 127 128 //------------------------------------------------------------------------------ 128 // 129 // Module Best Rated 129 130 //------------------------------------------------------------------------------ 130 131 … … 133 134 134 135 //------------------------------------------------------------------------------ 135 // 136 // Module Recent 136 137 //------------------------------------------------------------------------------ 137 138 … … 140 141 141 142 //------------------------------------------------------------------------------ 142 // 143 // Module Random 143 144 //------------------------------------------------------------------------------ 144 145 … … 147 148 148 149 //------------------------------------------------------------------------------ 149 // 150 // Module Citation 150 151 //------------------------------------------------------------------------------ 151 152 … … 156 157 157 158 //------------------------------------------------------------------------------ 158 // 159 // Module Featured Photos 159 160 //------------------------------------------------------------------------------ 160 161 -
extensions/PWG_Stuffs/language/it_IT/plugin.lang.php
r7434 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Non avete selezionato un modulo da aggiungere.'; 41 41 $lang['stuffs_no_name'] = 'E\' necessario specificare il nome del modulo'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ 44 // 45 // Module LastComs 45 46 //------------------------------------------------------------------------------ 46 47 … … 60 61 61 62 //------------------------------------------------------------------------------ 62 // 63 // Module Logon 63 64 //------------------------------------------------------------------------------ 64 65 … … 70 71 71 72 //------------------------------------------------------------------------------ 72 // 73 // Module Personal 73 74 //------------------------------------------------------------------------------ 74 75 … … 80 81 81 82 //------------------------------------------------------------------------------ 82 // 83 // Module Tags 83 84 //------------------------------------------------------------------------------ 84 85 … … 93 94 94 95 //------------------------------------------------------------------------------ 95 // 96 // Module Piclenswall 96 97 //------------------------------------------------------------------------------ 97 98 … … 109 110 110 111 //------------------------------------------------------------------------------ 111 // 112 // Module Most Visited 112 113 //------------------------------------------------------------------------------ 113 114 … … 126 127 127 128 //------------------------------------------------------------------------------ 128 // 129 // Module Best Rated 129 130 //------------------------------------------------------------------------------ 130 131 … … 133 134 134 135 //------------------------------------------------------------------------------ 135 // 136 // Module Recent 136 137 //------------------------------------------------------------------------------ 137 138 … … 140 141 141 142 //------------------------------------------------------------------------------ 142 // 143 // Module Random 143 144 //------------------------------------------------------------------------------ 144 145 … … 147 148 148 149 //------------------------------------------------------------------------------ 149 // 150 // Module Citation 150 151 //------------------------------------------------------------------------------ 151 152 … … 156 157 157 158 //------------------------------------------------------------------------------ 158 // 159 // Module Featured Photos 159 160 //------------------------------------------------------------------------------ 160 161 -
extensions/PWG_Stuffs/language/ja_JP/plugin.lang.php
r7340 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'あなたは、モジュールを選択していません。'; 41 41 $lang['stuffs_no_name'] = 'あなたは、モジュール名を指定する必要があります。'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ 44 // 45 // Module LastComs 45 46 //------------------------------------------------------------------------------ 46 47 … … 60 61 61 62 //------------------------------------------------------------------------------ 62 // 63 // Module Logon 63 64 //------------------------------------------------------------------------------ 64 65 … … 70 71 71 72 //------------------------------------------------------------------------------ 72 // 73 // Module Personal 73 74 //------------------------------------------------------------------------------ 74 75 … … 80 81 81 82 //------------------------------------------------------------------------------ 82 // 83 // Module Tags 83 84 //------------------------------------------------------------------------------ 84 85 … … 93 94 94 95 //------------------------------------------------------------------------------ 95 // 96 // Module Piclenswall 96 97 //------------------------------------------------------------------------------ 97 98 … … 109 110 110 111 //------------------------------------------------------------------------------ 111 // 112 // Module Most Visited 112 113 //------------------------------------------------------------------------------ 113 114 … … 126 127 127 128 //------------------------------------------------------------------------------ 128 // 129 // Module Best Rated 129 130 //------------------------------------------------------------------------------ 130 131 … … 133 134 134 135 //------------------------------------------------------------------------------ 135 // 136 // Module Recent 136 137 //------------------------------------------------------------------------------ 137 138 … … 140 141 141 142 //------------------------------------------------------------------------------ 142 // 143 // Module Random 143 144 //------------------------------------------------------------------------------ 144 145 … … 147 148 148 149 //------------------------------------------------------------------------------ 149 // 150 // Module Citation 150 151 //------------------------------------------------------------------------------ 151 152 … … 156 157 157 158 //------------------------------------------------------------------------------ 158 // 159 // Module Featured Photos 159 160 //------------------------------------------------------------------------------ 160 161 -
extensions/PWG_Stuffs/language/pl_PL/plugin.lang.php
r7431 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Nie został wybrany żaden moduł.'; 41 41 $lang['stuffs_no_name'] = 'Musisz podać nazwę modułu'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ -
extensions/PWG_Stuffs/language/pt_PT/plugin.lang.php
r9042 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Não seleccionou um módulo.'; 41 41 $lang['stuffs_no_name'] = 'Deverá especificar um nome para o módulo'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ -
extensions/PWG_Stuffs/language/ru_RU/plugin.lang.php
r7452 r9369 41 41 $lang['stuffs_error_no_mod_selected'] = 'Вы не выбрали модуль для добавления.'; 42 42 $lang['stuffs_no_name'] = 'Пожалуйста, введите хотя бы одно имя для модуля.'; 43 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 43 44 44 45 //------------------------------------------------------------------------------ 45 // 46 // Module LastComs 46 47 //------------------------------------------------------------------------------ 47 48 … … 66 67 67 68 //------------------------------------------------------------------------------ 68 // 69 // Module Logon 69 70 //------------------------------------------------------------------------------ 70 71 … … 76 77 77 78 //------------------------------------------------------------------------------ 78 // 79 // Module Personal 79 80 //------------------------------------------------------------------------------ 80 81 … … 86 87 87 88 //------------------------------------------------------------------------------ 88 // 89 // Module Tags 89 90 //------------------------------------------------------------------------------ 90 91 … … 99 100 100 101 //------------------------------------------------------------------------------ 101 // 102 // Module Piclenswall 102 103 //------------------------------------------------------------------------------ 103 104 … … 115 116 116 117 //------------------------------------------------------------------------------ 117 // 118 // Module Most Visited 118 119 //------------------------------------------------------------------------------ 119 120 … … 132 133 133 134 //------------------------------------------------------------------------------ 134 // 135 // Module Best Rated 135 136 //------------------------------------------------------------------------------ 136 137 … … 139 140 140 141 //------------------------------------------------------------------------------ 141 // 142 // Module Recent 142 143 //------------------------------------------------------------------------------ 143 144 … … 146 147 147 148 //------------------------------------------------------------------------------ 148 // 149 // Module Random 149 150 //------------------------------------------------------------------------------ 150 151 … … 153 154 154 155 //------------------------------------------------------------------------------ 155 // 156 // Module Citation 156 157 //------------------------------------------------------------------------------ 157 158 … … 162 163 163 164 //------------------------------------------------------------------------------ 164 // 165 // Module Featured Photos 165 166 //------------------------------------------------------------------------------ 166 167 -
extensions/PWG_Stuffs/language/sk_SK/plugin.lang.php
r7340 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Neoznačili ste žiaden modul.'; 41 41 $lang['stuffs_no_name'] = 'Musíte určiť názov modulu'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ -
extensions/PWG_Stuffs/language/sv_SE/plugin.lang.php
r7825 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Ingen kategori markerad.'; 41 41 $lang['stuffs_no_name'] = 'Specifiera namn på enheten'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ 44 // 45 // Module LastComs 45 46 //------------------------------------------------------------------------------ 46 47 … … 60 61 61 62 //------------------------------------------------------------------------------ 62 // 63 // Module Logon 63 64 //------------------------------------------------------------------------------ 64 65 … … 70 71 71 72 //------------------------------------------------------------------------------ 72 // 73 // Module Personal 73 74 //------------------------------------------------------------------------------ 74 75 … … 80 81 81 82 //------------------------------------------------------------------------------ 82 // 83 // Module Tags 83 84 //------------------------------------------------------------------------------ 84 85 … … 93 94 94 95 //------------------------------------------------------------------------------ 95 // 96 // Module Piclenswall 96 97 //------------------------------------------------------------------------------ 97 98 … … 109 110 110 111 //------------------------------------------------------------------------------ 111 // 112 // Module Most Visited 112 113 //------------------------------------------------------------------------------ 113 114 … … 126 127 127 128 //------------------------------------------------------------------------------ 128 // 129 // Module Best Rated 129 130 //------------------------------------------------------------------------------ 130 131 … … 133 134 134 135 //------------------------------------------------------------------------------ 135 // 136 // Module Recent 136 137 //------------------------------------------------------------------------------ 137 138 … … 140 141 141 142 //------------------------------------------------------------------------------ 142 // 143 // Module Random 143 144 //------------------------------------------------------------------------------ 144 145 … … 147 148 148 149 //------------------------------------------------------------------------------ 149 // 150 // Module Citation 150 151 //------------------------------------------------------------------------------ 151 152 … … 156 157 157 158 //------------------------------------------------------------------------------ 158 // 159 // Module Featured Photos 159 160 //------------------------------------------------------------------------------ 160 161 -
extensions/PWG_Stuffs/language/tr_TR/plugin.lang.php
r9040 r9369 40 40 $lang['stuffs_error_no_mod_selected'] = 'Bir modül seçmediniz.'; 41 41 $lang['stuffs_no_name'] = 'Modül için bir isim belirtmelisiniz'; 42 /*TODO*/$lang['stuffs_parent_plugin_is_missing'] = 'PARENT PLUGIN IS NOT ACTIVATED. You should remove this module or re-activate parent plugin.'; 42 43 43 44 //------------------------------------------------------------------------------ -
extensions/PWG_Stuffs/main.inc.php
r7402 r9369 2 2 /* 3 3 Plugin Name: PWG Stuffs 4 Version: 2.0.q4 Version: auto 5 5 Description: Insert modules on your gallery 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=190 … … 8 8 Author URI: http://www.gauchon.com 9 9 */ 10 11 define('STUFFS_VERSION', '2.1.m'); 10 12 11 13 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); … … 16 18 define('STUFFS_PATH' , PHPWG_PLUGINS_PATH . STUFFS_DIR . '/'); 17 19 define('STUFFS_TABLE' , $prefixeTable . 'stuffs'); 20 21 // Need upgrade? 22 if ($plugin['version'] != STUFFS_VERSION) 23 include('admin/upgrade.inc.php'); 18 24 19 25 function stuffs_admin_menu($menu) … … 27 33 function set_stuffs_on_index() 28 34 { 29 35 global $page; 30 36 31 37 if (isset($page['section']) and $page['section'] == 'categories') 32 38 { 33 39 include_once(STUFFS_PATH . 'include/stuffs.inc.php'); 34 40 } 35 41 } 36 42 37 43 function set_stuffs_on_picture() 38 44 { 39 45 include_once(STUFFS_PATH . 'include/stuffs.inc.php'); 40 46 } 41 47 -
extensions/PWG_Stuffs/maintain.inc.php
r3609 r9369 17 17 `descr` varchar(255) default NULL, 18 18 `type` varchar(255) NOT NULL, 19 `path` varchar(255) default NULL, 19 20 `datas` longtext default NULL, 20 21 `users` varchar(255) default NULL, … … 33 34 pwg_query($q); 34 35 35 $q = "INSERT INTO `" . $prefixeTable . "stuffs` (`id`, `pos`, `name`, `descr`, `type`, ` datas`, `users`, `groups`, `show_title`, `on_home`, `on_cats`, `on_picture`, `id_line`, `width`)36 VALUES (0, 1, 'MainBlock', NULL, 'MainBlock', NULL, 'guest,generic,normal,admin,webmaster', NULL, 'true', 'true', 'true', 'true', NULL, NULL);";36 $q = "INSERT INTO `" . $prefixeTable . "stuffs` (`id`, `pos`, `name`, `descr`, `type`, `path`, `datas`, `users`, `groups`, `show_title`, `on_home`, `on_cats`, `on_picture`, `id_line`, `width`) 37 VALUES (0, 1, 'MainBlock', NULL, 'MainBlock', NULL, NULL, 'guest,generic,normal,admin,webmaster', NULL, 'true', 'true', 'true', 'true', NULL, NULL);"; 37 38 pwg_query($q); 38 39 } 39 40 } 40 41 41 function plugin_activate( )42 function plugin_activate($id, $version) 42 43 { 43 global $p refixeTable;44 global $plugins, $prefixeTable; 44 45 45 46 // Check if upgrade is needed 46 $query = 'SHOW FULL COLUMNS FROM ' . $prefixeTable . 'stuffs;'; 47 $result = array_from_query($query, 'Field'); 48 if ($result[5] == 'params') 47 if ($version != $plugins->fs_plugins[$id]['version']) 49 48 { 50 upgrade_stuffs_from_17(); 49 define('STUFFS_VERSION', $plugins->fs_plugins[$id]['version']); 50 include('admin/upgrade.inc.php'); 51 51 } 52 52 } … … 56 56 global $prefixeTable; 57 57 58 58 $q = 'DROP TABLE ' . $prefixeTable . 'stuffs;'; 59 59 pwg_query($q); 60 60 } 61 61 62 function upgrade_stuffs_from_17()63 {64 global $prefixeTable, $conf;65 66 $query = 'ALTER TABLE ' . $prefixeTable . 'stuffs67 MODIFY COLUMN name TEXT CHARACTER SET utf8 NOT NULL,68 MODIFY COLUMN descr VARCHAR(255) CHARACTER SET utf8 default NULL,69 MODIFY COLUMN type VARCHAR(255) CHARACTER SET utf8 NOT NULL,70 MODIFY COLUMN params VARCHAR(255) CHARACTER SET utf8 default NULL,71 MODIFY COLUMN datas LONGTEXT CHARACTER SET utf8 default NULL,72 MODIFY COLUMN users VARCHAR(255) CHARACTER SET utf8 default NULL,73 MODIFY COLUMN groups VARCHAR(255) CHARACTER SET utf8 default NULL,74 DEFAULT CHARACTER SET utf8,75 ADD show_title ENUM(\'true\',\'false\') NOT NULL,76 ADD on_home ENUM(\'true\',\'false\') NOT NULL,77 ADD on_cats ENUM(\'true\',\'false\') NOT NULL,78 ADD on_picture ENUM(\'true\',\'false\') NOT NULL,79 ADD id_line VARCHAR(1) default NULL,80 ADD width SMALLINT(9) default NULL,81 ADD INDEX (on_home),82 ADD INDEX (on_cats),83 ADD INDEX (on_picture);';84 85 pwg_query($query);86 87 $query = 'SELECT id, name, type, params, datas FROM ' . $prefixeTable . 'stuffs;';88 $result = pwg_query($query);89 90 $modules = array();91 while ($row = mysql_fetch_assoc($result))92 {93 if ($row['name'] != 'MainBlock')94 {95 $array = array();96 foreach (explode('///', $row['name']) as $name)97 {98 $a = explode(':', $name);99 array_push($array, '[lang='.substr($a[0],0,2).']'.$a[1].'[/lang]');100 }101 $new_name = implode("\r\n", $array);102 }103 else104 {105 $new_name = 'MainBlock';106 }107 108 if ($row['type'] == 'LastComs')109 {110 $datas = unserialize($row['datas']);111 $row['datas'] = serialize(array($datas[0], $datas[1], $datas[6], $datas[2], $datas[3]));112 }113 114 $params = explode(',', $row['params']);115 $params[4] = !empty($params[4]) ? '"'.$params[4].'"' : 'NULL';116 $params[5] = !empty($params[5]) ? $params[5] : 'NULL';117 118 $query = 'UPDATE ' . $prefixeTable . 'stuffs119 SET120 name = "'. $new_name . '",121 datas = "' . addslashes($row['datas']) . '",122 show_title = "'. ($params[0] ? 'true' : 'false') .'",123 on_home = "'. ($params[1] ? 'true' : 'false') .'",124 on_cats = "'. ($params[2] ? 'true' : 'false') .'",125 on_picture = "'. ($params[3] ? 'true' : 'false') .'",126 id_line = '. $params[4] .',127 width = '. $params[5] .'128 WHERE id = '.$row['id'].';';129 130 pwg_query($query);131 }132 133 $query = 'ALTER TABLE ' . $prefixeTable . 'stuffs DROP params;';134 pwg_query($query);135 136 if (isset($conf['Stuffs']))137 {138 $q = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="Stuffs" LIMIT 1;';139 pwg_query($q);140 }141 }142 143 144 62 ?> -
extensions/PWG_Stuffs/modules/BestRated/main.inc.php
r3609 r9369 155 155 156 156 $block['CONTENT'] = $template->parse('pwgs_best_rated', true); 157 $block['TEMPLATE'] = 'stuffs_bestrated.tpl'; 157 158 } 158 159 else -
extensions/PWG_Stuffs/modules/Citation/main.inc.php
r3694 r9369 1 1 <?php 2 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 3 4 global $user; 4 5 5 6 if ((isset($datas['quote_lang'][$user['language']])) and 6 ("" != $datas['quote_lang'][$user['language']])) { 7 ("" != $datas['quote_lang'][$user['language']])) 8 { 7 9 $block['CONTENT'] = $datas['quote_lang'][$user['language']]; 8 } else { 9 return false; 10 $block['TEMPLATE'] = 'stuffs_citation.tpl'; 10 11 } 11 12 ?> -
extensions/PWG_Stuffs/modules/FeaturedPhotos/main.inc.php
r4981 r9369 136 136 137 137 $block['CONTENT'] = $template->parse('pwgs_feat', true); 138 } 139 else 140 { 141 return false; 138 $block['TEMPLATE'] = 'stuffs_featuredphotos.tpl'; 142 139 } 143 140 -
extensions/PWG_Stuffs/modules/LastComs/main.inc.php
r4540 r9369 179 179 array_push($block['comments'], $tpl_comment); 180 180 } 181 } 182 else 183 { 184 return false; 181 $block['TEMPLATE'] = 'stuffs_lastcoms.tpl'; 185 182 } 186 183 -
extensions/PWG_Stuffs/modules/Logon/config.inc.php
r3609 r9369 10 10 // Enregistrement de la configuration 11 11 if (isset($_POST['submit']) and !is_adviser()) { 12 12 if (!isset($_POST['remove_menubar_block'])) $_POST['remove_menubar_block'] = '0'; 13 13 $datas = array($_POST['remove_menubar_block']); 14 14 } -
extensions/PWG_Stuffs/modules/Logon/main.inc.php
r3609 r9369 2 2 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 if (!is_a_guest()) return false; 4 5 if (!is_a_guest()) return; 5 6 6 7 global $conf; … … 30 31 } 31 32 33 $block['TEMPLATE'] = 'stuffs_logon.tpl'; 34 32 35 ?> -
extensions/PWG_Stuffs/modules/MostVisited/main.inc.php
r3609 r9369 160 160 161 161 $block['CONTENT'] = $template->parse('pwgs_most_visited', true); 162 } 163 else 164 { 165 return false; 162 $block['TEMPLATE'] = 'stuffs_mostvisited.tpl'; 166 163 } 167 164 -
extensions/PWG_Stuffs/modules/Personal/config.inc.php
r3609 r9369 7 7 // Enregistrement de la configuration 8 8 if (isset($_POST['submit']) and !is_adviser()) { 9 9 $datas = array(stripslashes($_POST['personal_content'])); 10 10 } 11 11 -
extensions/PWG_Stuffs/modules/Personal/main.inc.php
r3609 r9369 15 15 } 16 16 17 $block['TEMPLATE'] = 'stuffs_personal.tpl'; 18 17 19 ?> -
extensions/PWG_Stuffs/modules/Random/main.inc.php
r3609 r9369 154 154 155 155 $block['CONTENT'] = $template->parse('pwgs_random', true); 156 } 157 else 158 { 159 return false; 156 $block['TEMPLATE'] = 'stuffs_random.tpl'; 160 157 } 161 158 -
extensions/PWG_Stuffs/modules/Recent/main.inc.php
r8625 r9369 150 150 151 151 $block['CONTENT'] = $template->parse('pwgs_recent', true); 152 } 153 else 154 { 155 return false; 152 $block['TEMPLATE'] = 'stuffs_recent.tpl'; 156 153 } 157 154 -
extensions/PWG_Stuffs/modules/Tags/main.inc.php
r3609 r9369 148 148 } 149 149 150 $block['TEMPLATE'] = 'stuffs_tags.tpl'; 151 150 152 ?> -
extensions/PWG_Stuffs/modules/piclenswall/main.inc.php
r8813 r9369 21 21 else 22 22 { 23 24 25 { 26 23 // remplacement naviagation ne doit pas etre active et mis en place sur la page... 24 if (!@$obj->my_config['piclens_wall_nav'] or !@in_array($page['category']['id'], $obj->my_config['piclens_wall_cat_nav_replace'])) 25 { 26 if (@$obj->my_config['piclens_wall_specif'] == 'common') // pas de specificites 3DWall : utilisation des parametres piclens 27 27 { 28 28 $rssfeed = $obj->root_site_piclens.PICLENS_PATH.'piclens-rss.php?/category/'.(empty($page['category']['permalink']) ? $page['category']['id'] : $page['category']['permalink']); 29 29 } 30 31 32 33 34 35 30 elseif (@in_array($page['category']['id'], $obj->my_config['piclens_wall_categories'])) 31 { 32 // categorie pour laquelle le mur est parametre. 33 $rssfeed = $obj->root_site_piclens.PICLENS_PATH.'piclenswall-rss.php?/category/'.(empty($page['category']['permalink']) ? $page['category']['id'] : $page['category']['permalink']); 34 } 35 } 36 36 } 37 37 $block['RSSFEED'] = $rssfeed; … … 77 77 78 78 if (isset($obj->my_config['piclens_wall_tutorial']) and !empty($obj->my_config['piclens_wall_tutorial'])) 79 $block['tutorial'] = (empty($obj->my_config['piclens_wall_tutorialtime']) ? "4500" : @$obj->my_config['piclens_wall_tutorialtime']).','.@$obj->my_config['piclens_wall_tutorial']; 79 $block['tutorial'] = (empty($obj->my_config['piclens_wall_tutorialtime']) ? "4500" : @$obj->my_config['piclens_wall_tutorialtime']).','.@$obj->my_config['piclens_wall_tutorial']; 80 80 81 81 82 82 if (isset($obj->my_config['piclens_wall_customButtonURL']) and !empty($obj->my_config['piclens_wall_customButtonURL'])) 83 83 $block['customButton'] = @$obj->my_config['piclens_wall_customButtonURL'].(empty($obj->my_config['piclens_wall_customButtonTARGET']) ? ','.PICLENS_PATH : ','.@$obj->my_config['piclens_wall_customButtonTARGET']); 84 84 … … 86 86 $block['icons'] = @$obj->my_config['piclens_wall_icons']; 87 87 if (isset($obj->my_config['piclens_wall_linkCSS']) and !empty($obj->my_config['piclens_wall_linkCSS'])) 88 $block['icons'] = @$obj->my_config['piclens_wall_linkCSS']; 88 $block['icons'] = @$obj->my_config['piclens_wall_linkCSS']; 89 89 90 90 $block['TEMPLATE'] = 'stuffs_piclenswall.tpl'; 91 91 } 92 else 93 { 94 return false; 95 } 96 92 97 93 ?>
Note: See TracChangeset
for help on using the changeset viewer.