|
marcribe
Noobie
Posts: 7
I'm a llama!
|
|
Re:Registration: Administrators only
« Reply #1 on: March 06, 2002, 05:15:57 PM » |
|
I've made a mod that you can cancel registration of new members. you can see it at: www.ocbrasil.com.br/forumand try to register
|
|
|
Logged
|
|
|
|
|
|
|
|
|
|
TheJkWhoSaysNi
YaBB God
Posts: 1025
I dont know what to put here, i'll leave it blank.
|
|
Re:Registration: Administrators only
« Reply #8 on: March 23, 2002, 09:44:09 PM » |
|
ok, in subs.php line 132
if($username == "Guest") { $yymenu .= $menusep."<a href=\"$cgi;action=login\">$img[login]</a>$menusep<a href=\"$cgi;action=register\">$img[register]</a>"; change to
if($username == "Guest") { $yymenu .= $menusep."<a href=\"$cgi;action=login\">$img[login]</a>"; then line 31
if($settings[7] == 'Administrator') { $yymenu = $yymenu.$menusep."<a href=\"$cgi;action=admin\">$img[admin]</a>"; } change to
if($settings[7] == 'Administrator') { $yymenu = $yymenu.$menusep."<a href=\"$cgi;action=admin\">$img[admin]</a>$menusep<a href=\"$cgi;action=register\">$img[register]</a>"; } then on line 170:
$yyuname = ($username == 'Guest') ? "$txt[248] <b>$txt[28]</b>. $txt[249] <a href=\"$cgi;action=login\">$txt[34]</a> $txt[377] <a href=\"$cgi;action=register\">$txt[97]</a>." : "$txt[247] <b>$tmp</b>, "; change to:
$yyuname = ($username == 'Guest') ? "$txt[248] <b>$txt[28]</b>. $txt[249] <a href=\"$cgi;action=login\">$txt[34]</a>" : "$txt[247] <b>$tmp</b>, "; (making it so only admins can see the register button and guests cant)
Now, to make it more secure so people cant go to index.php?action=register and register open up register.php search for
$registerplver="YaBB SE"; and add after:
is_admin();
and you are done!
(i did not test this, so if you have any problems, or something is wrong just reply here and i'll fix it in this post)
[Edit: Updated: 25th march - line 132 changed, it should work properly now]
|
|
« Last Edit: March 25, 2002, 08:18:47 PM by Tom B »
|
Logged
|
WARNING: THIS POST MAY CONTAIN TRACES OF PEANUT!!! I'm listening to....
|
|
|
|
|
|
|
Swat
Noobie
Posts: 29
need some help with mods :P
|
|
Re:Registration: Administrators only
« Reply #13 on: July 14, 2002, 10:21:44 AM » |
|
hi Tom B great mod but what do you mean with this? what do i have to change Code:$registerplver="YaBB SE"; and add after: Code:is_admin();
|
|
« Last Edit: July 14, 2002, 10:50:05 AM by Swat »
|
Logged
|
|
|
|
|