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