From da6152490f7063de0c41d84c2240a52366e7fee7 Mon Sep 17 00:00:00 2001 From: quix0r Date: Sun, 12 Sep 2010 22:29:30 +0000 Subject: [PATCH] Draft for extension templates added, ext-announcement introduced, templates/CSS rewritten: - Draft for extension templates added which can be used for new extensions - Extension ext-announcement introduced (http://bugs.mxchange.org/view.php?id=194) - Templates/CSS rewritten: Short version 'del' is no longer used, use 'delete' now - TODOs.txt updated --- .gitattributes | 3 + DOCS/TODOs.txt | 12 +-- inc/expression-functions.php | 9 +- inc/extensions/ext-announcement.php | 96 +++++++++++++++++++ inc/modules/admin/admin-inc.php | 3 + .../de/html/admin/admin_delete_admin_menu.tpl | 2 +- .../de/html/admin/admin_delete_guest_menu.tpl | 2 +- .../html/admin/admin_delete_member_menu.tpl | 2 +- .../de/html/admin/admin_edit_admin_menu.tpl | 2 +- .../de/html/admin/admin_edit_guest_menu.tpl | 2 +- .../de/html/admin/admin_email_archiv_row.tpl | 2 +- .../admin/admin_list_bonus_emails_row.tpl | 2 +- .../de/html/admin/admin_list_emails_row.tpl | 2 +- .../admin/admin_list_notify_emails_row.tpl | 2 +- templates/de/html/admin/admin_list_task.tpl | 2 +- .../de/html/admin/admin_list_task_delete.tpl | 2 +- templates/de/html/admin/admin_main_header.tpl | 8 +- .../html/admin/admin_member_menu_overview.tpl | 2 +- .../de/html/admin/admin_overview_table.tpl | 2 +- templates/de/html/ext/ext_ | 3 + templates/de/html/ext/ext_announcement.tpl | 37 +++++++ theme/business/css/general.css | 2 +- theme/default/css/general.css | 2 +- theme/desert/css/general.css | 2 +- theme/org/css/general.css | 2 +- theme/schleuder/css/general.css | 2 +- theme/ship-simu/css/general.css | 2 +- 27 files changed, 180 insertions(+), 29 deletions(-) create mode 100644 inc/extensions/ext-announcement.php create mode 100644 templates/de/html/ext/ext_ create mode 100644 templates/de/html/ext/ext_announcement.tpl diff --git a/.gitattributes b/.gitattributes index 4e8cbc6a63..3caa6fe523 100644 --- a/.gitattributes +++ b/.gitattributes @@ -125,6 +125,7 @@ inc/extensions/ext-active.php -text svneol=unset#text/plain inc/extensions/ext-admins.php -text svneol=unset#text/plain inc/extensions/ext-admintheme1.php -text svneol=unset#text/plain inc/extensions/ext-admintheme_default.php -text svneol=unset#text/plain +inc/extensions/ext-announcement.php -text svneol=unset#text/plain inc/extensions/ext-autopurge.php -text svneol=unset#text/plain inc/extensions/ext-autoreg.php -text svneol=unset#text/plain inc/extensions/ext-bank.php -text svneol=unset#text/plain @@ -1378,10 +1379,12 @@ templates/de/html/doubler/doubler_header.tpl -text svneol=unset#text/plain templates/de/html/doubler/doubler_index.tpl -text svneol=unset#text/plain templates/de/html/doubler/doubler_reflink.tpl -text svneol=unset#text/plain templates/de/html/ext/.htaccess -text svneol=unset#text/plain +templates/de/html/ext/ext_ -text svneol=unset#text/plain templates/de/html/ext/ext_active.tpl -text svneol=unset#text/plain templates/de/html/ext/ext_admins.tpl -text svneol=unset#text/plain templates/de/html/ext/ext_admintheme1.tpl -text svneol=unset#text/plain templates/de/html/ext/ext_admintheme_default.tpl -text svneol=unset#text/plain +templates/de/html/ext/ext_announcement.tpl -text svneol=unset#text/plain templates/de/html/ext/ext_autopurge.tpl -text svneol=unset#text/plain templates/de/html/ext/ext_autoreg.tpl -text svneol=unset#text/plain templates/de/html/ext/ext_bank.tpl -text svneol=unset#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 75ebe55aff..012986bf65 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -94,11 +94,11 @@ ./inc/loader/load_cache-extension.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php * ./inc/module-functions.php:201: // @TODO Nothing helped??? ./inc/module-functions.php:236: // @TODO Rewrite this to a filter -./inc/modules/admin/admin-inc.php:259: // @TODO Rewrite this to $content = SQL_FETCHARRAY() -./inc/modules/admin/admin-inc.php:264: // @TODO ACL is 'allow'... hmmm -./inc/modules/admin/admin-inc.php:330: // @TODO Rewrite this to $content = SQL_FETCHARRAY() -./inc/modules/admin/admin-inc.php:336: // @TODO ACL is 'allow'... hmmm -./inc/modules/admin/admin-inc.php:436:// @TODO Try to rewrite this to adminAddMenuSelectionBox() +./inc/modules/admin/admin-inc.php:262: // @TODO Rewrite this to $content = SQL_FETCHARRAY() +./inc/modules/admin/admin-inc.php:267: // @TODO ACL is 'allow'... hmmm +./inc/modules/admin/admin-inc.php:333: // @TODO Rewrite this to $content = SQL_FETCHARRAY() +./inc/modules/admin/admin-inc.php:339: // @TODO ACL is 'allow'... hmmm +./inc/modules/admin/admin-inc.php:439:// @TODO Try to rewrite this to adminAddMenuSelectionBox() ./inc/modules/admin/overview-inc.php:162: // @TODO Rewrite this to a filter ./inc/modules/admin/overview-inc.php:275: // @TODO Rewrite this to something with include files and/or filter ./inc/modules/admin/overview-inc.php:309: // @TODO This may also be rewritten to include files @@ -231,7 +231,7 @@ ./templates/de/html/member/member_unconfirmed_table_nopoints.tpl:11: ./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5: ### ### DEPRECATION FOLLOWS: ### ### -./inc/modules/admin/admin-inc.php:437:// @DEPRECATED +./inc/modules/admin/admin-inc.php:440:// @DEPRECATED ./templates/de/emails/profile-updte.tpl:1:@DEPRECATED ./templates/de/html/admin/admin_del_admin_menu_row.tpl:1: ./templates/de/html/admin/admin_del_admin_menu.tpl:1: diff --git a/inc/expression-functions.php b/inc/expression-functions.php index e1098bf301..c923b069b9 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -263,14 +263,17 @@ function doExpressionMessage ($data) { // Expression call-back for template functions function doExpressionTemplate ($data) { + // Construct call-back function name + $callback = 'doTemplate' . $data['callback']; + // Init replacer - $replacer = ''; + $replacer = ''; // Is the function there? - if (function_exists($data['callback'])) { + if (function_exists($callback)) { // Do the replacement //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']); - $replacer = '{DQUOTE} . doTemplate' . $data['callback'] . "('" . $GLOBALS['current_template'] . "', true"; + $replacer = '{DQUOTE} . ' . $callback . "('" . $GLOBALS['current_template'] . "', true"; // Is 'value' set? if (!empty($data['value'])) { diff --git a/inc/extensions/ext-announcement.php b/inc/extensions/ext-announcement.php new file mode 100644 index 0000000000..101b0e24d3 --- /dev/null +++ b/inc/extensions/ext-announcement.php @@ -0,0 +1,96 @@ + diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 2c78bdd605..f0e647c78a 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -175,6 +175,9 @@ function doAdminAction () { } else { $content['welcome'] = loadTemplate('admin_welcome', true, $content); } + + // Load header, footer, render menu + $content['header'] = loadTemplate('admin_header' , true, $content); $content['footer'] = loadTemplate('admin_footer' , true, $content); $content['menu'] = addAdminMenu($action, $what, true); diff --git a/templates/de/html/admin/admin_delete_admin_menu.tpl b/templates/de/html/admin/admin_delete_admin_menu.tpl index 08082f3c17..4b1f634190 100644 --- a/templates/de/html/admin/admin_delete_admin_menu.tpl +++ b/templates/de/html/admin/admin_delete_admin_menu.tpl @@ -14,7 +14,7 @@ $content[rows] - + diff --git a/templates/de/html/admin/admin_delete_guest_menu.tpl b/templates/de/html/admin/admin_delete_guest_menu.tpl index 4d95af3aed..7babe20074 100644 --- a/templates/de/html/admin/admin_delete_guest_menu.tpl +++ b/templates/de/html/admin/admin_delete_guest_menu.tpl @@ -14,7 +14,7 @@ $content[rows] - + diff --git a/templates/de/html/admin/admin_delete_member_menu.tpl b/templates/de/html/admin/admin_delete_member_menu.tpl index 3ea78e7f79..40a503281f 100644 --- a/templates/de/html/admin/admin_delete_member_menu.tpl +++ b/templates/de/html/admin/admin_delete_member_menu.tpl @@ -14,7 +14,7 @@ $content[rows] - + diff --git a/templates/de/html/admin/admin_edit_admin_menu.tpl b/templates/de/html/admin/admin_edit_admin_menu.tpl index 3cbc7a4a47..9a55c65454 100644 --- a/templates/de/html/admin/admin_edit_admin_menu.tpl +++ b/templates/de/html/admin/admin_edit_admin_menu.tpl @@ -14,7 +14,7 @@ $content[rows] - + diff --git a/templates/de/html/admin/admin_edit_guest_menu.tpl b/templates/de/html/admin/admin_edit_guest_menu.tpl index 4761f0b427..2badce7e6b 100644 --- a/templates/de/html/admin/admin_edit_guest_menu.tpl +++ b/templates/de/html/admin/admin_edit_guest_menu.tpl @@ -14,7 +14,7 @@ $content[rows] - + diff --git a/templates/de/html/admin/admin_email_archiv_row.tpl b/templates/de/html/admin/admin_email_archiv_row.tpl index da80c83edc..53a34a13ff 100644 --- a/templates/de/html/admin/admin_email_archiv_row.tpl +++ b/templates/de/html/admin/admin_email_archiv_row.tpl @@ -63,7 +63,7 @@ - + {--ADMIN_DELETE_NORMAL_MAIL--} diff --git a/templates/de/html/admin/admin_list_bonus_emails_row.tpl b/templates/de/html/admin/admin_list_bonus_emails_row.tpl index b3d58919f2..d38478ba20 100644 --- a/templates/de/html/admin/admin_list_bonus_emails_row.tpl +++ b/templates/de/html/admin/admin_list_bonus_emails_row.tpl @@ -62,7 +62,7 @@ - + {--ADMIN_DELETE_BONUS_MAIL--} diff --git a/templates/de/html/admin/admin_list_emails_row.tpl b/templates/de/html/admin/admin_list_emails_row.tpl index 0c3dab8a2b..d923a2e9b4 100644 --- a/templates/de/html/admin/admin_list_emails_row.tpl +++ b/templates/de/html/admin/admin_list_emails_row.tpl @@ -53,7 +53,7 @@ - + {--ADMIN_DELETE_NORMAL_MAIL--} diff --git a/templates/de/html/admin/admin_list_notify_emails_row.tpl b/templates/de/html/admin/admin_list_notify_emails_row.tpl index 9335b468f7..6541d8ea0e 100644 --- a/templates/de/html/admin/admin_list_notify_emails_row.tpl +++ b/templates/de/html/admin/admin_list_notify_emails_row.tpl @@ -62,7 +62,7 @@ - + {--ADMIN_DELETE_NOTIFY_MAIL--} diff --git a/templates/de/html/admin/admin_list_task.tpl b/templates/de/html/admin/admin_list_task.tpl index 0dd9502891..bc53a02e1e 100644 --- a/templates/de/html/admin/admin_list_task.tpl +++ b/templates/de/html/admin/admin_list_task.tpl @@ -22,7 +22,7 @@ $content[rows] - + diff --git a/templates/de/html/admin/admin_list_task_delete.tpl b/templates/de/html/admin/admin_list_task_delete.tpl index 884347bd44..70129ddd00 100644 --- a/templates/de/html/admin/admin_list_task_delete.tpl +++ b/templates/de/html/admin/admin_list_task_delete.tpl @@ -22,7 +22,7 @@ $content[rows] - + diff --git a/templates/de/html/admin/admin_main_header.tpl b/templates/de/html/admin/admin_main_header.tpl index 09324a42f8..ec094d119b 100644 --- a/templates/de/html/admin/admin_main_header.tpl +++ b/templates/de/html/admin/admin_main_header.tpl @@ -2,7 +2,13 @@ diff --git a/templates/de/html/admin/admin_member_menu_overview.tpl b/templates/de/html/admin/admin_member_menu_overview.tpl index 9a18d40a3c..c9457586b4 100644 --- a/templates/de/html/admin/admin_member_menu_overview.tpl +++ b/templates/de/html/admin/admin_member_menu_overview.tpl @@ -14,7 +14,7 @@ $content[rows] - +
- $content[welcome] +
+ $content[header] +
+ +
+ $content[welcome] +
diff --git a/templates/de/html/admin/admin_overview_table.tpl b/templates/de/html/admin/admin_overview_table.tpl index 23ba7adbc8..1f575c6552 100644 --- a/templates/de/html/admin/admin_overview_table.tpl +++ b/templates/de/html/admin/admin_overview_table.tpl @@ -22,7 +22,7 @@ $content - + diff --git a/templates/de/html/ext/ext_ b/templates/de/html/ext/ext_ new file mode 100644 index 0000000000..0a4a17e5a6 --- /dev/null +++ b/templates/de/html/ext/ext_ @@ -0,0 +1,3 @@ +
+ Hier kommt der Beschreibungstext der Erweiterung rein. +
diff --git a/templates/de/html/ext/ext_announcement.tpl b/templates/de/html/ext/ext_announcement.tpl new file mode 100644 index 0000000000..a0d4f27766 --- /dev/null +++ b/templates/de/html/ext/ext_announcement.tpl @@ -0,0 +1,37 @@ +
+ Informieren Sie Ihre Gäste, Mitglieder oder Sponsoren über + wichtige Ereignisse Ihres {?mt_word2?}. Dazu geben Sie eine kurze + Überschrift, optional einen Teaser (mehr dazu weiter unten) und den + Text für die Ankündigung ein. Zusätzlich ist ein Ablaufdatum + einstellbar, wann die Mail in das Archiv verschoben wird. +
+ +
+ Der optionale Teaser kann bei Eingabe (nicht leer gelassen) weiter + konfiguriert werden. Erstmal wird dieser auf allen Seiten (des jeweiligen + Loginbereiches, also Gast-, Mitglied-, oder Sponsorlogin) in Form eines + über den eigentlichen Inhalt eingeblendetem Div-Tag angezeigt. Entweder + ist das Fenster zusammengeklappt und per Mausklick voll ausklappbar, oder es + ist sofort komplett ausgeklappt (einstellbar per Adminbereich). Dann kann + eingestellt werden, wie lange und oft der User es sehen soll: +
+ +
+ +
+ +
+ Das Archiv ist automatisch und/oder manuell aufrämbar. Es kann also + eine Verfallszeit eingestellt werden. Null heisst keine Verfallszeit. + Zusätzlich kann jede Ankündigung per Adminbereich gelöscht + werden. "Allgemeine" Templates lassen jede Ankündigung + einheitlich aussehen. +
diff --git a/theme/business/css/general.css b/theme/business/css/general.css index f39e35ef4a..df9242b9f2 100644 --- a/theme/business/css/general.css +++ b/theme/business/css/general.css @@ -341,7 +341,7 @@ ul.copyright_box { font-size: 1px; } -.member_refbanner, .member_update, .admin_del_link { +.member_refbanner, .member_update, .admin_delete_link { background-color: #eeeeff; } diff --git a/theme/default/css/general.css b/theme/default/css/general.css index 8ab2d70754..df203030ad 100644 --- a/theme/default/css/general.css +++ b/theme/default/css/general.css @@ -370,7 +370,7 @@ ul.copyright_box { font-size: 1px; } -.member_refbanner, .member_update, .admin_del_link { +.member_refbanner, .member_update, .admin_delete_link { background-color: #ddeedd; } diff --git a/theme/desert/css/general.css b/theme/desert/css/general.css index ef68961ca9..409f3a95cc 100644 --- a/theme/desert/css/general.css +++ b/theme/desert/css/general.css @@ -322,7 +322,7 @@ ul.copyright_box { font-size: 1px; } -.member_refbanner, .member_update, .admin_del_link { +.member_refbanner, .member_update, .admin_delete_link { background-color: #ddddaa; } diff --git a/theme/org/css/general.css b/theme/org/css/general.css index 5874751331..1f3d1ed049 100644 --- a/theme/org/css/general.css +++ b/theme/org/css/general.css @@ -336,7 +336,7 @@ ul, ol { font-size : 1px; } -.member_refbanner, .member_update, .admin_del_link { +.member_refbanner, .member_update, .admin_delete_link { background-color : #DDEEDD; } diff --git a/theme/schleuder/css/general.css b/theme/schleuder/css/general.css index 0513e5d19b..76c0ccff8a 100644 --- a/theme/schleuder/css/general.css +++ b/theme/schleuder/css/general.css @@ -379,7 +379,7 @@ ul, ol { font-size : 1px; } -.member_refbanner, .member_update, .admin_del_link { +.member_refbanner, .member_update, .admin_delete_link { background-color : #69b2ff; } diff --git a/theme/ship-simu/css/general.css b/theme/ship-simu/css/general.css index e78bcf6632..a6ff5efa0a 100644 --- a/theme/ship-simu/css/general.css +++ b/theme/ship-simu/css/general.css @@ -308,7 +308,7 @@ ul, ol { font-size : 1px; } -.member_refbanner, .member_update, .admin_del_link { +.member_refbanner, .member_update, .admin_delete_link { background-color : #EEEEFF; } -- 2.39.5