$OUT .= loadTemplate('member_surfbar_list_form', true, array(
'width' => $width,
'id' => bigintval($urlId),
- 'action' => strtolower($action),
- 'title' => '{--MEMBER_SURFBAR_ACTION_' . strtoupper($action) . '_TITLE--}',
- 'submit' => '{--MEMBER_SURFBAR_ACTION_' . strtoupper($action) . '_SUBMIT--}',
+ 'action' => strtolower($action)
));
} // END - foreach
// Translate the URL status
function translateSurfbarUrlStatus ($status) {
- // Return result
- return sprintf("{--SURFBAR_URL_STATUS_%s--}", strtoupper($status));
+ // NULL must be handled carfefully
+ if (is_null($status)) {
+ // Is NULL, so return other language string
+ return '{--SURFBAR_URL_STATUS_NONE--}';
+ } else {
+ // Return regular result
+ return sprintf("{--SURFBAR_URL_STATUS_%s--}", strtoupper($status));
+ }
+}
+
+// Translates the given action into a link title for members
+function translateMemberSurfbarActionToTitle ($action) {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__][$action])) {
+ // Construct default return string (unknown
+ $GLOBALS[__FUNCTION__][$action] = '{%message,MEMBER_SURFBAR_ACTION_UNKNOWN_TITLE=' . $action . '%}';
+
+ // ... and the id's name
+ $messageId = 'MEMBER_SURFBAR_ACTION_' . strtoupper($action) . '_TITLE';
+
+ // Is the id there?
+ if (isMessageIdValid($messageId)) {
+ // Then use it
+ $GLOBALS[__FUNCTION__][$action] = '{--' . $messageId . '--}';
+ } // END - if
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__][$action];
+}
+
+// Translates the given action into a submit button for members
+function translateMemberSurfbarActionToSubmit ($action) {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__][$action])) {
+ // Construct default return string (unknown
+ $GLOBALS[__FUNCTION__][$action] = '{%message,MEMBER_SURFBAR_ACTION_UNKNOWN_SUBMIT=' . $action . '%}';
+
+ // ... and the id's name
+ $messageId = 'MEMBER_SURFBAR_ACTION_' . strtoupper($action) . '_SUBMIT';
+
+ // Is the id there?
+ if (isMessageIdValid($messageId)) {
+ // Then use it
+ $GLOBALS[__FUNCTION__][$action] = '{--' . $messageId . '--}';
+ } // END - if
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__][$action];
}
// Determine reward