[NEED][revcms] Tab say register when not logged in

sim0n

Member
Feb 16, 2013
227
15
So I want the first tab, where it currently says {username} to be register, and so it redirects to the register page.

OR

That you can't access /community or /staff when you are not logged in.

heres a pic cus i cant describe things
2mph17k.png
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,132
2,456
App -> open class.core.php
Search:
PHP:
case "me":
case "account":
case "news":
header('Location: '.$_CONFIG['hotel']['url'].'/index');
exit;
break;

Change it to:
PHP:
case "me":
case "account":
case "news":
case "community":
case "staff":
header('Location: '.$_CONFIG['hotel']['url'].'/index');
exit;
break;

And for the {username} stuff, I'm not sure, but try this:
App -> open class.template.php
Search:
PHP:
$this->setParams('hotelName', $_CONFIG['hotel']['name']);
Add below:
PHP:
$this->setParams('username', '<a href="/register">Register<a>');
 

sim0n

Member
Feb 16, 2013
227
15
App -> open class.core.php
Search:
PHP:
case "me":
case "account":
case "news":
header('Location: '.$_CONFIG['hotel']['url'].'/index');
exit;
break;

Change it to:
PHP:
case "me":
case "account":
case "news":
case "community":
case "staff":
header('Location: '.$_CONFIG['hotel']['url'].'/index');
exit;
break;

And for the {username} stuff, I'm not sure, but try this:
App -> open class.template.php
Search:
PHP:
$this->setParams('hotelName', $_CONFIG['hotel']['name']);
Add below:
PHP:
$this->setParams('username', '<a href="/register">Register<a>');
The first one worked great, but it's not that fun to have. But it'll do.

if you want to fix the other one, and be like awesome and stuff, i mean like more awesome: this is how it looks right now.

143kxea.png
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,132
2,456
What you could do is:
Change
PHP:
case "me":
case "account":
case "news":
header('Location: '.$_CONFIG['hotel']['url'].'/index');
exit;
break;

To:
PHP:
case "me":
header('Location: '.$_CONFIG['hotel']['url'].'/register');
exit;
break;
 
case "account":
case "news":
case "community":
case "staff":
header('Location: '.$_CONFIG['hotel']['url'].'/index');
exit;
break;

And
PHP:
$this->setParams('username', '<a href="/register">Register<a>');
To
PHP:
$this->setParams('username', 'Register');
 

sim0n

Member
Feb 16, 2013
227
15
What you could do is:
Change
PHP:
case "me":
case "account":
case "news":
header('Location: '.$_CONFIG['hotel']['url'].'/index');
exit;
break;

To:
PHP:
case "me":
header('Location: '.$_CONFIG['hotel']['url'].'/register');
exit;
break;
 
case "account":
case "news":
case "community":
case "staff":
header('Location: '.$_CONFIG['hotel']['url'].'/index');
exit;
break;

And
PHP:
$this->setParams('username', '<a href="/register">Register<a>');
To
PHP:
$this->setParams('username', 'Register');
So, if you go to url/me it redirects you to the register page, but all the other pages redirects you to url/index.

Have you read what I wanted this to do? I wanted it to be allowed to get to /community and /staff, and that the button is supposed to redirect you to register.

EDIT: + If you are logged in, /me tell you that your name is Register(thename)
 

Users who are viewing this thread

Top