Skip to content

Commit

Permalink
Correct text for membersonly site and disabled login
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmi08 authored Sep 2, 2024
1 parent 347246d commit 8e04ec8
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions e107_core/shortcodes/batch/membersonly_shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,26 @@ function sc_membersonly_restricted_area()
*/
function sc_membersonly_login()
{

$srch = array("[", "]");
$repl = array("<a class='alert-link' href='" . e_LOGIN . "'>", "</a>");

return str_replace($srch, $repl, LAN_MEMBERS_2);
$pref = e107::pref('core');
switch(intval($pref['user_reg'])) {
case 0:
$text = "";
break;
case 1:
$srch = array("[", "]");
$repl = array("<a class='alert-link' href='" . e_LOGIN . "'>", "</a>");
$text = str_replace($srch, $repl, LAN_MEMBERS_2);
break;
case 2:
$srch = array("[", "]");
$repl = array("<a class='alert-link' href='" . e_LOGIN . "'>", "</a>");
$text = str_replace($srch, $repl, LAN_MEMBERS_2) . ".";
break;
default:
$text = "";
break;
}
return $text;
}

}

0 comments on commit 8e04ec8

Please sign in to comment.