if ((isExtensionActive('active')) && (isExtensionActive('online'))) {
// Init fake-content because there is no `what`='active' in database
$content = array(
- 'menu' => '<a class="menu_blur" href="{%url=modules.php?module=index&what=active%}">{%config=menu_blur_spacer%}{--GUEST_ACTIVE_LINK--}</a>',
+ 'menu' => '<a class="menu_blur" href="{%url=modules.php?module=index&what=active%}">{?menu_blur_spacer?}{--GUEST_ACTIVE_LINK--}</a>',
'what' => 'active',
'visible' => 'Y',
'locked' => 'N'
// Write his welcome-points
// @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
- addPointsDirectly('register_welcome', $userid, getConfig('points_register'));
+ addPointsDirectly('register_welcome', $userid, getPointsRegister());
// Write catgories
if ((is_array(postRequestParameter('cat'))) && (count(postRequestParameter('cat')))) {
// Yes, then do some sanity-checks
switch (getRequestParameter('sub')) {
case 'points':
- if ((!isPostRequestParameterSet(('points_register'))) || (!isPostRequestParameterSet(('points_ref')))) {
+ if ((!isPostRequestParameterSet('points_register')) || (!isPostRequestParameterSet('points_ref'))) {
unsetPostRequestParameter('ok');
- }
+ } // END - if
break;
case 'ref':
if (isGetRequestParameterSet('do')) {
- if (((!isPostRequestParameterSet(('level'))) || (!isPostRequestParameterSet(('percents')))) && (getRequestParameter('do') == 'add')) {
+ if (((!isPostRequestParameterSet('level')) || (!isPostRequestParameterSet('percents'))) && (getRequestParameter('do') == 'add')) {
unsetPostRequestParameter('ok');
}
}
// Add one-time referal bonus over referal system or directly
// @TODO Try to rewrite the following unset()
unset($GLOBALS['ref_level']);
- addPointsThroughReferalSystem('referal_bonus', $refid, getConfig('points_ref'), true, bigintval($userid), $locked, getConfig('reg_points_mode'));
+ addPointsThroughReferalSystem('referal_bonus', $refid, getPointsRef(), true, bigintval($userid), $locked, getConfig('reg_points_mode'));
} // END - if
} // END - if
$points = bigintval($points[0]);
// Remove the registration fee
- $points = $points - getConfig('points_register');
+ $points = $points - getPointsRegister();
// Is this enougth for a payout?
if ($points < getConfig('primera_min_payout')) {
$points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
// Remove the registration fee
- $points = $points - getConfig('points_register');
+ $points = $points - getPointsRegister();
// Is there a percentage or fixed fee?
$points = WERNIS_TAKE_FEE($points, 'payout');
}
// Menu title
- $OUT .= getConfig('menu_blur_spacer') . $content['sub_title'];
+ $OUT .= '{?menu_blur_spacer?}' . $content['sub_title'];
if (isIncludeReadable($inc)) {
$OUT .= '</a>';
return $GLOBALS['copy'];
}
+// "Getter" for webmaster
+function getWebmaster () {
+ // Do we have cache?
+ if (!isset($GLOBALS['webmaster'])) {
+ // Determine it
+ $GLOBALS['webmaster'] = getConfig('WEBMASTER');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['webmaster'];
+}
+
// "Getter" for sql_count
function getSqlCount () {
// Do we have cache?
return $GLOBALS['dns_cache_timeout'];
}
+// "Getter" for menu_blur_spacer
+function getMenuBlurSpacer () {
+ // Do we have cache?
+ if (!isset($GLOBALS['menu_blur_spacer'])) {
+ // Determine it
+ $GLOBALS['menu_blur_spacer'] = getConfig('menu_blur_spacer');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['menu_blur_spacer'];
+}
+
+// "Getter" for points_register
+function getPointsRegister () {
+ // Do we have cache?
+ if (!isset($GLOBALS['points_register'])) {
+ // Determine it
+ $GLOBALS['points_register'] = getConfig('points_register');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['points_register'];
+}
+
+// "Getter" for points_ref
+function getPointsRef () {
+ // Do we have cache?
+ if (!isset($GLOBALS['points_ref'])) {
+ // Determine it
+ $GLOBALS['points_ref'] = getConfig('points_ref');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['points_ref'];
+}
+
// Checks wether proxy configuration is used
function isProxyUsed () {
// Do we have cache?