// - Other messages
'ADMIN_NETWORK_REQUEST_PARAMETER_LIST_LIMITED_TO_TYPE' => "Es wurden nur die API-Parameter des ausgewählten Werbeart-Handlers angezeigt.",
// - Advertise types
+ 'ADMIN_NETWORK_TYPES_BANNER' => "Banner-Klick/-View",
'ADMIN_NETWORK_TYPES_BANNER_CLICK' => "Banner-Klick",
'ADMIN_NETWORK_TYPES_BANNER_VIEW' => "Banner-View",
- 'ADMIN_NETWORK_TYPES_BANNER_CLICK_VIEW' => "Banner-Klick/-View",
+ 'ADMIN_NETWORK_TYPES_BUTTON' => "Button-Klick/-View",
'ADMIN_NETWORK_TYPES_BUTTON_CLICK' => "Button-Klick",
'ADMIN_NETWORK_TYPES_BUTTON_VIEW' => "Button-View",
- 'ADMIN_NETWORK_TYPES_BUTTON_CLICK_VIEW' => "Button-Klick/-View",
+ 'ADMIN_NETWORK_TYPES_SURFBAR' => "Surfbar-Klick/-View",
'ADMIN_NETWORK_TYPES_SURFBAR_CLICK' => "Surfbar-Klick",
'ADMIN_NETWORK_TYPES_SURFBAR_VIEW' => "Surfbar-View",
- 'ADMIN_NETWORK_TYPES_SURFBAR_CLICK_VIEW' => "Surfbar-Klick/-View",
- 'ADMIN_NETWORK_TYPES_FORCED_BANNER' => "Forced-Banner",
- 'ADMIN_NETWORK_TYPES_FORCED_TEXTLINK' => "Forced-Textlink",
+ 'ADMIN_NETWORK_TYPES_FORCEDBANNER' => "Forced-Banner",
+ 'ADMIN_NETWORK_TYPES_FORCEDTEXTLINK' => "Forced-Textlink",
+ 'ADMIN_NETWORK_TYPES_TEXTLINK' => "Textlink-Klick/-View",
'ADMIN_NETWORK_TYPES_TEXTLINK_CLICK' => "Textlink-Klick",
'ADMIN_NETWORK_TYPES_TEXTLINK_VIEW' => "Textlink-View",
- 'ADMIN_NETWORK_TYPES_TEXTLINK_CLICK_VIEW' => "Textlink-Klick/-View",
+ 'ADMIN_NETWORK_TYPES_SKYBANNER' => "Sky-Klick/-View",
'ADMIN_NETWORK_TYPES_SKYBANNER_CLICK' => "Sky-Klick",
'ADMIN_NETWORK_TYPES_SKYBANNER_VIEW' => "Sky-View",
- 'ADMIN_NETWORK_TYPES_SKYBANNER_CLICK_VIEW' => "Sky-Klick/-View",
+ 'ADMIN_NETWORK_TYPES_LAYER' => "Layer-Klick/-View",
'ADMIN_NETWORK_TYPES_LAYER_CLICK' => "Layer-Klick",
'ADMIN_NETWORK_TYPES_LAYER_VIEW' => "Layer-View",
- 'ADMIN_NETWORK_TYPES_LAYER_CLICK_VIEW' => "Layer-Klick/-View",
'ADMIN_NETWORK_TYPES_POPUP' => "PopUp",
'ADMIN_NETWORK_TYPES_POPDOWN' => "PopDown",
'ADMIN_NETWORK_TYPES_TEXTMAIL' => "Textmail",
'ADMIN_NETWORK_REQUESTS_DEPLETED_ERROR_CODE' => "API-Abfragen erschöpft",
'ADMIN_NETWORK_REQUEST_PARAMETER_INCOMPLETE_ERROR_CODE' => "API-Abfrageparameter nicht komplett",
'ADMIN_NETWORK_SITE_ID_NOT_ALLOWED_TYPE_ERROR_CODE' => "Seiten-Id nicht freigegeben",
- // Text-represations of column translate_name
+ // Textual represations of column translate_name
'ADMIN_NETWORK_TRANSLATE_ALTERNATE_TEXT_NAME' => "Alternativer Bildtext",
'ADMIN_NETWORK_TRANSLATE_BANNER_ID_NAME' => "Banner-Id",
'ADMIN_NETWORK_TRANSLATE_ID_NAME' => "Kampagnen-Id",
sprintf(
"WHERE `network_id`=%s",
bigintval(getRequestParameter('network'))
- )
+ ),
+ '',
+ 'translateNetworkTypeHandler'
);
} // END - if
return getMessage('ADMIN_NETWORK_TRANSLATE_' . strtoupper($name) . '_NAME');
}
+// Translates the network type handler (e.g. banner, paidmail) for templates
+function translateNetworkTypeHandler ($type) {
+ // Get the message id
+ return getMessage('ADMIN_NETWORK_TYPES_' . strtoupper($type) . '');
+}
+
//------------------------------------------------------------------------------
// Call-back functions
//------------------------------------------------------------------------------
// Do we have found the network?
if (count($networkRequestData) > 0) {
if (isFormSent('edit')) {
- // Add options list for network type
- $networkRequestData['type_options'] = generateNetworkTypeOptions($networkRequestData['network_type_id']);
-
- // Add options list for request key
- $networkRequestData['key_options'] = generateNetworkRequestKeyOptions($networkRequestData['request_param_key']);
-
// Add row template for deleting
$OUT .= loadTemplate('admin_edit_network_params_row', true, $networkRequestData);
} elseif (isFormSent('del')) {
'pagepeel',
'traffic'
),
- array(
- '{--ADMIN_NETWORK_TYPES_BANNER_CLICK_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_BANNER_CLICK--}',
- '{--ADMIN_NETWORK_TYPES_BANNER_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_BUTTON_CLICK_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_BUTTON_CLICK--}',
- '{--ADMIN_NETWORK_TYPES_BUTTON_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_SURFBAR_CLICK_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_SURFBAR_CLICK--}',
- '{--ADMIN_NETWORK_TYPES_SURFBAR_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_FORCED_BANNER--}',
- '{--ADMIN_NETWORK_TYPES_FORCED_TEXTLINK--}',
- '{--ADMIN_NETWORK_TYPES_TEXTLINK_CLICK_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_TEXTLINK_CLICK--}',
- '{--ADMIN_NETWORK_TYPES_TEXTLINK_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_SKYBANNER_CLICK_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_SKYBANNER_CLICK--}',
- '{--ADMIN_NETWORK_TYPES_SKYBANNER_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_LAYER_CLICK_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_LAYER_CLICK--}',
- '{--ADMIN_NETWORK_TYPES_LAYER_VIEW--}',
- '{--ADMIN_NETWORK_TYPES_POPUP--}',
- '{--ADMIN_NETWORK_TYPES_POPDOWN--}',
- '{--ADMIN_NETWORK_TYPES_TEXTMAIL--}',
- '{--ADMIN_NETWORK_TYPES_HTMLMAIL--}',
- '{--ADMIN_NETWORK_TYPES_LEAD--}',
- '{--ADMIN_NETWORK_TYPES_SALE--}',
- '{--ADMIN_NETWORK_TYPES_PAYPERACTIVE--}',
- '{--ADMIN_NETWORK_TYPES_PAGEPEEL--}',
- '{--ADMIN_NETWORK_TYPES_TRAFFIC--}'
- ),
+ array(),
'', '', '',
- $networkData['disabled']
+ $networkData['disabled'],
+ 'translateNetworkTypeHandler'
);
// Add form for adding new types
$ret = '';
if ($table == '/ARRAY/') {
// Selection from array
- if ((is_array($id)) && (is_array($name)) && (count($id)) == (count($name))) {
+ if ((is_array($id)) && (is_array($name)) && ((count($id)) == (count($name)) || (!empty($callback)))) {
// Both are arrays
foreach ($id as $idx => $value) {
$ret .= '<option value="' . $value . '"';
// Is the call-back function set?
if (!empty($callback)) {
// Call it
- $name[$idx] = call_user_func_array($callback, array($name[$idx]));
+ $name[$idx] = call_user_func_array($callback, array($id[$idx]));
} // END - if
// Finish option tag
} // END - foreach
} else {
// Problem in request
- debug_report_bug(__FUNCTION__, __LINE__, 'Not all are arrays: id[' . count($id) . ']=' . gettype($id) . ',name[' . count($name) . ']=' . gettype($name));
+ debug_report_bug(__FUNCTION__, __LINE__, 'Not all are arrays: id[' . count($id) . ']=' . gettype($id) . ',name[' . count($name) . ']=' . gettype($name) . ',callback=' . $callback);
}
} else {
// Data from database
<td class="{%template,ColorSwitch%}">
<input type="hidden" name="sel[$content[network_param_id]]" value="1" />
<select name="network_type_id[$content[network_param_id]]" class="admin_select" size="1">
- $content[type_options]
+ {%pipe,generateNetworkTypeOptions=$content[network_type_id]%}
</select>
</td>
</tr>
<td class="{%template,ColorSwitch%}" style="padding-left:5px">{--ADMIN_NETWORK_REQUEST_PARAMETER_KEY--}:</td>
<td class="{%template,ColorSwitch%}">
<select name="request_param_key[$content[network_param_id]]" class="admin_select" size="1">
- $content[key_options]
+ {%pipe,generateNetworkRequestKeyOptions=$content[network_param_key]%}
</select>
</td>
</tr>