-// Prepare constants
-define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points']));
-define('__BEG_POINTS_MAX', TRANSLATE_COMMA($_CONFIG['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' , $_CONFIG['def_refid']);
-}
+if ((!isExtensionActive('beg')) && (!isAdmin())) {
+ loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('beg'));
+ return;
+} // END - if