Changeset 1498 in ExiteCMS
- Timestamp:
- 07/01/08 23:52:31 (4 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 5 edited
-
administration/images/reports.gif (added)
-
administration/modules.php (modified) (3 diffs)
-
administration/reports.php (added)
-
administration/tools/language_pack_English.php (modified) (5 diffs)
-
administration/tools/language_pack_Nederlands.php (modified) (5 diffs)
-
administration/upgrade/rev01490.php (added)
-
administration/upgrade/rev01492.php (added)
-
files/locales/en.main.global.php (modified) (1 diff)
-
includes/templates/admin.modules.tpl (modified) (1 diff)
-
includes/templates/admin.reports.tpl (added)
-
includes/templates/main.reports.tpl (added)
-
reports.php (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/modules.php
r1488 r1498 171 171 // register the installation of this module 172 172 $result = dbquery("INSERT INTO ".$db_prefix."modules (mod_title, mod_folder, mod_version) VALUES ('$mod_title', '$mod_folder', '$mod_version')"); 173 // save the key, we might need it later 174 $mod_id = mysql_insert_id(); 175 176 // if a module is installed, and if reports are defined, install the report links for this module 177 if ($mod_id && isset($mod_report_links) && is_array($mod_report_links) && count($mod_report_links)) { 178 179 // loop through the defined reports 180 foreach ($mod_report_links as $mod_report) { 181 182 // check if the code exists for this report 183 if (isset($mod_report['name']) && file_exists(PATH_MODULES.$mod_folder."/report.".$mod_report['name'].".php")) { 184 // check if the template exists for this report 185 if (file_exists(PATH_MODULES.$mod_folder."/templates/modules.".$mod_folder.".report.".$mod_report['name'].".tpl")) { 186 // verify the other fields 187 $mod_report['visibility'] = (isset($mod_report['visibility']) && isNum($mod_report['visibility']) ? $mod_report['visibility'] : 103); 188 $mod_report['title'] = isset($mod_report['title']) ? $mod_report['title'] : ("Report: ".$mod_report['name']); 189 $mod_report['version'] = isset($mod_report['version']) ? $mod_report['version'] : $mod_version; 190 // add it to the report table 191 $result = dbquery("INSERT INTO ".$db_prefix."reports (report_mod_id, report_name, report_title, report_version, report_visibility) 192 VALUES ('".$mod_id."', '".$mod_report['name']."', '".$mod_report['title']."', '".$mod_report['version']."', '".$mod_report['visibility']."')"); 193 } 194 } 195 } 196 } 197 198 // if a module is installed, and if searches are defined, install the search links for this module 199 if ($mod_id && isset($mod_search_links) && is_array($mod_search_links) && count($mod_search_links)) { 200 201 // loop through the defined reports 202 foreach ($mod_search_links as $mod_search) { 203 204 // check if the code exists for this search 205 if (isset($mod_search['name']) && file_exists(PATH_MODULES.$mod_folder."/search.".$mod_search['name'].".php")) { 206 // check if the template exists for this search 207 if (file_exists(PATH_MODULES.$mod_folder."/templates/modules.".$mod_folder.".search.".$mod_search['name'].".tpl")) { 208 // verify the other fields 209 $mod_search['visibility'] = (isset($mod_search['visibility']) && isNum($mod_search['visibility']) ? $mod_search['visibility'] : 103); 210 $mod_search['title'] = isset($mod_search['title']) ? $mod_search['title'] : ("Search: ".$mod_search['name']); 211 $mod_search['version'] = isset($mod_search['version']) ? $mod_search['version'] : $mod_version; 212 // add it to the search table 213 $result = dbquery("INSERT INTO ".$db_prefix."searches (search_mod_id, search_name, search_title, search_version, search_visibility) 214 VALUES ('".$mod_id."', '".$mod_search['name']."', '".$mod_search['title']."', '".$mod_search['version']."', '".$mod_search['visibility']."')"); 215 } 216 } 217 } 218 } 173 219 174 220 // update the access rights of the site administrators to include this new module … … 303 349 // remove the module from the installed modules list 304 350 $result = dbquery("DELETE FROM ".$db_prefix."modules WHERE mod_id='$id'"); 351 352 // remove any reports associated with this module 353 $result = dbquery("DELETE FROM ".$db_prefix."reports WHERE report_mod_id='$id'"); 354 355 // remove any searches associated with this module 356 $result = dbquery("DELETE FROM ".$db_prefix."searches WHERE search_mod_id='$id'"); 357 } 358 359 if ($action == 'locales' && isset($id)) { 360 361 // make sure the ID passed is numeric 362 if (!isNum($id)) fallback(FUSION_SELF.$aidlink); 363 364 // check if it exists 365 $result = dbquery("SELECT * FROM ".$db_prefix."modules WHERE mod_id='$id'"); 366 if (!$result) fallback(FUSION_SELF.$aidlink); 367 368 // get the module data 369 $data = dbarray($result); 370 371 // load the module installer to start the upgrade 372 include PATH_MODULES.$data['mod_folder']."/module_installer.php"; 373 374 // if locale strings are defined, load them into the database 375 if (isset($localestrings) && is_array($localestrings)) { 376 foreach($localestrings as $locales_code => $locales_strings) { 377 load_localestrings($locales_strings, $locales_code, "modules.".$mod_folder); 378 } 379 } 380 305 381 } 306 382 … … 419 495 foreach($localestrings as $locales_code => $locales_strings) { 420 496 load_localestrings($locales_strings, $locales_code, "modules.".$mod_folder); 497 } 498 } 499 500 // remove any reports associated with this module 501 $result = dbquery("DELETE FROM ".$db_prefix."reports WHERE report_mod_id='$id'"); 502 503 // if a module is installed, and if reports are defined, (re)install the report links for this module 504 if (isset($mod_report_links) && is_array($mod_report_links) && count($mod_report_links)) { 505 506 // loop through the defined reports 507 foreach ($mod_report_links as $mod_report) { 508 509 // check if the code exists for this report 510 if (isset($mod_report['name']) && file_exists(PATH_MODULES.$mod_folder."/report.".$mod_report['name'].".php")) { 511 // check if the template exists for this report 512 if (file_exists(PATH_MODULES.$mod_folder."/templates/modules.".$mod_folder.".report.".$mod_report['name'].".tpl")) { 513 // verify the other fields 514 $mod_report['visibility'] = (isset($mod_report['visibility']) && isNum($mod_report['visibility']) ? $mod_report['visibility'] : 103); 515 $mod_report['title'] = isset($mod_report['title']) ? $mod_report['title'] : ("Report: ".$mod_report['name']); 516 $mod_report['version'] = isset($mod_report['version']) ? $mod_report['version'] : $mod_version; 517 // add it to the report table 518 $result = dbquery("INSERT INTO ".$db_prefix."reports (report_mod_id, report_name, report_title, report_version, report_visibility) 519 VALUES ('".$id."', '".$mod_report['name']."', '".$mod_report['title']."', '".$mod_report['version']."', '".$mod_report['visibility']."')"); 520 } 521 } 522 } 523 524 } 525 526 // remove any searches associated with this module 527 $result = dbquery("DELETE FROM ".$db_prefix."searches WHERE search_mod_id='$id'"); 528 529 // if a module is installed, and if searches are defined, install the search links for this module 530 if (isset($mod_search_links) && is_array($mod_search_links) && count($mod_search_links)) { 531 532 // loop through the defined reports 533 foreach ($mod_search_links as $mod_search) { 534 535 // check if the code exists for this search 536 if (isset($mod_search['name']) && file_exists(PATH_MODULES.$mod_folder."/search.".$mod_search['name'].".php")) { 537 // check if the template exists for this search 538 if (file_exists(PATH_MODULES.$mod_folder."/templates/modules.".$mod_folder.".search.".$mod_search['name'].".tpl")) { 539 // verify the other fields 540 $mod_search['visibility'] = (isset($mod_search['visibility']) && isNum($mod_search['visibility']) ? $mod_search['visibility'] : 103); 541 $mod_search['title'] = isset($mod_search['title']) ? $mod_search['title'] : ("Search: ".$mod_search['name']); 542 $mod_search['version'] = isset($mod_search['version']) ? $mod_search['version'] : $mod_version; 543 // add it to the search table 544 $result = dbquery("INSERT INTO ".$db_prefix."searches (search_mod_id, search_name, search_title, search_version, search_visibility) 545 VALUES ('".$id."', '".$mod_search['name']."', '".$mod_search['title']."', '".$mod_search['version']."', '".$mod_search['visibility']."')"); 546 } 547 } 421 548 } 422 549 } -
trunk/administration/tools/language_pack_English.php
r1495 r1498 497 497 $localestrings['253'] = "Suspended Members:"; 498 498 $localestrings['255'] = "Deleted Members:"; 499 $localestrings['256'] = "Report ing";499 $localestrings['256'] = "Reports"; 500 500 $localestrings['257'] = "Comments:"; 501 501 $localestrings['258'] = "Shoutbox Posts:"; 502 502 $localestrings['259'] = "Forum Posts:"; 503 $localestrings['260'] = " x";503 $localestrings['260'] = "Searches"; 504 504 $localestrings['261'] = "x"; 505 505 $localestrings['262'] = "Unread Posts:"; … … 601 601 $localestrings['424'] = "There are no modules and plugins available for installation"; 602 602 $localestrings['425'] = "There are no modules and plugins available that match your filter"; 603 $localestrings['426'] = "Refresh the locale strings"; 603 604 $localestrings['mod001'] = "This module requires at least version %s of ExiteCMS.<br />"; 604 605 $localestrings['mod002'] = "This module is written for version %s of ExiteCMS. Please ask the author for an upgrade.<br />"; … … 860 861 $localestrings['492'] = "If checked, the site will redirect to the exact URL given"; 861 862 load_localestrings($localestrings, LP_LOCALE, "admin.redirects", $step); 863 864 $localestrings = array(); 865 $localestrings['400'] = "Reporting"; 866 $localestrings['401'] = "Install"; 867 $localestrings['403'] = "Filter on status"; 868 $localestrings['404'] = "x"; 869 $localestrings['405'] = "x"; 870 $localestrings['406'] = "Version"; 871 $localestrings['407'] = "Developer"; 872 $localestrings['408'] = "Contact"; 873 $localestrings['409'] = "Email"; 874 $localestrings['410'] = "Web"; 875 $localestrings['411'] = "Uninstall"; 876 $localestrings['412'] = "Uninstall this report?"; 877 $localestrings['413'] = "x"; 878 $localestrings['414'] = "Not Installed"; 879 $localestrings['415'] = "Installed"; 880 $localestrings['416'] = "Upgrade Available"; 881 $localestrings['417'] = "Error executing installation function: "; 882 $localestrings['418'] = "Not compatible"; 883 $localestrings['419'] = "Error. Unknown command type: "; 884 $localestrings['420'] = "Status"; 885 $localestrings['421'] = "Options"; 886 $localestrings['422'] = "Upgrade"; 887 $localestrings['423'] = "Go"; 888 $localestrings['424'] = "There are no reports available for installation"; 889 $localestrings['425'] = "There are no reports available that match your filter"; 890 $localestrings['mod001'] = "This report requires at least version %s of ExiteCMS.<br />"; 891 $localestrings['mod002'] = "This report is written for version %s of ExiteCMS. Please ask the author for an upgrade.<br />"; 892 $localestrings['mod003'] = "This report requires a minumum ExiteCMS revision level of %s.<br />"; 893 $localestrings['mod004'] = "This report can not be installed. Required information is missing from the report installer.<br />"; 894 $localestrings['mod005'] = "This report does not function beyond ExiteCMS revision level %s.<br />"; 895 load_localestrings($localestrings, LP_LOCALE, "admin.reporting", $step); 896 897 $localestrings = array(); 898 $localestrings['400'] = "Reports"; 899 $localestrings['401'] = "Report Title"; 900 $localestrings['402'] = "Visibility"; 901 $localestrings['403'] = "Options"; 902 $localestrings['404'] = "Deactivate"; 903 $localestrings['405'] = "Activate"; 904 $localestrings['406'] = "Modify this report"; 905 $localestrings['407'] = "Delete this report"; 906 $localestrings['408'] = "Currently there are no reports defined"; 907 $localestrings['409'] = "Add a Report"; 908 $localestrings['410'] = "from"; 909 $localestrings['411'] = "View this report"; 910 load_localestrings($localestrings, LP_LOCALE, "admin.reports", $step); 862 911 863 912 $localestrings = array(); … … 2949 2998 2950 2999 $localestrings = array(); 3000 $localestrings['rpt400'] = "Available Reports"; 3001 $localestrings['rpt401'] = "Report"; 3002 $localestrings['rpt402'] = "View"; 3003 $localestrings['rpt403'] = "Currently there are no reports defined"; 3004 $localestrings['rpt404'] = "Result for the requested report"; 3005 $localestrings['rpt405'] = "Report List"; 3006 load_localestrings($localestrings, LP_LOCALE, "main.reports", $step); 3007 3008 $localestrings = array(); 2951 3009 $localestrings['400'] = "Search"; 2952 3010 $localestrings['401'] = "Search for:"; … … 3231 3289 if (!defined('LP_CHARSET')) define('LP_CHARSET', "iso-8859-1"); 3232 3290 if (!defined('LP_VERSION')) define('LP_VERSION', "7.10"); 3233 if (!defined('LP_DATE')) define('LP_DATE', "1214 854709");3234 $lp_date = "1214 854709";3291 if (!defined('LP_DATE')) define('LP_DATE', "1214934137"); 3292 $lp_date = "1214934137"; 3235 3293 3236 3294 /*---------------------------------------------------+ -
trunk/administration/tools/language_pack_Nederlands.php
r1495 r1498 497 497 $localestrings['253'] = "Geblokeerde gebruikers:"; 498 498 $localestrings['255'] = "Verwijderde gebruikers:"; 499 $localestrings['256'] = "Rapport ages";499 $localestrings['256'] = "Rapporten"; 500 500 $localestrings['257'] = "Commentaar:"; 501 501 $localestrings['258'] = "Shoutbox berichten:"; 502 502 $localestrings['259'] = "Forum berichten:"; 503 $localestrings['260'] = " x";503 $localestrings['260'] = "Zoekacties"; 504 504 $localestrings['261'] = "x"; 505 505 $localestrings['262'] = "Ongelezen berichten:"; … … 601 601 $localestrings['424'] = "Er zijn geen modules of plugins beschikbaar voor installatie"; 602 602 $localestrings['425'] = "Er zijn geen modules of plugins aanwezig die voldoen aan het filter"; 603 $localestrings['426'] = "Locales opnieuw inladen"; 603 604 $localestrings['mod001'] = "Deze module vereist minstens ExiteCMS versie %s.<br />"; 604 605 $localestrings['mod002'] = "Deze module is gemaakt voor versie %s van ExiteCMS. Neem contact op met de ontwikkelaar voor een nieuwere versie.<br />"; … … 860 861 $localestrings['492'] = "Indien gemarkeerd wordt de nieuwe URL geladen d.m.v. een redirect"; 861 862 load_localestrings($localestrings, LP_LOCALE, "admin.redirects", $step); 863 864 $localestrings = array(); 865 $localestrings['400'] = "Reporting"; 866 $localestrings['401'] = "Install"; 867 $localestrings['403'] = "Filter on status"; 868 $localestrings['404'] = "x"; 869 $localestrings['405'] = "x"; 870 $localestrings['406'] = "Version"; 871 $localestrings['407'] = "Developer"; 872 $localestrings['408'] = "Contact"; 873 $localestrings['409'] = "Email"; 874 $localestrings['410'] = "Web"; 875 $localestrings['411'] = "Uninstall"; 876 $localestrings['412'] = "Uninstall this report?"; 877 $localestrings['413'] = "x"; 878 $localestrings['414'] = "Not Installed"; 879 $localestrings['415'] = "Installed"; 880 $localestrings['416'] = "Upgrade Available"; 881 $localestrings['417'] = "Error executing installation function: "; 882 $localestrings['418'] = "Not compatible"; 883 $localestrings['419'] = "Error. Unknown command type: "; 884 $localestrings['420'] = "Status"; 885 $localestrings['421'] = "Options"; 886 $localestrings['422'] = "Upgrade"; 887 $localestrings['423'] = "Go"; 888 $localestrings['424'] = "There are no reports available for installation"; 889 $localestrings['425'] = "There are no reports available that match your filter"; 890 $localestrings['mod001'] = "This report requires at least version %s of ExiteCMS.<br />"; 891 $localestrings['mod002'] = "This report is written for version %s of ExiteCMS. Please ask the author for an upgrade.<br />"; 892 $localestrings['mod003'] = "This report requires a minumum ExiteCMS revision level of %s.<br />"; 893 $localestrings['mod004'] = "This report can not be installed. Required information is missing from the report installer.<br />"; 894 $localestrings['mod005'] = "This report does not function beyond ExiteCMS revision level %s.<br />"; 895 load_localestrings($localestrings, LP_LOCALE, "admin.reporting", $step); 896 897 $localestrings = array(); 898 $localestrings['400'] = "Rapporten"; 899 $localestrings['401'] = "Rapport titel"; 900 $localestrings['402'] = "Toegang voor"; 901 $localestrings['403'] = "Opties"; 902 $localestrings['404'] = "Deactiveer"; 903 $localestrings['405'] = "Activeer"; 904 $localestrings['406'] = "Wijzig dit rapport"; 905 $localestrings['407'] = "Verwijder this report"; 906 $localestrings['408'] = "Er zijn momenteel geen rapporten gedefinieerd"; 907 $localestrings['409'] = "Rapport toevoegen"; 908 $localestrings['410'] = "van"; 909 $localestrings['411'] = "Rapport aanmaken"; 910 load_localestrings($localestrings, LP_LOCALE, "admin.reports", $step); 862 911 863 912 $localestrings = array(); … … 2949 2998 2950 2999 $localestrings = array(); 3000 $localestrings['rpt400'] = "Beschikbare rapporten"; 3001 $localestrings['rpt401'] = "Rapport"; 3002 $localestrings['rpt402'] = "Bekijk"; 3003 $localestrings['rpt403'] = "Er zijn op dit moment geen rapporten beschikbaar"; 3004 $localestrings['rpt404'] = "Resultaat voor het rapport"; 3005 $localestrings['rpt405'] = "Rapportenlijst"; 3006 load_localestrings($localestrings, LP_LOCALE, "main.reports", $step); 3007 3008 $localestrings = array(); 2951 3009 $localestrings['400'] = "Zoeken"; 2952 3010 $localestrings['401'] = "Zoeken naar:"; … … 3231 3289 if (!defined('LP_CHARSET')) define('LP_CHARSET', "iso-8859-1"); 3232 3290 if (!defined('LP_VERSION')) define('LP_VERSION', "7.10"); 3233 if (!defined('LP_DATE')) define('LP_DATE', "1214 854713");3234 $lp_date = "1214 854713";3291 if (!defined('LP_DATE')) define('LP_DATE', "1214934141"); 3292 $lp_date = "1214934141"; 3235 3293 3236 3294 /*---------------------------------------------------+ -
trunk/files/locales/en.main.global.php
r1491 r1498 3 3 // locale : English 4 4 // locale name : main.global 5 // generated on : Sun Jun 29 2008, 16:31:43CEST5 // generated on : Tue Jul 1 2008, 23:49:35 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- -
trunk/includes/templates/admin.modules.tpl
r1488 r1498 101 101 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&action=install&module={$modules[id].folder}&filter={$filter}'><img src='{$smarty.const.THEME}images/cog_add.gif' alt='{$locale.401}' title='{$locale.401}' /></a> 102 102 {/if} 103 {if $settings.sitename == "ExiteCMS Support Site"} 104 <a href='{$smarty.const.FUSION_SELF}{$aidlink}&action=locales&id={$modules[id].id}&filter={$filter}'><img src='{$smarty.const.THEME}images/page_refresh.gif' alt='{$locale.426}' title='{$locale.426}' /></a> 105 {/if} 103 106 </td> 104 107 </tr>
Note: See TracChangeset
for help on using the changeset viewer.
