inc/filter/earning_filter.php svneol=native#text/plain
inc/filter/forced_filter.php svneol=native#text/plain
inc/filter/mediadata_filter.php svneol=native#text/plain
+inc/filter/menu_filter.php svneol=native#text/plain
inc/filter/online_filter.php svneol=native#text/plain
inc/filter/order_filter.php svneol=native#text/plain
inc/filter/other_filter.php svneol=native#text/plain
} // END - if
// Version number
-setThisExtensionVersion('0.0.4');
+setThisExtensionVersion('0.0.5');
// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0','0.0.1','0.0.2','0.0.3', '0.0.4'));
+setExtensionVersionHistory(array('0.0.0','0.0.1','0.0.2','0.0.3', '0.0.4', '0.0.5'));
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running
addAdminMenuSql('menu','memedit','Mitgliedsmenü editieren','Mitgliedsmenü editieren oder löschen',4);
addAdminMenuSql('menu','guest_add','Gäste-Menü hinzufügen','Fügen Sie weitere Menüpunkte dem Gäste-Menü hinzu.',5);
addAdminMenuSql('menu','guestedit','Gäste-Menü editieren','Gäste-Menü editieren, löschen',6);
+
+ // Unregister filter
+ unregisterFilter(__FILE__, __LINE__, 'guest_menu_advert', 'ADD_GENERIC_MENU_ADVERT', TRUE, isExtensionDryRun());
+ unregisterFilter(__FILE__, __LINE__, 'member_menu_advert', 'ADD_GENERIC_MENU_ADVERT', TRUE, isExtensionDryRun());
+ unregisterFilter(__FILE__, __LINE__, 'guest_menu_advert_end', 'ADD_GENERIC_MENU_ADVERT_END', TRUE, isExtensionDryRun());
+ unregisterFilter(__FILE__, __LINE__, 'member_menu_advert_end', 'ADD_GENERIC_MENU_ADVERT_END', TRUE, isExtensionDryRun());
break;
case 'remove': // Do stuff when removing extension
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("VARCHAR(50) ist zu kurz für Linktitel (wegen der dynamischen Anteile).");
break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ registerFilter(__FILE__, __LINE__, 'guest_menu_advert', 'ADD_GENERIC_MENU_ADVERT', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'member_menu_advert', 'ADD_GENERIC_MENU_ADVERT', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'guest_menu_advert_end', 'ADD_GENERIC_MENU_ADVERT_END', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'member_menu_advert_end', 'ADD_GENERIC_MENU_ADVERT_END', FALSE, TRUE, isExtensionDryRun());
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Filter hinzugefügt, die Werbeeinblendungen hinzufügen. Auf diese Filter kann später auch z.B. <strong>ext-clickbanner</strong> sich registrieren, damit die Werbung "exklusiv" angezeigt wird, muss das Flag <strong>exclusive</strong> auf <em>TRUE</em> gesetzt werden.");
+ break;
} // END - switch
break;
unregisterFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', TRUE, isExtensionDryRun());
unregisterFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', TRUE, isExtensionDryRun());
unregisterFilter(__FILE__, __LINE__, 'extra_autopurge', 'SERVER_NAME_EXTRA_AUTOPURGE', TRUE, isExtensionDryRun());
+ unregisterFilter(__FILE__, __LINE__, 'determine_menu_mode', 'DETERMINE_MENU_MODE_GENERIC', TRUE, isExtensionDryRun());
break;
case 'activate': // Do stuff when admin activates this extension
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 11/28/2012 *
+ * =================== Last change: 11/28/2012 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : menu_filter.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Filters for ext- *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Filter fuer ext- *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
+ * For more information visit: http://mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Filter for adding generic menu advert template (+ separator)
+function FILTER_ADD_GENERIC_MENU_ADVERT ($filterData) {
+ // Should we display adverts in this menu?
+ if (($filterData['exclusive'] === FALSE) && (getConfig($filterData['mode'] . '_menu_advert_enabled') == 'Y') && ($filterData['action'] != 'admin')) {
+ // Display advert template
+ $filterData['output'] .= loadTemplate('menu_' . $filterData['mode'] . '_advert_' . $filterData['action'], TRUE);
+
+ // Add separator again
+ $filterData['output'] .= loadTemplate('menu_separator', TRUE, $filterData['mode']);
+ } // END - if
+
+ // Return filter data
+ return $filterData;
+}
+
+// Filter to add generic advert to end of menu
+function FILTER_ADD_GENERIC_MENU_ADVERT_END ($filterData) {
+ // Should we display adverts in this menu?
+ if (($filterData['exclusive']) && (getConfig($filterData['mode'] . '_menu_advert_enabled') == 'Y') && ($filterData['action'] != 'admin')) {
+ // Add separator again
+ $filterData['content'] .= loadTemplate('menu_separator', TRUE, $filterData['mode']);
+
+ // Display advert template
+ $filterData['content'] .= loadTemplate('menu_' . $filterData['mode'] . '_advert_end', TRUE);
+ } // END - if
+
+ // Return filter data
+ return $filterData;
+}
+
+// [EOF]
+?>
// Add separator
$GLOBALS['rows'] .= loadTemplate('menu_separator', TRUE, $mode);
- // Should we display adverts in this menu?
- if ((isExtensionInstalledAndNewer('menu', '0.0.1')) && (getConfig($mode . '_menu_advert_enabled') == 'Y') && ($action != 'admin')) {
- // Display advert template
- $GLOBALS['rows'] .= loadTemplate('menu_' . $mode . '_advert_' . $action, TRUE);
+ // Prepare filter data array
+ $filterData = array(
+ 'output' => '',
+ 'exclusive' => FALSE,
+ 'action' => $action,
+ 'mode' => $mode,
+ );
- // Add separator again
- $GLOBALS['rows'] .= loadTemplate('menu_separator', TRUE, $mode);
- } // END - if
+ // Run filter chain
+ $filterData = runFilterChain($mode . '_menu_advert', $filterData);
+
+ // Add content output
+ $GLOBALS['rows'] .= $filterData['output'];
} // END - if
} // END - while
// Free memory
SQL_FREERESULT($result_main);
- // Should we display adverts in this menu?
- if ((isExtensionInstalledAndNewer('menu', '0.0.1')) && (getConfig($mode . '_menu_advert_enabled') == 'Y')) {
- // Add separator again
- $GLOBALS['rows'] .= loadTemplate('menu_separator', TRUE, $mode);
+ // Prepare filter data array
+ $filterData = array(
+ 'output' => '',
+ 'exclusive' => FALSE,
+ 'action' => $action,
+ 'mode' => $mode,
+ );
+
+ // Run filter chain
+ $filterData = runFilterChain($mode . '_menu_advert_end', $filterData);
- // Display advert template
- $GLOBALS['rows'] .= loadTemplate('menu_' . $mode . '_advert_end', TRUE);
- } // END - if
+ // Add content output
+ $GLOBALS['rows'] .= $filterData['output'];
// Prepare data
$content = array(
border: solid 1px #000000;
background-color: #eeeeff;
font-size: 10px;
- width: 645px;
+ width: 685px;
height: 20px;
list-style: none inside;
}
.show_timings_column {
background-color: #ffffff;
margin-top: 2px;
- width: 150px;
+ width: 160px;
height: 14px;
}
ul.show_timings_block {
border: solid 1px #00aa44;
background-color: #ddeedd;
- width: 645px;
+ width: 685px;
height: 20px;
list-style: none inside;
padding-left:0px;
.show_timings_column {
background-color: #eeffee;
margin-top: 2px;
- width: 150px;
+ width: 160px;
height: 14px;
font-size: 10px;
}
border: solid 1px #880000;
background-color: #cccc99;
font-size: 10px;
- width: 645px;
+ width: 685px;
height: 20px;
list-style: none inside;
}
.show_timings_column {
background-color: #ffffcc;
margin-top: 2px;
- width: 150px;
+ width: 160px;
height: 14px;
}