// Add meta description to header
if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) {
// Add meta description not in admin and login module and when the script is installed
- generateMetaDescriptionCode(getModule(), getWhat());
+ generateMetaDescriptionCode();
} // END - if
} // END - if
$GLOBALS['output'] = $GLOBALS['page_header'] . $GLOBALS['output'] . $GLOBALS['page_footer'];
}
+// Generates meta description for current module and 'what' value
+function generateMetaDescriptionCode () {
+ // Only include from guest area
+ if (getModule() == 'index') {
+ // Construct dynamic description
+ $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . getTitleFromMenu('guest', getWhat());
+
+ // Output it directly
+ $GLOBALS['page_header'] .= '<meta name="description" content="' . $DESCR . '" />';
+ } // END - if
+
+ // Remove depth
+ unset($GLOBALS['ref_level']);
+}
+
//////////////////////////////////////////////////
// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
//////////////////////////////////////////////////
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s LIMIT 1", array(bigintval($userid)), __FUNCTION__, __LINE__);
}
-// Generates meta description for given module and 'what' value
-function generateMetaDescriptionCode ($module, $what) {
- // Only include from guest area
- if ($module == 'index') {
- // Construct dynamic description
- $DESCR = '{?MAIN_TITLE?} '.trim(getConfig('title_middle')) . ' ' . getTitleFromMenu('guest', $what);
-
- // Output it directly
- $GLOBALS['page_header'] .= '<meta name="description" content="' . $DESCR . '" />';
- } // END - if
-
- // Remove depth
- unset($GLOBALS['ref_level']);
-}
-
// Gets the matching what name from module
function getWhatFromModule ($modCheck) {
// Is the request element set?