-// Prepare constants
-define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points')));
-define('__BEG_POINTS_MAX', TRANSLATE_COMMA(getConfig('beg_points_max')));
-if ($GLOBALS['refid'] > 0) {
- // Take referal ID from URL/Cookie
- define('__BEG_UID' , $GLOBALS['refid']);
-} else {
- // Take default referal ID
- define('__BEG_UID' , getConfig('def_refid'));
-}
+if ((!isExtensionActive('beg')) && (!isAdmin())) {
+ loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg'));
+ return;
+} // END - if