From de54bb85861892447178e688800fcde2cf5de80d Mon Sep 17 00:00:00 2001 From: grum Date: Wed, 22 Oct 2008 21:35:23 +0000 Subject: "remove AMM plugin asked in topic #p98003" git-svn-id: http://piwigo.org/svn/branches/2.0@2792 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/AMenuManager/admin/amm_admin.tpl | 13 - plugins/AMenuManager/admin/amm_linksconfig.tpl | 114 -- plugins/AMenuManager/admin/amm_linkslist.tpl | 56 - .../AMenuManager/admin/amm_linkslist_detail.tpl | 28 - plugins/AMenuManager/admin/amm_linkslist_edit.tpl | 97 -- .../AMenuManager/admin/amm_personalisedlist.tpl | 50 - .../admin/amm_personalisedlist_detail.tpl | 22 - .../admin/amm_personalisedlist_edit.tpl | 159 --- plugins/AMenuManager/admin/amm_randompicconfig.tpl | 123 --- plugins/AMenuManager/admin/amm_sections.tpl | 58 -- plugins/AMenuManager/admin/amm_sectionslist.tpl | 47 - .../AMenuManager/admin/amm_sectionslist_detail.tpl | 24 - .../AMenuManager/admin/amm_sectionsmod_detail.tpl | 17 - plugins/AMenuManager/admin/go-down.png | Bin 720 -> 0 bytes plugins/AMenuManager/admin/go-up.png | Bin 630 -> 0 bytes plugins/AMenuManager/admin/index.php | 33 - plugins/AMenuManager/admin/plugin_admin.php | 28 - plugins/AMenuManager/amm.css | 4 - plugins/AMenuManager/amm_aim.class.inc.php | 40 - plugins/AMenuManager/amm_aip.class.inc.php | 1094 -------------------- plugins/AMenuManager/amm_install.class.inc.php | 94 -- plugins/AMenuManager/amm_pip.class.inc.php | 156 --- plugins/AMenuManager/amm_root.class.inc.php | 193 ---- plugins/AMenuManager/index.php | 33 - plugins/AMenuManager/language/de_DE/index.php | 33 - .../AMenuManager/language/de_DE/plugin.lang.php | 89 -- plugins/AMenuManager/language/en_UK/index.php | 33 - .../AMenuManager/language/en_UK/plugin.lang.php | 89 -- plugins/AMenuManager/language/fr_FR/index.php | 33 - .../AMenuManager/language/fr_FR/plugin.lang.php | 88 -- plugins/AMenuManager/language/index.php | 33 - plugins/AMenuManager/language/it_IT/index.php | 33 - .../AMenuManager/language/it_IT/plugin.lang.php | 88 -- .../AMenuManager/links_pictures/internet-url.png | Bin 828 -> 0 bytes plugins/AMenuManager/links_pictures/internet.png | Bin 844 -> 0 bytes plugins/AMenuManager/main.inc.php | 68 -- plugins/AMenuManager/maintain.inc.php | 57 - .../AMenuManager/menu_templates/menubar_links.tpl | 16 - .../menu_templates/menubar_personalised.tpl | 8 - .../menu_templates/menubar_randompic.tpl | 15 - 40 files changed, 3166 deletions(-) delete mode 100755 plugins/AMenuManager/admin/amm_admin.tpl delete mode 100644 plugins/AMenuManager/admin/amm_linksconfig.tpl delete mode 100644 plugins/AMenuManager/admin/amm_linkslist.tpl delete mode 100644 plugins/AMenuManager/admin/amm_linkslist_detail.tpl delete mode 100644 plugins/AMenuManager/admin/amm_linkslist_edit.tpl delete mode 100644 plugins/AMenuManager/admin/amm_personalisedlist.tpl delete mode 100644 plugins/AMenuManager/admin/amm_personalisedlist_detail.tpl delete mode 100644 plugins/AMenuManager/admin/amm_personalisedlist_edit.tpl delete mode 100644 plugins/AMenuManager/admin/amm_randompicconfig.tpl delete mode 100644 plugins/AMenuManager/admin/amm_sections.tpl delete mode 100644 plugins/AMenuManager/admin/amm_sectionslist.tpl delete mode 100644 plugins/AMenuManager/admin/amm_sectionslist_detail.tpl delete mode 100644 plugins/AMenuManager/admin/amm_sectionsmod_detail.tpl delete mode 100644 plugins/AMenuManager/admin/go-down.png delete mode 100644 plugins/AMenuManager/admin/go-up.png delete mode 100755 plugins/AMenuManager/admin/index.php delete mode 100755 plugins/AMenuManager/admin/plugin_admin.php delete mode 100644 plugins/AMenuManager/amm.css delete mode 100755 plugins/AMenuManager/amm_aim.class.inc.php delete mode 100755 plugins/AMenuManager/amm_aip.class.inc.php delete mode 100644 plugins/AMenuManager/amm_install.class.inc.php delete mode 100644 plugins/AMenuManager/amm_pip.class.inc.php delete mode 100644 plugins/AMenuManager/amm_root.class.inc.php delete mode 100755 plugins/AMenuManager/index.php delete mode 100644 plugins/AMenuManager/language/de_DE/index.php delete mode 100644 plugins/AMenuManager/language/de_DE/plugin.lang.php delete mode 100755 plugins/AMenuManager/language/en_UK/index.php delete mode 100755 plugins/AMenuManager/language/en_UK/plugin.lang.php delete mode 100755 plugins/AMenuManager/language/fr_FR/index.php delete mode 100755 plugins/AMenuManager/language/fr_FR/plugin.lang.php delete mode 100755 plugins/AMenuManager/language/index.php delete mode 100644 plugins/AMenuManager/language/it_IT/index.php delete mode 100644 plugins/AMenuManager/language/it_IT/plugin.lang.php delete mode 100644 plugins/AMenuManager/links_pictures/internet-url.png delete mode 100644 plugins/AMenuManager/links_pictures/internet.png delete mode 100755 plugins/AMenuManager/main.inc.php delete mode 100755 plugins/AMenuManager/maintain.inc.php delete mode 100644 plugins/AMenuManager/menu_templates/menubar_links.tpl delete mode 100644 plugins/AMenuManager/menu_templates/menubar_personalised.tpl delete mode 100644 plugins/AMenuManager/menu_templates/menubar_randompic.tpl diff --git a/plugins/AMenuManager/admin/amm_admin.tpl b/plugins/AMenuManager/admin/amm_admin.tpl deleted file mode 100755 index 313937722..000000000 --- a/plugins/AMenuManager/admin/amm_admin.tpl +++ /dev/null @@ -1,13 +0,0 @@ -
-

:: {$plugin.AMM_VERSION} ::

-

{'g002_title_page'|@translate} {$TABSHEET_TITLE}

- - {$tabsheet} -
- -{if isset($page_nfo)} -

{$page_nfo}

-{/if} - -{$AMM_BODY_PAGE} - diff --git a/plugins/AMenuManager/admin/amm_linksconfig.tpl b/plugins/AMenuManager/admin/amm_linksconfig.tpl deleted file mode 100644 index 4bce937fc..000000000 --- a/plugins/AMenuManager/admin/amm_linksconfig.tpl +++ /dev/null @@ -1,114 +0,0 @@ -{literal} - -{/literal} - - - -

{'g002_linkslist'|@translate} / {'g002_configlinks'|@translate} -

- - -
-
- {'g002_setting_block_menu'|@translate} - - {if isset($datas.language_list) and count($datas.language_list)} - {foreach from=$datas.language_list key=name item=language_row} - - {/foreach} - {/if} - - - - - - - - - - - -
{'g002_setting_block_title'|@translate} - -
-
- {'g002_translate'|@translate} -
- - -
- -
- {'g002_setting_link_links'|@translate} - - - - - -
{'g002_setting_link_show_icon'|@translate} - -
-
- -

- -

- - - -
- - \ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_linkslist.tpl b/plugins/AMenuManager/admin/amm_linkslist.tpl deleted file mode 100644 index 1b197c8b4..000000000 --- a/plugins/AMenuManager/admin/amm_linkslist.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{literal} - -{/literal} - - -

{'g002_linkslist'|@translate} / {'g002_configlinks'|@translate} -

- -[{$datas.nburl}]
-{'g002_addlink'|@translate} - -
- -
- - - \ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_linkslist_detail.tpl b/plugins/AMenuManager/admin/amm_linkslist_detail.tpl deleted file mode 100644 index e97c0ff07..000000000 --- a/plugins/AMenuManager/admin/amm_linkslist_detail.tpl +++ /dev/null @@ -1,28 +0,0 @@ - -{if isset($datas.urls) and count($datas.urls)} - - - - - - - - - - - {foreach from=$datas.urls key=name item=url} - - - - - - - - - - - - {/foreach} - -
 {'g002_label'|@translate}{'g002_url'|@translate}{'g002_mode'|@translate}{'g002_visible'|@translate} 
{if $url.img!=""}{else} {/if}{$url.label}{$url.url}{$url.mode}{$url.visible}{if $url.up}{else} {/if}{if $url.down}{else} {/if}
-{/if} diff --git a/plugins/AMenuManager/admin/amm_linkslist_edit.tpl b/plugins/AMenuManager/admin/amm_linkslist_edit.tpl deleted file mode 100644 index 0cf874dc2..000000000 --- a/plugins/AMenuManager/admin/amm_linkslist_edit.tpl +++ /dev/null @@ -1,97 +0,0 @@ -{literal} - -{/literal} - - -{if isset($datas.modeedit)} - -

- {if $datas.modeedit=='create'} - {'g002_createoflink'|@translate} - {else} - {'g002_editoflink'|@translate} - {/if} - / {'g002_linkslist'|@translate}

- - -
-
- - - - - - - - - - - - - - - - - - - - - -
{'g002_label'|@translate} -
{'g002_url'|@translate} -
{'g002_icon'|@translate} - - -
{'g002_mode'|@translate} - - -
{'g002_visible'|@translate} - - -
-
- - - {if $datas.modeedit=='create'} -

- -

- {/if} - - {if $datas.modeedit=='modify'} -

- -

- {/if} - - - - -
- -{/if} \ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_personalisedlist.tpl b/plugins/AMenuManager/admin/amm_personalisedlist.tpl deleted file mode 100644 index d7595e036..000000000 --- a/plugins/AMenuManager/admin/amm_personalisedlist.tpl +++ /dev/null @@ -1,50 +0,0 @@ -{literal} - -{/literal} - - -

{'g002_personalisedlist'|@translate}

- -[{$datas.nbsections}]
-{'g002_addsection'|@translate} - -
- -
- - - \ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_personalisedlist_detail.tpl b/plugins/AMenuManager/admin/amm_personalisedlist_detail.tpl deleted file mode 100644 index fd785e359..000000000 --- a/plugins/AMenuManager/admin/amm_personalisedlist_detail.tpl +++ /dev/null @@ -1,22 +0,0 @@ - -{if isset($datas.sections) and count($datas.sections)} - - - - - - - - - {foreach from=$datas.sections key=name item=section} - - - - - - - - {/foreach} - -
{'g002_setting_personalised_nfo'|@translate}{'g002_title'|@translate}{'g002_visible'|@translate} 
{$section.nfo}{$section.title}{$section.visible}
-{/if} diff --git a/plugins/AMenuManager/admin/amm_personalisedlist_edit.tpl b/plugins/AMenuManager/admin/amm_personalisedlist_edit.tpl deleted file mode 100644 index ca2516315..000000000 --- a/plugins/AMenuManager/admin/amm_personalisedlist_edit.tpl +++ /dev/null @@ -1,159 +0,0 @@ -{* $Id $ *} - -{include file='include/autosize.inc.tpl'} - -{literal} - -{/literal} - - -{if isset($datas.modeedit)} - -

- {if $datas.modeedit=='create'} - {'g002_createofpersonalised'|@translate} - {else} - {'g002_editofpersonalised'|@translate} - {/if} - / {'g002_personalisedlist'|@translate}

- - - -
-
- {'g002_setting_personalised_properties'|@translate} - - - - - - - - - - - - -
{'g002_setting_block_active'|@translate} - -
{'g002_setting_personalised_nfo'|@translate} - -
- -
- -
- {'g002_setting_block_menu'|@translate} - - {if isset($datas.language_list) and count($datas.language_list)} - {foreach from=$datas.language_list key=name item=language_row} - - - {/foreach} - {/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{'g002_setting_block_langchoice'|@translate} -
-

{'g002_setting_block_title'|@translate} - -
- {'g002_translate'|@translate} -
{'g002_setting_personalised_content'|@translate} - -
- -
- - -

- -

- - - - -
- - - - -{/if} \ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_randompicconfig.tpl b/plugins/AMenuManager/admin/amm_randompicconfig.tpl deleted file mode 100644 index b910c2f1c..000000000 --- a/plugins/AMenuManager/admin/amm_randompicconfig.tpl +++ /dev/null @@ -1,123 +0,0 @@ -{literal} - -{/literal} - - - -

{'g002_configrandompic'|@translate}

- - -
-
- {'g002_setting_block_menu'|@translate} - - {if isset($datas.language_list) and count($datas.language_list)} - {foreach from=$datas.language_list key=name item=language_row} - - {/foreach} - {/if} - - - - - - - - - - - -
{'g002_setting_block_title'|@translate} - -
-
- {'g002_translate'|@translate} -
- -
- -
- {'g002_setting_randompic_aboutpicture'|@translate} - - - - - - - - - - - -
{'g002_setting_randompic_showname'|@translate} - -
{'g002_setting_randompic_showcomment'|@translate} - -
-
- -

- -

- - - -
- - \ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_sections.tpl b/plugins/AMenuManager/admin/amm_sections.tpl deleted file mode 100644 index da132a622..000000000 --- a/plugins/AMenuManager/admin/amm_sections.tpl +++ /dev/null @@ -1,58 +0,0 @@ -{literal} - -{/literal} - - -

-{foreach from=$datas.LIST item=data} - {$data.separator} - {if $data.link!=''} - - {/if} - {$data.label|@translate} - {if $data.link!=''} - - {/if} -{/foreach} -

- -
- - - \ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_sectionslist.tpl b/plugins/AMenuManager/admin/amm_sectionslist.tpl deleted file mode 100644 index b9b49b074..000000000 --- a/plugins/AMenuManager/admin/amm_sectionslist.tpl +++ /dev/null @@ -1,47 +0,0 @@ -{literal} - -{/literal} - - -

{'g002_sectionslist'|@translate}

- -
- - - \ No newline at end of file diff --git a/plugins/AMenuManager/admin/amm_sectionslist_detail.tpl b/plugins/AMenuManager/admin/amm_sectionslist_detail.tpl deleted file mode 100644 index b94258119..000000000 --- a/plugins/AMenuManager/admin/amm_sectionslist_detail.tpl +++ /dev/null @@ -1,24 +0,0 @@ - -{if isset($datas.sections) and count($datas.sections)} - - - - - - - - - - {foreach from=$datas.sections key=name item=section} - - - - - - - - - {/foreach} - -
{'g002_owner'|@translate}{'g002_sectionid'|@translate}{'g002_name'|@translate}{'g002_visible'|@translate} 
{$section.OWNER}{$section.ID}{$section.NAME}{$section.VISIBLE}{if $section.up}{else} {/if}{if $section.down}{else} {/if}
-{/if} diff --git a/plugins/AMenuManager/admin/amm_sectionsmod_detail.tpl b/plugins/AMenuManager/admin/amm_sectionsmod_detail.tpl deleted file mode 100644 index dcaf625f6..000000000 --- a/plugins/AMenuManager/admin/amm_sectionsmod_detail.tpl +++ /dev/null @@ -1,17 +0,0 @@ - -{if isset($datas.LIST) and count($datas.LIST)} - - - - - - - {foreach from=$datas.LIST key=name item=data} - - - - - {/foreach} - -
{'g002_labelmenu'|@translate}{'g002_visible'|@translate}
{$data.LABEL|@translate}{$data.VISIBLE|@translate}
-{/if} diff --git a/plugins/AMenuManager/admin/go-down.png b/plugins/AMenuManager/admin/go-down.png deleted file mode 100644 index 7eeb16d2e..000000000 Binary files a/plugins/AMenuManager/admin/go-down.png and /dev/null differ diff --git a/plugins/AMenuManager/admin/go-up.png b/plugins/AMenuManager/admin/go-up.png deleted file mode 100644 index bd84e76ad..000000000 Binary files a/plugins/AMenuManager/admin/go-up.png and /dev/null differ diff --git a/plugins/AMenuManager/admin/index.php b/plugins/AMenuManager/admin/index.php deleted file mode 100755 index db1eae0d9..000000000 --- a/plugins/AMenuManager/admin/index.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/plugins/AMenuManager/admin/plugin_admin.php b/plugins/AMenuManager/admin/plugin_admin.php deleted file mode 100755 index 4669ac5b2..000000000 --- a/plugins/AMenuManager/admin/plugin_admin.php +++ /dev/null @@ -1,28 +0,0 @@ -> - ------------------------------------------------------------------------------ - See main.inc.php for release information - - --------------------------------------------------------------------------- */ - -if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } - -include(AMM_PATH."amm_aip.class.inc.php"); - -global $prefixeTable; - -load_language('plugin.lang', AMM_PATH); - -$main_plugin_object = get_plugin_data($plugin_id); - -$plugin_ai = new AMM_AIP($prefixeTable, $main_plugin_object->get_filelocation()); -$plugin_ai->manage(); - -?> \ No newline at end of file diff --git a/plugins/AMenuManager/amm.css b/plugins/AMenuManager/amm.css deleted file mode 100644 index 1293d87ca..000000000 --- a/plugins/AMenuManager/amm.css +++ /dev/null @@ -1,4 +0,0 @@ - -.littlefont { font-size:90%; } -table.littlefont th { text-align:center; padding:3px;padding-left:9px;padding-right:9px; } -table.littlefont td { text-align:left; padding:0px;padding-left:3px;padding-right:3px; } diff --git a/plugins/AMenuManager/amm_aim.class.inc.php b/plugins/AMenuManager/amm_aim.class.inc.php deleted file mode 100755 index e100020d4..000000000 --- a/plugins/AMenuManager/amm_aim.class.inc.php +++ /dev/null @@ -1,40 +0,0 @@ -> - ------------------------------------------------------------------------------ - See main.inc.php for release information - - AMM_AIM : classe to manage plugin integration into plugin menu - - --------------------------------------------------------------------------- */ - -if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } - -include_once('amm_root.class.inc.php'); - -class AMM_AIM extends AMM_root -{ - function AMM_AIM($prefixeTable, $filelocation) - { - parent::__construct($prefixeTable, $filelocation); - } - - /* - initialize events call for the plugin - */ - function init_events() - { - parent::init_events(); - add_event_handler('get_admin_plugin_menu_links', array(&$this, 'plugin_admin_menu') ); - } - -} // amm_aim class - - -?> diff --git a/plugins/AMenuManager/amm_aip.class.inc.php b/plugins/AMenuManager/amm_aip.class.inc.php deleted file mode 100755 index 5481fd030..000000000 --- a/plugins/AMenuManager/amm_aip.class.inc.php +++ /dev/null @@ -1,1094 +0,0 @@ -> - ------------------------------------------------------------------------------ - See main.inc.php for release information - - AIP classe => manage integration in administration interface - - --------------------------------------------------------------------------- */ -if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } - -include_once(PHPWG_PLUGINS_PATH.'AMenuManager/amm_root.class.inc.php'); -include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); -include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/css.class.inc.php'); -include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/ajax.class.inc.php'); -include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/genericjs.class.inc.php'); -include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/translate.class.inc.php'); - -class AMM_AIP extends AMM_root -{ - protected $google_translate; - protected $tabsheet; - protected $css; //the css object - protected $ajax; - - protected $urls_modes=array(0 => 'new_window', 1 => 'current_window'); - - function AMM_AIP($prefixeTable, $filelocation) - { - parent::__construct($prefixeTable, $filelocation); - - $this->load_config(); - $this->init_events(); - - $this->tabsheet = new tabsheet(); - $this->tabsheet->add('setmenu', - l10n('g002_setmenu'), - $this->page_link.'&fAMM_tabsheet=setmenu'); - $this->tabsheet->add('links', - l10n('g002_addlinks'), - $this->page_link.'&fAMM_tabsheet=links'); - $this->tabsheet->add('randompict', - l10n('g002_randompict'), - $this->page_link.'&fAMM_tabsheet=randompict'); - $this->tabsheet->add('personnalblock', - l10n('g002_personnalblock'), - $this->page_link.'&fAMM_tabsheet=personnalblock'); - $this->css = new css(dirname($this->filelocation).'/'.$this->plugin_name_files.".css"); - $this->ajax = new Ajax(); - $this->google_translate = new translate(); - } - - - /* --------------------------------------------------------------------------- - Public classe functions - --------------------------------------------------------------------------- */ - - /* - manage plugin integration into piwigo's admin interface - */ - public function manage() - { - global $template; - - - $template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/amm_admin.tpl"); - - $this->return_ajax_content(); - - $this->init_request(); - - $this->tabsheet->select($_REQUEST['fAMM_tabsheet']); - $this->tabsheet->assign(); - $selected_tab=$this->tabsheet->get_selected(); - $template->assign($this->tabsheet->get_titlename(), "[".$selected_tab['caption']."]"); - - $template_plugin["AMM_VERSION"] = "".$this->plugin_name." ".l10n('g002_version').AMM_VERSION; - $template_plugin["AMM_PAGE"] = $_REQUEST['fAMM_tabsheet']; - $template_plugin["PATH"] = AMM_PATH; - - $template->assign('plugin', $template_plugin); - - - if(isset($_POST['famm_modeedit'])) - { - $post_action=$_POST['famm_modeedit']; - } - else - { - $post_action=""; - } - - $page_nfo=""; - if($_REQUEST['fAMM_tabsheet']=='links') - { - $page_nfo=l10n('g002_addlinks_nfo'); - - switch($_REQUEST['action']) - { - case 'list': - $this->display_links_list_page(); - break; - case 'create': - case 'modify': - if($post_action==$_REQUEST['action']) - { - if(!$this->adviser_abort()) - { - $this->action_create_modify_url(); - } - $this->display_links_list_page(); - } - else - { - ($_REQUEST['action']=='modify')?$urlid=$_REQUEST['fItem']:$urlid=0; - $this->display_links_manage_page($_REQUEST['action'], $urlid); - } - break; - case 'config': - if($post_action==$_REQUEST['action']) - { - if(!$this->adviser_abort()) - { - $this->action_links_modify_config(); - } - } - $this->display_links_config_page(); - break; - } - } - elseif($_REQUEST['fAMM_tabsheet']=='randompict') - { - $page_nfo=l10n('g002_randompict_nfo'); - if($post_action=='config') - { - if(!$this->adviser_abort()) - { - $this->action_randompic_modify_config(); - } - } - $this->display_randompic_config_page(); - } - elseif($_REQUEST['fAMM_tabsheet']=='personnalblock') - { - $page_nfo=l10n('g002_personnalblock_nfo'); - - switch($_REQUEST['action']) - { - case 'list': - $this->display_personalised_list_page(); - break; - case 'create': - case 'modify': - if($post_action==$_REQUEST['action']) - { - if(!$this->adviser_abort()) - { - $this->action_create_modify_personalised(); - } - $this->display_personalised_list_page(); - } - else - { - ($_REQUEST['action']=='modify')?$sectionid=$_REQUEST['fItem']:$sectionid=0; - $this->display_personalised_manage_page($_REQUEST['action'], $sectionid); - } - break; - } - } - elseif($_REQUEST['fAMM_tabsheet']=='setmenu') - { - $page_nfo=l10n('g002_setmenu_nfo'); - $this->display_sections_list_page($_REQUEST['action']); - } - - $template->assign('page_nfo', $page_nfo); - - $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); - } - - /* - initialize events call for the plugin - */ - public function init_events() - { - add_event_handler('loc_end_page_header', array(&$this->css, 'apply_CSS')); - } - - /* --------------------------------------------------------------------------- - Private classe functions - --------------------------------------------------------------------------- */ - - /* - return ajax content - */ - protected function return_ajax_content() - { - global $ajax, $template; - - if(isset($_REQUEST['ajaxfct'])) - { - //$this->debug("AJAXFCT:".$_REQUEST['ajaxfct']); - $result="

".l10n('g002_error_invalid_ajax_call')."

"; - switch($_REQUEST['ajaxfct']) - { - case 'links_list': - $result=$this->ajax_amm_links_list(); - break; - case 'links_permut': - $result=$this->ajax_amm_links_permut($_REQUEST['fItem'], $_REQUEST['fPermut']); - break; - case 'links_delete': - $result=$this->ajax_amm_links_delete($_REQUEST['fItem']); - break; - case 'setmenu_list_sections_list': - $result=$this->ajax_amm_setmenu_list_section_list(); - break; - case 'setmenu_list_sections_position': - $result=$this->ajax_amm_setmenu_list_section_position($_REQUEST['fItem'], $_REQUEST['fPosition']); - break; - case 'setmenu_list_sections_showhide': - $result=$this->ajax_amm_setmenu_list_section_showhide($_REQUEST['fItem']); - break; - - case 'setmenu_modmenu_sections_list': - $result=$this->ajax_amm_setmenu_mod_section_list('amm_sections_modmenu'); - break; - case 'setmenu_modmenu_sections_showhide': - $result=$this->ajax_amm_setmenu_mod_section_showhide('amm_sections_modmenu', $_REQUEST['fItem']); - break; - - case 'setmenu_modspecial_sections_list': - $result=$this->ajax_amm_setmenu_mod_section_list('amm_sections_modspecials'); - break; - case 'setmenu_modspecial_sections_showhide': - $result=$this->ajax_amm_setmenu_mod_section_showhide('amm_sections_modspecials', $_REQUEST['fItem']); - break; - - case 'personalised_list': - $result=$this->ajax_amm_personalised_list(); - break; - case 'personalised_delete': - $result=$this->ajax_amm_personalised_delete($_REQUEST['fItem']); - break; - } - //$template-> - $this->ajax->return_result($result); - } - } - - /* - if empty, initialize $_request - */ - private function init_request() - { - //initialise $REQUEST values if not defined - if(!array_key_exists('fAMM_tabsheet', $_REQUEST)) - { - $_REQUEST['fAMM_tabsheet']='setmenu'; - } - - if((($_REQUEST['fAMM_tabsheet']=='links') or - ($_REQUEST['fAMM_tabsheet']=='personnalblock') or - ($_REQUEST['fAMM_tabsheet']=='setmenu')) and !isset($_REQUEST['action'])) - { - $_REQUEST['action']='list'; - } - - - } //init_request - - - /* - manage display for urls table page - */ - private function display_links_list_page() - { - global $template, $user; - $template->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_linkslist.tpl'); - - $tmp=$this->get_count_url(); - if($tmp==0) - { - $tmp=l10n("g002_nolinks"); - } - elseif($tmp==1) - { - $tmp="1 ".l10n("g002_link"); - } - else - { - $tmp=$tmp." ".l10n("g002_links"); - } - - - $template_datas=array( - 'lnk_create' => $this->page_link.'&fAMM_tabsheet=links&action=create', - 'lnk_config' => $this->page_link.'&fAMM_tabsheet=links&action=config', - 'AMM_AJAX_URL_LIST' => $this->page_link."&ajaxfct=", - 'nburl' => $tmp - ); - - $template->assign("datas", $template_datas); - $template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page'); - } - - /* - manage display for urls config page - */ - private function display_links_config_page() - { - global $template, $user; - $template->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_linksconfig.tpl'); - - $template_datas=array( - 'lnk_list' => $this->page_link.'&fAMM_tabsheet=links', - 'AMM_AJAX_URL_LIST' => $this->page_link."&ajaxfct=", - 'show_icons_selected' => $this->my_config['amm_links_show_icons'], - 'lang_selected' => $user['language'], - 'fromlang' => substr($user['language'],0,2) - ); - - $template_datas['language_list'] = array(); - foreach($this->my_config['amm_links_title'] as $key => $val) - { - $template_datas['language_list'][] = array( - 'LANG' => $key, - 'MENUBARTIT' => base64_decode($val) - ); - } - - - - $lang=get_languages(); - foreach($lang as $key => $val) - { - $template_datas['language_list_values'][] = $key; - $template_datas['language_list_labels'][] = $val; - } - - - $template_datas['yesno_values'] = array('y','n'); - $template_datas['yesno_labels'][] = l10n('g002_yesno_y'); - $template_datas['yesno_labels'][] = l10n('g002_yesno_n'); - - - $template->assign("datas", $template_datas); - $template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page'); - } - - /* - manage display for urls create/modify page - */ - private function display_links_manage_page($modeedit = 'create', $urlid=0) - { - global $template, $user; - $template->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_linkslist_edit.tpl'); - - $extensions_list=array('jpg'=>0,'jpeg'=>0,'gif'=>0,'png'=>0); - $template_icons_list=array(); - $directory=dir(dirname($this->filelocation).'/links_pictures/'); - while($file=$directory->read()) - { - if(isset($extensions_list[get_extension(strtolower($file))])) - { - $template_icons_list[]=$file; - } - } - - - if($modeedit=='modify') - { - $url=$this->get_url($urlid); - - $template_datas=array( - 'id' => $urlid, - 'modeedit' => 'modify', - 'label' => htmlentities($url['label'], ENT_QUOTES, 'UTF-8'), - 'url' => $url['url'], - 'icons_selected' => $url['icon'], - 'mode_selected' => $url['mode'], - 'visible_selected' => $url['visible'] - ); - } - else - { - $template_datas=array( - 'id' => '', - 'modeedit' => 'create', - 'label' => '', - 'url' => '', - 'icons_selected' => $template_icons_list[0], - 'mode_selected' => 0, - 'visible_selected' => 'y' - ); - } - - $template_datas['lnk_list'] = $this->page_link.'&fAMM_tabsheet=links'; - $template_datas['icons_img'] = AMM_PATH."links_pictures/".$template_datas['icons_selected']; - $template_datas['icons_values'] = array(); - foreach($template_icons_list as $key => $val) - { - $template_datas['icons_values'][] = array( - 'img' => AMM_PATH."links_pictures/".$val, - 'value' => $val, - 'label' => $val - ); - } - $template_datas['mode_values'] = array(0,1); - $template_datas['mode_labels'][] = l10n("g002_mode_".$this->urls_modes[0]); - $template_datas['mode_labels'][] = l10n("g002_mode_".$this->urls_modes[1]); - $template_datas['visible_values'] = array('y','n'); - $template_datas['visible_labels'][] = l10n('g002_yesno_y'); - $template_datas['visible_labels'][] = l10n('g002_yesno_n'); - - $template->assign("datas", $template_datas); - $template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page'); - } - - /* - manage create/modify url into database and display result - */ - protected function action_create_modify_url() - { - $datas=array( - 'id' => $_POST['famm_id'], - 'label' => $_POST['famm_label'], - 'url' => $_POST['famm_url'], - 'mode' => $_POST['famm_mode'], - 'icon' => $_POST['famm_icon'], - 'position' => 0, - 'visible' => $_POST['famm_visible'] - ); - - switch($_POST['famm_modeedit']) - { - case 'create': - $this->add_url($datas); - break; - case 'modify': - $this->modify_url($datas); - } - } - - /* - manage urls config save into database - */ - protected function action_links_modify_config() - { - $this->my_config['amm_links_show_icons']=$_POST['famm_links_show_icons']; - $languages=get_languages(); - foreach($languages as $key => $val) - { - $this->my_config['amm_links_title'][$key]=base64_encode($_POST['famm_links_title_'.$key]); - } - $this->save_config(); - } - - /* - manage randompic config save into database - */ - protected function action_randompic_modify_config() - { - $this->my_config['amm_randompicture_showname']=$_POST['famm_randompicture_showname']; - $this->my_config['amm_randompicture_showcomment']=$_POST['famm_randompicture_showcomment']; - $languages=get_languages(); - foreach($languages as $key => $val) - { - $this->my_config['amm_randompicture_title'][$key]=base64_encode(stripslashes($_POST['famm_randompicture_title_'.$key])); - } - $this->save_config(); - } - - - - /* - manage display for sections table page - */ - private function display_sections_list_page($action) - { - global $template, $user; - $template->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_sections.tpl'); - - switch($action) - { - case 'list': - $tmp_list=array( - array('separator' => '', 'link' => '', 'label' => 'g002_sectionslist'), - array('separator' => ' / ', 'link' => $this->page_link.'&fAMM_tabsheet=setmenu&action=modmenu', 'label' => 'g002_modmenu'), - array('separator' => ' / ', 'link' => $this->page_link.'&fAMM_tabsheet=setmenu&action=modspecial', 'label' => 'g002_modspecial') - ); - break; - case 'modmenu': - $tmp_list=array( - array('separator' => '', 'link' => $this->page_link.'&fAMM_tabsheet=setmenu&action=list', 'label' => 'g002_sectionslist'), - array('separator' => ' / ', 'link' => '', 'label' => 'g002_modmenu'), - array('separator' => ' / ', 'link' => $this->page_link.'&fAMM_tabsheet=setmenu&action=modspecial', 'label' => 'g002_modspecial') - ); - break; - case 'modspecial': - $tmp_list=array( - array('separator' => '', 'link' => $this->page_link.'&fAMM_tabsheet=setmenu&action=list', 'label' => 'g002_sectionslist'), - array('separator' => ' / ', 'link' => $this->page_link.'&fAMM_tabsheet=setmenu&action=modmenu', 'label' => 'g002_modmenu'), - array('separator' => ' / ', 'link' => '', 'label' => 'g002_modspecial') - ); - break; - } - - $template_datas=array( - 'AMM_AJAX_URL_LIST' => $this->page_link."&ajaxfct=setmenu_".$action."_", - 'LIST' => $tmp_list - ); - - $template->assign("datas", $template_datas); - $template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page'); - } - - - /* - manage display for randompic config page - */ - private function display_randompic_config_page() - { - global $template, $user; - $template->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_randompicconfig.tpl'); - - $template_datas=array( - 'lnk_list' => $this->page_link.'&fAMM_tabsheet=links', - 'showname_selected' => $this->my_config['amm_randompicture_showname'], - 'showcomment_selected' => $this->my_config['amm_randompicture_showcomment'], - 'lang_selected' => $user['language'], - 'fromlang' => substr($user['language'],0,2) - ); - - $template_datas['language_list'] = array(); - foreach($this->my_config['amm_randompicture_title'] as $key => $val) - { - $template_datas['language_list'][] = array( - 'LANG' => $key, - 'MENUBARTIT' => htmlentities(base64_decode($val), ENT_QUOTES, 'UTF-8') - ); - } - - - - $lang=get_languages(); - foreach($lang as $key => $val) - { - $template_datas['language_list_values'][] = $key; - $template_datas['language_list_labels'][] = $val; - } - - - $template_datas['yesno_values'] = array('y','n'); - $template_datas['yesno_labels'][] = l10n('g002_yesno_y'); - $template_datas['yesno_labels'][] = l10n('g002_yesno_n'); - - $template_datas['show_values'] = array('n', 'o', 'u'); - $template_datas['show_labels'][] = l10n('g002_show_n'); - $template_datas['show_labels'][] = l10n('g002_show_o'); - $template_datas['show_labels'][] = l10n('g002_show_u'); - - - $template->assign("datas", $template_datas); - $template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page'); - } - - - - - - - - /* - manage display for personalised sections list page - */ - private function display_personalised_list_page() - { - global $template, $user; - $template->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_personalisedlist.tpl'); - - $sql="SELECT COUNT(DISTINCT ID) as countid FROM ".$this->tables['personalised']; - $result=pwg_query($sql); - if($result) - { - $tmp=mysql_fetch_row($result); - $tmp=$tmp[0]; - } - else - { - $tmp=0; - } - - if($tmp==0) - { - $tmp=l10n("g002_nosections"); - } - elseif($tmp==1) - { - $tmp="1 ".l10n("g002_section"); - } - else - { - $tmp=$tmp." ".l10n("g002_sections"); - } - - - $template_datas=array( - 'lnk_create' => $this->page_link.'&fAMM_tabsheet=personnalblock&action=create', - 'AMM_AJAX_URL_LIST' => $this->page_link."&ajaxfct=", - 'nbsections' => $tmp - ); - - $template->assign("datas", $template_datas); - $template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page'); - } - - - - /* - manage display for personalised sections create/modify page - */ - private function display_personalised_manage_page($modeedit = 'create', $sectionid=0) - { - global $template, $user; - $template->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_personalisedlist_edit.tpl'); - - $template_datas=array(); - - $lang=get_languages(); - $lang['all']=l10n('g002_all_languages'); - foreach($lang as $key => $val) - { - $template_datas['language_list_values'][] = $key; - $template_datas['language_list_labels'][] = $val; - $template_datas['language_list'][$key]=array( - 'LANG' => $key, - 'MENUBARTIT' => '', - 'MENUBARCONTENT' => '' - ); - } - - - if($modeedit=='modify') - { - $sections=$this->get_personalised($sectionid); - - $template_datas['id'] = $sectionid; - $template_datas['modeedit'] = 'modify'; - $template_datas['visible_selected'] = $sections[0]['visible']; - $template_datas['nfo'] = htmlentities($sections[0]['nfo'], ENT_QUOTES, 'UTF-8'); - - foreach($sections as $key => $val) - { - $lang=($val['lang']=='*')?'all':$val['lang']; - $template_datas['language_list'][$lang] = array( - 'LANG' => $lang, - 'MENUBARTIT' => htmlentities($val['title'], ENT_QUOTES, 'UTF-8'), - 'MENUBARCONTENT' => htmlentities($val['content'], ENT_QUOTES, 'UTF-8'), - ); - } - } - else - { - $template_datas['nfo'] = ''; - $template_datas['id'] = ''; - $template_datas['modeedit'] = 'create'; - $template_datas['visible_selected'] = 'y'; - } - - $template_datas['lang_selected'] = $user['language']; - - $template_datas['personalised_list'] = $this->page_link.'&fAMM_tabsheet=personnalblock'; - $template_datas['yesno_values'] = array('y','n'); - $template_datas['yesno_labels'][] = l10n('g002_yesno_y'); - $template_datas['yesno_labels'][] = l10n('g002_yesno_n'); - - $template->assign("datas", $template_datas); - $template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page'); - } - - /* - manage create/modify pesonalised sections into database and display result - */ - protected function action_create_modify_personalised() - { - global $user; - - if($_POST['famm_modeedit']=='create') - { - $id=$this->get_personalised_id(); - } - else - { - $id=$_POST['famm_id']; - } - $languages=get_languages(); - $languages['all']='*'; - foreach($languages as $key => $val) - { - $datas=array( - 'id' => $id, - 'lang' => ($key=='all')?'*':$key, - 'visible' => $_POST['famm_personalised_visible'], - 'nfo' => ($_POST['famm_personalised_nfo']=='')?$_POST['famm_personalised_title_'.$user['language']]:$_POST['famm_personalised_nfo'], - 'title' => $_POST['famm_personalised_title_'.$key], - 'content' => $_POST['famm_personalised_content_'.$key] - ); - switch($_POST['famm_modeedit']) - { - case 'create': - $this->add_personalised($datas); - break; - case 'modify': - $this->modify_personalised($datas); - } - } - } - - - - - - /* - manage adviser profile - return true if user is adviser - */ - protected function adviser_abort() - { - if(is_adviser()) - { - $this->display_result(l10n("g002_adviser_not_allowed"), false); - return(true); - } - return(false); - } - - /* --------------------------------------------------------------------------- - functions to manage urls tables - --------------------------------------------------------------------------- */ - // protected function get_urls() - // protected function get_count_url() - // => defined in root class - - // return properties of an given url - private function get_url($url_id) - { - $returned=array(); - $sql="SELECT * FROM ".$this->tables['urls']." WHERE id = '".$url_id."'"; - $result=pwg_query($sql); - if($result) - { - $returned=mysql_fetch_array($result); - //$returned['label']=stripslashes($returned['label']); - } - return($returned); - } - - // permut position of two 2 urls - private function permut_url($url_id, $url_permut) - { - $sql="SELECT id, position FROM ".$this->tables['urls']." WHERE id IN ('".$url_id."','".$url_permut."')"; - $result=pwg_query($sql); - if($result) - { - $tmp=array(); - while($row=mysql_fetch_array($result)) - { - $tmp[$row['id']]=$row['position']; - } - $sql="UPDATE ".$this->tables['urls']." SET position = ".$tmp[$url_id]." WHERE id = '".$url_permut."'"; - pwg_query($sql); - $sql="UPDATE ".$this->tables['urls']." SET position = ".$tmp[$url_permut]." WHERE id = '".$url_id."'"; - pwg_query($sql); - } - } - - // delete an url - private function delete_url($url_id) - { - $sql="DELETE FROM ".$this->tables['urls']." WHERE id = '".$url_id."' "; - return(pwg_query($sql)); - } - - // add an url - private function add_url($datas) - { - $numurl=$this->get_count_url(); - $sql="INSERT INTO ".$this->tables['urls']." (label, url, mode, icon, position, visible) - VALUES ('".$datas['label']."', '".$datas['url']."', '".$datas['mode']."', - '".$datas['icon']."', '".$numurl."', '".$datas['visible']."')"; - return(pwg_query($sql)); - } - - // modify an url - private function modify_url($datas) - { - $sql="UPDATE ".$this->tables['urls']." SET label = '".$datas['label']."', - url = '".$datas['url']."', mode = '".$datas['mode']."', icon = '".$datas['icon']."', - visible = '".$datas['visible']."' - WHERE id = '".$datas['id']."'"; - return(pwg_query($sql)); - } - - // just modify url visibility - private function set_url_visibility($urlid, $visible) - { - $sql="UPDATE ".$this->tables['urls']." SET visible = '".$visible."' - WHERE id = '".$urlid."'"; - return(pwg_query($sql)); - } - - /* --------------------------------------------------------------------------- - functions to manage sections tables - --------------------------------------------------------------------------- */ - // protected function get_sections($only_visible=false, $lang="") - // => defined in root class - - // return properties of a given section (return each languages) - private function get_personalised($section_id) - { - $returned=array(); - $sql="SELECT * FROM ".$this->tables['personalised']." WHERE id = '".$section_id."'"; - $result=pwg_query($sql); - if($result) - { - while($returned[]=mysql_fetch_array($result)); - } - return($returned); - } - - // delete a section - private function delete_personalised($section_id) - { - $sql="DELETE FROM ".$this->tables['personalised']." WHERE id = '".$section_id."' "; - return(pwg_query($sql)); - } - - // add a section - private function add_personalised($datas) - { - $sql="INSERT INTO ".$this->tables['personalised']." (id, lang, title, content, visible, nfo) - VALUES ('".$datas['id']."', '".$datas['lang']."', '".$datas['title']."', '".$datas['content']."', '".$datas['visible']."', '".$datas['nfo']."')"; - return(pwg_query($sql)); - } - - // modify a section - private function modify_personalised($datas) - { - $sql="UPDATE ".$this->tables['personalised']." SET title = '".$datas['title']."', - content = '".$datas['content']."', visible = '".$datas['visible']."', - nfo = '".$datas['nfo']."' - WHERE id = '".$datas['id']."' - AND lang = '".$datas['lang']."'"; - return(pwg_query($sql)); - } - - // return the next personalised id - private function get_personalised_id() - { - $sql='SELECT MAX(ID) FROM '.$this->tables['personalised']; - $result=pwg_query($sql); - if($result) - { - $row=mysql_fetch_row($result); - if(is_array($row)) - { - return($row[0]+1); - } - } - return(0); - } - - - /* --------------------------------------------------------------------------- - ajax functions - --------------------------------------------------------------------------- */ - - // return a html formatted list of urls - private function ajax_amm_links_list() - { - global $template, $user; - $local_tpl = new Template(AMM_PATH."admin/", ""); - $local_tpl->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_linkslist_detail.tpl'); - - $template_datas['urls']=array(); - $urls=$this->get_urls(); - for($i=0;$i AMM_PATH."links_pictures/".$urls[$i]['icon'], - 'label' => $urls[$i]['label'], - 'url' => $urls[$i]['url'], - 'mode' => l10n("g002_mode_".$this->urls_modes[$urls[$i]['mode']]), - 'up' => ($i==0)?false:true, - 'down' => ($i<(count($urls)-1))?true:false, - 'edit' => $this->page_link.'&fAMM_tabsheet=links&action=modify&fItem='.$urls[$i]['id'], - 'ID' => $urls[$i]['id'], - 'IDPREV' => ($i==0)?0:$urls[$i-1]['id'], - 'IDNEXT' => ($i<(count($urls)-1))?$urls[$i+1]['id']:0, - 'visible' => l10n('g002_yesno_'.$urls[$i]['visible']) - ); - } - - $themeconf=array( - 'icon_dir' => $template->get_themeconf('icon_dir') - ); - - $local_tpl->assign('themeconf', $themeconf); - $local_tpl->assign('datas', $template_datas); - $local_tpl->assign('plugin', array('PATH' => AMM_PATH)); - - return($local_tpl->parse('body_page', true)); - } - - // permut position of 2 urls and returns a html formatted list of urls - private function ajax_amm_links_permut($urlid, $urlpermut) - { - $this->permut_url($urlid, $urlpermut); - return($this->ajax_amm_links_list()); - } - - // delete an url and returns a html formatted list of urls - private function ajax_amm_links_delete($urlid) - { - if(!$this->adviser_abort()) - { - $this->delete_url($urlid); - } - return($this->ajax_amm_links_list()); - } - - - - - // return a html formatted list of menu's sections - private function ajax_amm_setmenu_list_section_list() - { - global $menu; - $local_tpl = new Template(AMM_PATH."admin/", ""); - $local_tpl->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_sectionslist_detail.tpl'); - - $sections=$menu->registered(); - $i=0; - foreach($sections as $key => $val) - { - $template_datas['sections'][]=array( - 'OWNER' => $val['OWNER'], - 'NAME' => l10n($val['NAME']), - 'ID' => $key, - 'VISIBLE' => l10n('g002_yesno_'.$this->my_config['amm_sections_visible'][$key]), - 'POSITION' => $val['POSITION'], - 'NEXTPOS' => $val['POSITION']+2, - 'PREVPOS' => $val['POSITION']-1, - 'up' => ($i==0)?false:true, - 'down' => ($i<(count($sections)-1))?true:false - ); - $i++; - } - - $local_tpl->assign('datas', $template_datas); - $local_tpl->assign('plugin', array('PATH' => AMM_PATH)); - - return($local_tpl->parse('body_page', true)); - } - - // move item to the specified position - private function ajax_amm_setmenu_list_section_position($urlid, $position) - { - global $menu; - - $menu->register_position($urlid, $position); - return($this->ajax_amm_setmenu_list_section_list()); - } - - // show/hide item to the specified position - private function ajax_amm_setmenu_list_section_showhide($urlid) - { - $switchvisible=array('y'=>'n', 'n'=>'y'); - - $this->my_config['amm_sections_visible'][$urlid]=$switchvisible[$this->my_config['amm_sections_visible'][$urlid]]; - $this->save_config(); - - return($this->ajax_amm_setmenu_list_section_list()); - } - - // return a html formatted list of personalised sections - private function ajax_amm_personalised_list() - { - global $template, $user; - $local_tpl = new Template(AMM_PATH."admin/", ""); - $local_tpl->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_personalisedlist_detail.tpl'); - - $template_datas['sections']=array(); - - $sections=$this->get_sections(false, '', false); - $is_done=array(); - foreach($sections as $key => $val) - { - if(!isset($is_done[$val['id']])) - { - $template_datas['sections'][]=array( - 'title' => ($val['title']!='')?$val['title']:l10n('g002_notitle'), - 'edit' => $this->page_link.'&fAMM_tabsheet=personnalblock&action=modify&fItem='.$val['id'], - 'ID' => $val['id'], - 'visible' => l10n('g002_yesno_'.$val['visible']), - 'nfo' => $val['nfo'] - ); - $is_done[$val['id']]=''; - } - } - - $themeconf=array( - 'icon_dir' => $template->get_themeconf('icon_dir') - ); - - $local_tpl->assign('themeconf', $themeconf); - $local_tpl->assign('datas', $template_datas); - $local_tpl->assign('plugin', array('PATH' => AMM_PATH)); - - return($local_tpl->parse('body_page', true)); - } - - // delete a section and returns a html formatted list - private function ajax_amm_personalised_delete($sectionid) - { - if(!$this->adviser_abort()) - { - $this->delete_personalised($sectionid); - } - return($this->ajax_amm_personalised_list()); - } - - - - - // return a html formatted list of special menu sections items - private function ajax_amm_setmenu_mod_section_list($menuname) - { - $local_tpl = new Template(AMM_PATH."admin/", ""); - $local_tpl->set_filename('body_page', - dirname($this->filelocation).'/admin/amm_sectionsmod_detail.tpl'); - - $template_datas = array('LIST' => array()); - foreach($this->my_config[$menuname] as $key => $val) - { - $template_datas['LIST'][] = array( - 'ID' => base64_encode($key), - 'LABEL' => $key, - 'VISIBLE' => 'g002_yesno_'.$val - ); - } - - $local_tpl->assign('datas', $template_datas); - $local_tpl->assign('plugin', array('PATH' => AMM_PATH)); - - return($local_tpl->parse('body_page', true)); - } - - - // move item to the specified position - private function ajax_amm_setmenu_mod_section_showhide($menuname, $urlid) - { - $switchvisible=array('y'=>'n', 'n'=>'y'); - - $this->my_config[$menuname][base64_decode($urlid)]=$switchvisible[$this->my_config[$menuname][base64_decode($urlid)]]; - $this->save_config(); - - return($this->ajax_amm_setmenu_mod_section_list($menuname)); - } - - - - -} // AMM_AIP class - - -?> diff --git a/plugins/AMenuManager/amm_install.class.inc.php b/plugins/AMenuManager/amm_install.class.inc.php deleted file mode 100644 index db1926a0a..000000000 --- a/plugins/AMenuManager/amm_install.class.inc.php +++ /dev/null @@ -1,94 +0,0 @@ -> - ------------------------------------------------------------------------------ - See main.inc.php for release information - - MyPolls_Install : classe to manage plugin install - - --------------------------------------------------------------------------- */ - @include_once('amm_root.class.inc.php'); - include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/tables.class.inc.php'); - - - class AMM_install extends AMM_root - { - private $tablef; - private $exportfile; - - public function AMM_install($prefixeTable, $filelocation) - { - parent::__construct($prefixeTable, $filelocation); - $this->tablef= new manage_tables($this->tables); - $this->exportfile=dirname($this->filelocation).'/'.$this->plugin_name_files.'.sql'; - } - - /* - function for installation process - return true if install process is ok, otherwise false - */ - public function install() - { - - $tables_def=array( -"CREATE TABLE `".$this->tables['urls']."` ( - `id` int(11) NOT NULL auto_increment, - `label` varchar(50) NOT NULL default '', - `url` varchar(255) NOT NULL default '', - `mode` int(11) NOT NULL default '0', - `icon` varchar(50) NOT NULL default '', - `position` int(11) NOT NULL default '0', - `visible` char(1) NOT NULL default 'y', - PRIMARY KEY (`id`), - KEY `order_key` (`position`) -)", - -"CREATE TABLE `".$this->tables['personalised']."` ( - `id` int(11) NOT NULL default '0', - `lang` varchar(5) NOT NULL default '', - `title` varchar(50) NOT NULL default '', - `content` text NOT NULL, - `visible` char(1) NOT NULL default 'y', - `nfo` varchar(25) NOT NULL default '', - PRIMARY KEY (`id`,`lang`) -)" -); - //$table_def array - $tables_def = create_table_add_character_set($tables_def); - $result=$this->tablef->create_tables($tables_def); - return($result); - } - - - /* - function for uninstall process - */ - public function uninstall() - { - $this->tablef->export($this->exportfile); - $this->delete_config(); - $this->tablef->drop_tables(); - } - - public function activate() - { - global $template; - - $this->init_config(); - $this->load_config(); - $this->save_config(); - } - - public function deactivate() - { - } - - } //class - -?> diff --git a/plugins/AMenuManager/amm_pip.class.inc.php b/plugins/AMenuManager/amm_pip.class.inc.php deleted file mode 100644 index 98c9730ec..000000000 --- a/plugins/AMenuManager/amm_pip.class.inc.php +++ /dev/null @@ -1,156 +0,0 @@ -> - ------------------------------------------------------------------------------ - See main.inc.php for release information - - PIP classe => manage integration in public interface - - --------------------------------------------------------------------------- */ -if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } - -include_once(PHPWG_PLUGINS_PATH.'AMenuManager/amm_root.class.inc.php'); - -class AMM_PIP extends AMM_root -{ - function AMM_PIP($prefixeTable, $filelocation) - { - parent::__construct($prefixeTable, $filelocation); - - $this->load_config(); - $this->init_events(); - } - - - /* --------------------------------------------------------------------------- - Public classe functions - --------------------------------------------------------------------------- */ - - - /* - initialize events call for the plugin - */ - public function init_events() - { - //TODELETE: add_event_handler('loc_begin_menubar', array(&$this, 'modify_menu') ); - parent::init_events(); - add_event_handler('blockmanager_apply', array(&$this, 'blockmanager_apply') ); - } - - public function blockmanager_apply( $menu_ref_arr ) - { - $menu = & $menu_ref_arr[0]; - - /* - Add a new random picture section - */ - if ( ($block = $menu->get_block( 'mbAMM_randompict' ) ) != null ) - { - $sql="SELECT i.id as image_id, i.file as image_file, i.comment, i.path, i.tn_ext, c.id as catid, c.name, c.permalink, RAND() as rndvalue, i.name as imgname -FROM ".CATEGORIES_TABLE." c, ".IMAGES_TABLE." i, ".IMAGE_CATEGORY_TABLE." ic -WHERE c.status='public' - AND c.id = ic.category_id - AND ic.image_id = i.id -ORDER BY rndvalue -LIMIT 0,1 -"; - $result = pwg_query($sql); - if($result and $nfo = mysql_fetch_array($result)) - { - $nfo['section']='category'; - $nfo['category']=array( - 'id' => $nfo['catid'], - 'name' => $nfo['name'], - 'permalink' => $nfo['permalink'] - ); - global $user; - $block->set_title( base64_decode($this->my_config['amm_randompicture_title'][$user['language']]) ); - $block->template = dirname(__FILE__).'/menu_templates/menubar_randompic.tpl'; - $block->data = array( - 'LINK' => make_picture_url($nfo), - 'IMG' => get_thumbnail_url($nfo), - 'IMGNAME' => $nfo['imgname'], - 'IMGCOMMENT' => $nfo['comment'], - 'SHOWNAME' => $this->my_config['amm_randompicture_showname'], - 'SHOWCOMMENT' => $this->my_config['amm_randompicture_showcomment'] - ); - } - } - - /* - Add a new section (links) - */ - if ( ($block = $menu->get_block( 'mbAMM_links' ) ) != null ) - { - $urls=$this->get_urls(true); - if ( count($urls)>0 ) - { - if($this->my_config['amm_links_show_icons']=='y') - { - for($i=0;$iset_title( base64_decode($this->my_config['amm_links_title'][$user['language']]) ); - $block->template = dirname(__FILE__).'/menu_templates/menubar_links.tpl'; - - $block->data = array( - 'LINKS' => $urls, - 'icons' => $this->my_config['amm_links_show_icons'] - ); - } - } - - /* - Add personnal blocks random picture section - */ - $sections=$this->get_sections(true); - - if(count($sections)) - { - $id_done=array(); - foreach($sections as $key => $val) - { - if(!isset($id_done[$val['id']])) - { - if ( ($block = $menu->get_block( 'mbAMM_personalised'.$val['id'] ) ) != null ) - { - $block->set_title( $val['title'] ); - $block->template = dirname(__FILE__).'/menu_templates/menubar_personalised.tpl'; - $block->data = stripslashes($val['content']); - } - $id_done[$val['id']]=""; - } - } - } - - /* - hide items from special & menu sections - */ - foreach(array('mbMenu' => 'amm_sections_modmenu', 'mbSpecials' =>'amm_sections_modspecials') as $key0 => $val0) - { - if ( ($block = $menu->get_block( $key0 ) ) != null ) - { - foreach($this->my_config[$val0] as $key => $val) - { - if($val=='n') - { - unset( $block->data[$key] ); - } - } - } - } - } - -} // AMM_PIP class - - -?> diff --git a/plugins/AMenuManager/amm_root.class.inc.php b/plugins/AMenuManager/amm_root.class.inc.php deleted file mode 100644 index 38440a2d0..000000000 --- a/plugins/AMenuManager/amm_root.class.inc.php +++ /dev/null @@ -1,193 +0,0 @@ -> - ------------------------------------------------------------------------------ - See main.inc.php for release information - - AMM_root : root classe for plugin - - --------------------------------------------------------------------------- */ - -if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } - -include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/common_plugin.class.inc.php'); - -class AMM_root extends common_plugin -{ - function AMM_root($prefixeTable, $filelocation) - { - $this->plugin_name="Advanced Menu Manager"; - $this->plugin_name_files="amm"; - parent::__construct($prefixeTable, $filelocation); - - $list=array('urls', 'personalised'); - $this->set_tables_list($list); - } - - /* --------------------------------------------------------------------------- - common AIP & PIP functions - --------------------------------------------------------------------------- */ - - /* this function initialize var $my_config with default values */ - public function init_config() - { - $this->my_config=array( - 'amm_links_show_icons' => 'y', - 'amm_links_title' => array(), - 'amm_randompicture_showname' => 'n', //n:no, o:over, u:under - 'amm_randompicture_showcomment' => 'n', //n:no, o:over, u:under - 'amm_randompicture_title' => array(), - 'amm_sections_modspecials' => array( - 'favorites' => 'y', - 'most_visited' => 'y', - 'best_rated' => 'y', - 'random' => 'y', - 'recent_pics' => 'y', - 'recent_cats' => 'y', - 'calendar' => 'y' - ), - 'amm_sections_modmenu' => array( - 'qsearch' => 'y', - 'tags' => 'y', - 'search' => 'y', - 'comments' => 'y', - 'about' => 'y', - 'notification' => 'y' - ) - ); - - $languages=get_languages(); - foreach($languages as $key => $val) - { - if($key=='fr_FR') - { - $this->my_config['amm_links_title'][$key]=base64_encode('Liens'); - $this->my_config['amm_randompicture_title'][$key]=base64_encode('Une image au hasard'); - } - else - { - $this->my_config['amm_links_title'][$key]=base64_encode('Links'); - $this->my_config['amm_randompicture_title'][$key]=base64_encode('A random picture'); - } - } - - } - - public function load_config() - { - parent::load_config(); - } - - public function init_events() - { - add_event_handler('blockmanager_register_blocks', array(&$this, 'register_blocks') ); - } - - public function register_blocks( $menu_ref_arr ) - { - $menu = & $menu_ref_arr[0]; - if ($menu->get_id() != 'menubar') - return; - $menu->register_block( new RegisteredBlock( 'mbAMM_randompict', 'Random pictures', 'AMM')); - $menu->register_block( new RegisteredBlock( 'mbAMM_links', 'Links', 'AMM')); - - $sections=$this->get_sections(true); - if(count($sections)) - { - $id_done=array(); - foreach($sections as $key => $val) - { - if(!isset($id_done[$val['id']])) - { - $menu->register_block( new RegisteredBlock( 'mbAMM_personalised'.$val['id'], $val['title'], 'AMM')); - $id_done[$val['id']]=""; - } - } - } - } - - // return an array of urls (each url is an array) - protected function get_urls($only_visible=false) - { - $returned=array(); - $sql="SELECT * FROM ".$this->tables['urls']; - if($only_visible) - { - $sql.=" WHERE visible = 'y' "; - } - $sql.=" ORDER BY position"; - $result=pwg_query($sql); - if($result) - { - while($row=mysql_fetch_array($result)) - { - $row['label']=stripslashes($row['label']); - $returned[]=$row; - } - } - return($returned); - } - - //return number of url - protected function get_count_url($only_visible=false) - { - $returned=0; - $sql="SELECT count(id) FROM ".$this->tables['urls']; - if($only_visible) - { - $sql.=" WHERE visible = 'y' "; - } - $result=pwg_query($sql); - if($result) - { - $tmp=mysql_fetch_row($result); - $returned=$tmp[0]; - } - return($returned); - } - - // return an array of sections (each section is an array) - protected function get_sections($only_visible=false, $lang="", $only_with_content=true) - { - global $user; - - if($lang=="") - { - $lang=$user['language']; - } - - $returned=array(); - $sql="SELECT * FROM ".$this->tables['personalised']." -WHERE (lang = '*' OR lang = '".$lang."') "; - if($only_visible) - { - $sql.=" AND visible = 'y' "; - } - if($only_with_content) - { - $sql.=" AND content != '' "; - } - $sql.=" ORDER BY id, lang DESC "; - $result=pwg_query($sql); - if($result) - { - while($row=mysql_fetch_array($result)) - { - $returned[]=$row; - } - } - return($returned); - } - - - -} // amm_root class - - -?> diff --git a/plugins/AMenuManager/index.php b/plugins/AMenuManager/index.php deleted file mode 100755 index db1eae0d9..000000000 --- a/plugins/AMenuManager/index.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/plugins/AMenuManager/language/de_DE/index.php b/plugins/AMenuManager/language/de_DE/index.php deleted file mode 100644 index 61741e9cb..000000000 --- a/plugins/AMenuManager/language/de_DE/index.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/plugins/AMenuManager/language/de_DE/plugin.lang.php b/plugins/AMenuManager/language/de_DE/plugin.lang.php deleted file mode 100644 index a54a23d51..000000000 --- a/plugins/AMenuManager/language/de_DE/plugin.lang.php +++ /dev/null @@ -1,89 +0,0 @@ -Grum Plugin Klassen ist nicht installiert'; - -$lang['g002_title_page'] = 'Advanced Menu Management'; -$lang['g002_version'] = 'r'; - -$lang['g002_error_invalid_ajax_call'] = "Ungültige Funktion Anruf!"; - -$lang['g002_setmenu'] = 'Menü-Management'; -$lang['g002_addlinks'] = 'Links'; -$lang['g002_randompict'] = 'Zufallsbild'; -$lang['g002_personnalblock'] = 'Personalisierte Menü'; - -$lang['g002_setmenu_nfo'] = 'Management der angezeigten Menü Blöcke'; -$lang['g002_addlinks_nfo'] = 'Abschnitt für die Anzeige in dem Menü eine Liste mit Links zu anderen Websites'; -$lang['g002_randompict_nfo'] = 'Abschnitt für die Anzeige in dem Menü einer Aufnahme zufällig in der Galerie'; -$lang['g002_personnalblock_nfo'] = 'Anzeige Personalisierte in Blöcke Menü'; - - -$lang['g002_mode_new_window'] = 'Neues Fenster'; -$lang['g002_mode_current_window'] = 'Aktuelle Fenster'; -$lang['g002_addlink'] = 'Link hinzufügen'; -$lang['g002_label'] = 'Wortlaut'; -$lang['g002_url'] = 'URL'; -$lang['g002_mode'] = 'Mode'; -$lang['g002_icon'] = 'Repräsentatives Bild'; -$lang['g002_visible'] = 'Sichtbare'; -$lang['g002_linkslist'] = "Links Liste"; -$lang['g002_confirm_delete_link'] = "Link Löschen?"; -$lang['g002_nolinks'] = 'Keine Links'; -$lang['g002_link'] = 'Link'; -$lang['g002_links'] = 'Links'; - -$lang['g002_createoflink'] = 'Link hinzufügen'; -$lang['g002_editoflink'] = 'Link Bearbeiten'; -$lang['g002_createthelink'] = 'Link hinzufügen'; -$lang['g002_editthelink'] = 'Link Bearbeiten'; - -$lang['g002_configlinks'] = 'Links Einstellungen'; -$lang['g002_setting_link_links']='Links'; -$lang['g002_setting_link_show_icon'] = 'Anzeige Links repräsentatives Bild'; - -$lang['g002_setting_block_menu'] = 'Menü Integration'; -$lang['g002_setting_block_active'] = 'Anzeigen der Abschnitt in dem Menü'; -$lang['g002_setting_block_title'] = 'Titel des Abschnitts in dem Menü'; -$lang['g002_apply'] = 'Anwenden'; - -$lang['g002_sectionslist'] = 'Menü-Abschnitte'; - -$lang['g002_yesno_y'] = 'Ja'; -$lang['g002_yesno_n'] = 'Nein'; - -$lang['g002_owner'] = 'Eigentümer'; -$lang['g002_sectionid'] = 'Benutzername'; -$lang['g002_name'] = 'Wortlaut'; - -$lang['g002_translate'] = 'Übersetzen mit Google Translate'; - -$lang['g002_configrandompic'] = 'Konfiguration des Zufallsbild'; -$lang['g002_setting_randompic_aboutpicture'] = 'Angezeigt Daten'; -$lang['g002_setting_randompic_showname'] = 'Anzuzeigen des Bildes Namen'; -$lang['g002_setting_randompic_showcomment'] = 'Bild Kommentar ansehen'; -$lang['g002_show_n'] = 'Nein'; -$lang['g002_show_o'] = 'Anzeige über das Bild'; -$lang['g002_show_u'] = 'Anzeige unter das Bild'; - -$lang['g002_personalisedlist'] = "Liste der personalisierten Abschnitte"; -$lang['g002_notitle'] = '[Ohne Titel]'; -$lang['g002_title'] = 'Titel'; -$lang['g002_sections'] = 'Abschnitte'; -$lang['g002_section'] = 'Abschnitt'; -$lang['g002_nosections'] = 'Kein Abschnitte'; -$lang['g002_addsection'] = 'Hinzufügen neue Abschnitt'; -$lang['g002_createofpersonalised'] = 'Erstellen eine neue personalisierte Abschnitt'; -$lang['g002_editofpersonalised'] = 'Ändern eine personalisierte Abschnitt'; -$lang['g002_setting_block_langchoice'] = 'Sprachwahl'; -$lang['g002_setting_personalised_content'] = 'Inhalt des Abschnitts'; -$lang['g002_setting_personalised_properties'] = 'Eigenschaften'; -$lang['g002_setting_personalised_nfo'] = 'Beschreibung'; - -$lang['g002_all_languages'] = "Alle Sprachen"; - -$lang['g002_modmenu'] = '\'Menü\' Abschnitt'; -$lang['g002_modspecial'] = '\'speciale\' Abschnitt'; -$lang['g002_labelmenu'] = 'Menü Wortlaut'; - - -?> diff --git a/plugins/AMenuManager/language/en_UK/index.php b/plugins/AMenuManager/language/en_UK/index.php deleted file mode 100755 index db1eae0d9..000000000 --- a/plugins/AMenuManager/language/en_UK/index.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/plugins/AMenuManager/language/en_UK/plugin.lang.php b/plugins/AMenuManager/language/en_UK/plugin.lang.php deleted file mode 100755 index a0514fe2c..000000000 --- a/plugins/AMenuManager/language/en_UK/plugin.lang.php +++ /dev/null @@ -1,89 +0,0 @@ -Grum Plugin Classes in not installed'; - -$lang['g002_title_page'] = 'Advanced Menu Management'; -$lang['g002_version'] = 'r'; - -$lang['g002_error_invalid_ajax_call'] = "Invalid function call !"; - -$lang['g002_setmenu'] = 'Menu management'; -$lang['g002_addlinks'] = 'Links'; -$lang['g002_randompict'] = 'Random picture'; -$lang['g002_personnalblock'] = 'Personalised menu'; - -$lang['g002_setmenu_nfo'] = 'Management of displayed menu\'s blocks'; -$lang['g002_addlinks_nfo'] = 'Menu\'s block allowing to display a list of hyperlink'; -$lang['g002_randompict_nfo'] = 'Menu\'s block allowing to display a random picture from the gallery'; -$lang['g002_personnalblock_nfo'] = 'Display personalised blocks into menu'; - - -$lang['g002_mode_new_window'] = 'New window'; -$lang['g002_mode_current_window'] = 'Current window'; -$lang['g002_addlink'] = 'Add a link'; -$lang['g002_label'] = 'Label'; -$lang['g002_url'] = 'URL'; -$lang['g002_mode'] = 'Mode'; -$lang['g002_icon'] = 'Representative picture'; -$lang['g002_visible'] = 'Visible'; -$lang['g002_linkslist'] = "Links list"; -$lang['g002_confirm_delete_link'] = "Delete link ?"; -$lang['g002_nolinks'] = 'No links'; -$lang['g002_link'] = 'link'; -$lang['g002_links'] = 'links'; - -$lang['g002_createoflink'] = 'Add link'; -$lang['g002_editoflink'] = 'Edit link'; -$lang['g002_createthelink'] = 'Add link'; -$lang['g002_editthelink'] = 'Edit link'; - -$lang['g002_configlinks'] = 'Links settings'; -$lang['g002_setting_link_links']='Links'; -$lang['g002_setting_link_show_icon'] = 'Display links representative picture'; - -$lang['g002_setting_block_menu'] = 'Menu integration'; -$lang['g002_setting_block_active'] = 'Display block in menu'; -$lang['g002_setting_block_title'] = 'Block title'; -$lang['g002_apply'] = 'Apply'; - -$lang['g002_sectionslist'] = 'Menu\'s blocks'; - -$lang['g002_yesno_y'] = 'Yes'; -$lang['g002_yesno_n'] = 'No'; - -$lang['g002_owner'] = 'Owner'; -$lang['g002_sectionid'] = 'Identifier'; -$lang['g002_name'] = 'Label'; - -$lang['g002_translate'] = 'Translate with Google Translate'; - -$lang['g002_configrandompic'] = 'Random picture settings'; -$lang['g002_setting_randompic_aboutpicture'] = 'Displayed datas'; -$lang['g002_setting_randompic_showname'] = 'Show picture\'s name'; -$lang['g002_setting_randompic_showcomment'] = 'Show picure\'s comment'; -$lang['g002_show_n'] = 'No'; -$lang['g002_show_o'] = 'Display over the picture'; -$lang['g002_show_u'] = 'Display under thpicture'; - -$lang['g002_personalisedlist'] = "Liste of personalised blocks"; -$lang['g002_notitle'] = '[No title]'; -$lang['g002_title'] = 'Title'; -$lang['g002_sections'] = 'blocks'; -$lang['g002_section'] = 'block'; -$lang['g002_nosections'] = 'No blocks'; -$lang['g002_addsection'] = 'Add a new block'; -$lang['g002_createofpersonalised'] = 'Create a new personalized block'; -$lang['g002_editofpersonalised'] = 'Modify a personalized block'; -$lang['g002_setting_block_langchoice'] = 'Lang choice'; -$lang['g002_setting_personalised_content'] = 'Block\'s content'; -$lang['g002_setting_personalised_properties'] = 'Properties'; -$lang['g002_setting_personalised_nfo'] = 'Description'; - -$lang['g002_all_languages'] = "All languages"; - -$lang['g002_modmenu'] = '\'menu\' block'; -$lang['g002_modspecial'] = '\'special\' block'; -$lang['g002_labelmenu'] = 'Menu\'s label'; - - -?> diff --git a/plugins/AMenuManager/language/fr_FR/index.php b/plugins/AMenuManager/language/fr_FR/index.php deleted file mode 100755 index db1eae0d9..000000000 --- a/plugins/AMenuManager/language/fr_FR/index.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/plugins/AMenuManager/language/fr_FR/plugin.lang.php b/plugins/AMenuManager/language/fr_FR/plugin.lang.php deleted file mode 100755 index 27b32e611..000000000 --- a/plugins/AMenuManager/language/fr_FR/plugin.lang.php +++ /dev/null @@ -1,88 +0,0 @@ -Grum Plugin Classes n\'est pas installé'; - -$lang['g002_title_page'] = 'Gestion avancée du menu'; -$lang['g002_version'] = 'v'; - -$lang['g002_error_invalid_ajax_call'] = "Appel de fonction invalide !"; - -$lang['g002_setmenu'] = 'Gestion du menu'; -$lang['g002_addlinks'] = 'Liens'; -$lang['g002_randompict'] = 'Image aléatoire'; -$lang['g002_personnalblock'] = 'Menu personnalisé'; - -$lang['g002_setmenu_nfo'] = 'Gestion de l\'affichage des sections affichées dans le menu'; -$lang['g002_addlinks_nfo'] = 'Section permettant d\'afficher dans le menu une liste d\'hyperliens vers d\'autres sites internet'; -$lang['g002_randompict_nfo'] = 'Section permettant d\'afficher dans le menu une image prise au hasard dans la gallerie'; -$lang['g002_personnalblock_nfo'] = 'Afficher dans le menu des sections au contenu personnalisé'; - - -$lang['g002_mode_new_window'] = 'Nouvelle fenêtre'; -$lang['g002_mode_current_window'] = 'Fenêtre courante'; -$lang['g002_addlink'] = 'Ajouter un lien'; -$lang['g002_label'] = 'Libellé'; -$lang['g002_url'] = 'URL'; -$lang['g002_mode'] = 'Mode'; -$lang['g002_icon'] = 'Image'; -$lang['g002_visible'] = 'Visible'; -$lang['g002_linkslist'] = "Liste des liens"; -$lang['g002_confirm_delete_link'] = "Supprimer le lien ?"; -$lang['g002_nolinks'] = 'Pas de liens'; -$lang['g002_link'] = 'lien'; -$lang['g002_links'] = 'liens'; - -$lang['g002_createoflink'] = 'Ajout d\'un lien'; -$lang['g002_editoflink'] = 'Modification d\'un lien'; -$lang['g002_createthelink'] = 'Ajouter le lien'; -$lang['g002_editthelink'] = 'Modifier le lien'; - -$lang['g002_configlinks'] = 'Configuration des liens'; -$lang['g002_setting_link_links']='Liens'; -$lang['g002_setting_link_show_icon'] = 'Afficher les icônes de liens'; - -$lang['g002_setting_block_menu'] = 'Intégration dans le menu'; -$lang['g002_setting_block_active'] = 'Afficher la section dans le menu'; -$lang['g002_setting_block_title'] = 'Titre de la section dans le menu'; -$lang['g002_apply'] = 'Appliquer'; - -$lang['g002_sectionslist'] = 'Sections du menu'; - -$lang['g002_yesno_y'] = 'Oui'; -$lang['g002_yesno_n'] = 'Non'; - -$lang['g002_owner'] = 'Propriétaire'; -$lang['g002_sectionid'] = 'Identifiant'; -$lang['g002_name'] = 'Libellé'; - -$lang['g002_translate'] = 'Traduire avec Google Translate'; - -$lang['g002_configrandompic'] = 'Configuration de l\'image aléatoire'; -$lang['g002_setting_randompic_aboutpicture'] = 'Données affichées'; -$lang['g002_setting_randompic_showname'] = 'Afficher le nom de la photo'; -$lang['g002_setting_randompic_showcomment'] = 'Afficher le commentaire de la photo'; -$lang['g002_show_n'] = 'Non'; -$lang['g002_show_o'] = 'Afficher au-dessus de la photo'; -$lang['g002_show_u'] = 'Afficher en-dessous de la photo'; - -$lang['g002_personalisedlist'] = "Liste des sections personnalisées"; -$lang['g002_notitle'] = '[Pas de titre]'; -$lang['g002_title'] = 'Titre'; -$lang['g002_sections'] = 'sections'; -$lang['g002_section'] = 'section'; -$lang['g002_nosections'] = 'Pas de sections'; -$lang['g002_addsection'] = 'Ajouter une section'; -$lang['g002_createofpersonalised'] = 'Ajout d\'une section personnalisée'; -$lang['g002_editofpersonalised'] = 'Modification d\'une section personnalisée'; -$lang['g002_setting_block_langchoice'] = 'Choix de la langue'; -$lang['g002_setting_personalised_content'] = 'Contenu de la section'; -$lang['g002_setting_personalised_properties'] = 'Propriétés'; -$lang['g002_setting_personalised_nfo'] = 'Description'; - -$lang['g002_all_languages'] = "Toutes langues"; - -$lang['g002_modspecial'] = 'Section \'speciale\''; -$lang['g002_modmenu'] = 'Section \'menu\''; -$lang['g002_labelmenu'] = 'Libellé du menu'; - -?> diff --git a/plugins/AMenuManager/language/index.php b/plugins/AMenuManager/language/index.php deleted file mode 100755 index db1eae0d9..000000000 --- a/plugins/AMenuManager/language/index.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/plugins/AMenuManager/language/it_IT/index.php b/plugins/AMenuManager/language/it_IT/index.php deleted file mode 100644 index 61741e9cb..000000000 --- a/plugins/AMenuManager/language/it_IT/index.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/plugins/AMenuManager/language/it_IT/plugin.lang.php b/plugins/AMenuManager/language/it_IT/plugin.lang.php deleted file mode 100644 index 83753138d..000000000 --- a/plugins/AMenuManager/language/it_IT/plugin.lang.php +++ /dev/null @@ -1,88 +0,0 @@ -Grum Plugin Classes non è installato'; - -$lang['g002_title_page'] = 'Gestion avanzata dei menu'; -$lang['g002_version'] = 'v'; - -$lang['g002_error_invalid_ajax_call'] = "Chiamata alla funzione invalida !"; - -$lang['g002_setmenu'] = 'Gestione del menu'; -$lang['g002_addlinks'] = 'Links'; -$lang['g002_randompict'] = 'Immagini a caso'; -$lang['g002_personnalblock'] = 'Menu personalizzato'; - -$lang['g002_setmenu_nfo'] = 'Gestione della visualizzazione delle sezioni visualizzate nel menu'; -$lang['g002_addlinks_nfo'] = 'Sezione che permette la visualizzazione nel menu di una lista d\'hyperlinks verso altri siti internet'; -$lang['g002_randompict_nfo'] = 'Sezione che permette la visualizzazione nel menu d\'un immagine presa a caso nella galleria'; -$lang['g002_personnalblock_nfo'] = 'Visualizzare nel menu delle sezioni con un contenuto personalizzato'; - - -$lang['g002_mode_new_window'] = 'Nuova finestra'; -$lang['g002_mode_current_window'] = 'Finestra attuale'; -$lang['g002_addlink'] = 'Aggiungere un link'; -$lang['g002_label'] = 'Etichetta'; -$lang['g002_url'] = 'URL'; -$lang['g002_mode'] = 'Modo'; -$lang['g002_icon'] = 'Immagine'; -$lang['g002_visible'] = 'Visibile'; -$lang['g002_linkslist'] = 'Lista dei links'; -$lang['g002_confirm_delete_link'] = 'Cancellare il link ?'; -$lang['g002_nolinks'] = 'Nessun\' link'; -$lang['g002_link'] = 'link'; -$lang['g002_links'] = 'links'; - -$lang['g002_createoflink'] = 'Aggiungere un link'; -$lang['g002_editoflink'] = 'Modifica di un link'; -$lang['g002_createthelink'] = 'Aggiungere un link'; -$lang['g002_editthelink'] = 'Modifica di un link'; - -$lang['g002_configlinks'] = 'Configurazione dei links'; -$lang['g002_setting_link_links']='Links'; -$lang['g002_setting_link_show_icon'] = 'Visualizzare le icône dei links'; - -$lang['g002_setting_block_menu'] = 'Integrazione nel menu'; -$lang['g002_setting_block_active'] = 'Visualizzare la sezione nel menu'; -$lang['g002_setting_block_title'] = 'Titolo della sezione nel menu'; -$lang['g002_apply'] = 'Applicare'; - -$lang['g002_sectionslist'] = 'Sezioni del menu'; - -$lang['g002_yesno_y'] = 'Si'; -$lang['g002_yesno_n'] = 'No'; - -$lang['g002_owner'] = 'Proprietario'; -$lang['g002_sectionid'] = 'Id'; -$lang['g002_name'] = 'Etichetta'; - -$lang['g002_translate'] = 'Tradurre con Google Translate'; - -$lang['g002_configrandompic'] = 'Configurazione del\'immagine aleatoria'; -$lang['g002_setting_randompic_aboutpicture'] = 'Dati visualizzati'; -$lang['g002_setting_randompic_showname'] = 'Visualizzare il nome della foto'; -$lang['g002_setting_randompic_showcomment'] = 'Visualizzare i commenti della foto'; -$lang['g002_show_n'] = 'No'; -$lang['g002_show_o'] = 'Mostra sopra la foto'; -$lang['g002_show_u'] = 'Mostra sotto la foto'; - -$lang['g002_personalisedlist'] = 'Lista delle selezioni personalizzate'; -$lang['g002_notitle'] = '[Nessun\' titolo]'; -$lang['g002_title'] = 'Titolo'; -$lang['g002_sections'] = 'sezzioni'; -$lang['g002_section'] = 'sezzione'; -$lang['g002_nosections'] = 'Nessuna sezzione'; -$lang['g002_addsection'] = 'Aggiungere una sezzione'; -$lang['g002_createofpersonalised'] = 'Aggiunta d\'una sezzione personalizzata'; -$lang['g002_editofpersonalised'] = 'Modifica d\'una sezzione personalizzata'; -$lang['g002_setting_block_langchoice'] = 'Scelta della lingua'; -$lang['g002_setting_personalised_content'] = 'Contenuto della sezzione'; -$lang['g002_setting_personalised_properties'] = 'Proprietà'; -$lang['g002_setting_personalised_nfo'] = 'Description'; - -$lang['g002_all_languages'] = 'Tutte le lingue'; - -$lang['g002_modspecial'] = 'Sezzione \'speciale\''; -$lang['g002_modmenu'] = 'Sezzione \'menu\''; -$lang['g002_labelmenu'] = 'Titolo del menu'; - -?> diff --git a/plugins/AMenuManager/links_pictures/internet-url.png b/plugins/AMenuManager/links_pictures/internet-url.png deleted file mode 100644 index 4796da70d..000000000 Binary files a/plugins/AMenuManager/links_pictures/internet-url.png and /dev/null differ diff --git a/plugins/AMenuManager/links_pictures/internet.png b/plugins/AMenuManager/links_pictures/internet.png deleted file mode 100644 index e5d80c172..000000000 Binary files a/plugins/AMenuManager/links_pictures/internet.png and /dev/null differ diff --git a/plugins/AMenuManager/main.inc.php b/plugins/AMenuManager/main.inc.php deleted file mode 100755 index ac90f3c7f..000000000 --- a/plugins/AMenuManager/main.inc.php +++ /dev/null @@ -1,68 +0,0 @@ -> --------------------------------------------------------------------------------- - -:: HISTORY - -1.0.0 - 27/07/08 - - -:: TO DO - --------------------------------------------------------------------------------- - -:: NFO - AMM_AIM : classe to manage plugin integration into plugin menu - AMM_AIP : classe to manage plugin admin pages - AMM_PIP : classe to manage plugin public integration - --------------------------------------------------------------------------------- -*/ - -// pour faciliter le debug :o) -ini_set('error_reporting', E_ALL); -ini_set('display_errors', true); - -if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); - -define('AMM_DIR' , basename(dirname(__FILE__))); -define('AMM_PATH' , PHPWG_PLUGINS_PATH . AMM_DIR . '/'); - -define('AMM_VERSION' , '1.0.0'); // => ne pas oublier la version dans l'entête !! - -global $prefixeTable; - -if(defined('IN_ADMIN')) -{ - //AMM admin part loaded and active only if in admin page - include_once("amm_aim.class.inc.php"); - - $obj = new AMM_AIM($prefixeTable, __FILE__); - $obj->init_events(); - set_plugin_data($plugin['id'], $obj); -} -else -{ - //AMM public part loaded and active only if in admin page - include_once("amm_pip.class.inc.php"); - - $obj = new AMM_PIP($prefixeTable, __FILE__); - set_plugin_data($plugin['id'], $obj); -} - -?> diff --git a/plugins/AMenuManager/maintain.inc.php b/plugins/AMenuManager/maintain.inc.php deleted file mode 100755 index 3c75083c9..000000000 --- a/plugins/AMenuManager/maintain.inc.php +++ /dev/null @@ -1,57 +0,0 @@ -register('mbAMM_links', 'Links', 0, 'AMM'); - //$menu->register('mbAMM_randompict', 'Random pictures', 0, 'AMM'); - $amm=new AMM_install($prefixeTable, __FILE__); - $result=$amm->install(); - } - else - { - array_push($errors, l10n('Grum Plugin Classes is not installed')); - } -} - -function plugin_activate($plugin_id, $plugin_version, &$errors) -{ -} - -function plugin_deactivate($plugin_id) -{ -} - -function plugin_uninstall($plugin_id) -{ - global $prefixeTable; - $amm=new AMM_install($prefixeTable, __FILE__); - $result=$amm->uninstall(); -} - - - -?> diff --git a/plugins/AMenuManager/menu_templates/menubar_links.tpl b/plugins/AMenuManager/menu_templates/menubar_links.tpl deleted file mode 100644 index 205e3b66e..000000000 --- a/plugins/AMenuManager/menu_templates/menubar_links.tpl +++ /dev/null @@ -1,16 +0,0 @@ - - -{if $block->get_title() !="" } -
{$block->get_title()}
-{/if} -
-
    data.icons=='y'}style="padding-left:4px;list-style:none;"{/if}> - {foreach from=$block->data.LINKS item=link} -
  • - {if $block->data.icons=='y'}{/if} - {$link.label} -
  • - {/foreach} -
-
\ No newline at end of file diff --git a/plugins/AMenuManager/menu_templates/menubar_personalised.tpl b/plugins/AMenuManager/menu_templates/menubar_personalised.tpl deleted file mode 100644 index 9fada74a2..000000000 --- a/plugins/AMenuManager/menu_templates/menubar_personalised.tpl +++ /dev/null @@ -1,8 +0,0 @@ - - -{if $block->get_title() !="" } -
{$block->get_title()}
-{/if} -
- {$block->data} -
\ No newline at end of file diff --git a/plugins/AMenuManager/menu_templates/menubar_randompic.tpl b/plugins/AMenuManager/menu_templates/menubar_randompic.tpl deleted file mode 100644 index f45fd3737..000000000 --- a/plugins/AMenuManager/menu_templates/menubar_randompic.tpl +++ /dev/null @@ -1,15 +0,0 @@ - - -
{$block->get_title()}
-
-
- {if $block->data.IMGNAME!="" and $block->data.SHOWNAME=="o"}{$block->data.IMGNAME}
{/if} - {* No strip_tags because comment could have those for good reasons *} - {* Over comment is limited to 127 characters for look only *} - {if $block->data.IMGCOMMENT!="" and $block->data.SHOWCOMMENT=="o" and strlen($block->data.IMGCOMMENT) < 128}{$block->data.IMGCOMMENT}
{/if} - - {if $block->data.IMGNAME!="" and $block->data.SHOWNAME=="u"}
{$block->data.IMGNAME}{/if} - {* Under comment is limited to 255 characters *} - {if $block->data.IMGCOMMENT!="" and $block->data.SHOWCOMMENT=="u" and strlen($block->data.IMGCOMMENT) < 256}
{$block->data.IMGCOMMENT}{/if} -
-
\ No newline at end of file -- cgit v1.2.3