#1
|
|||
|
|||
Allow guests to View pages
I saw this same post for an earlier version of the script, but I have the latest version and I only want to make a handful of pages viewable by guests not logged in.
I tried to find a loggin section of code to edit but I'm lost as to how to make a few views. |
#2
|
||||
|
||||
I don't have the script up right this moment but I think on the view files, on pages guests can't view, there is a line of code that says if user is not logged in display "Guests can't view this page please log in". I know lots of pages have that code somewhere :) Sorry I couldn't be more help! I'm out at the moment so can't get an example up.
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.
|
#3
|
|||
|
|||
I think that it only applies to earlier versions :/
|
#4
|
||||
|
||||
To achieve this, you can add this line to your constructor method for the controller:
Code:
public function __construct(){ parent::__construct("member"); // The rest of constructor code if any } Code:
$this->access = "member"; $this->handleAccess();
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#5
|
|||
|
|||
Thanks so much, I've had a play around and gotten the pages available to guests, cheers!
|
#6
|
||||
|
||||
To make it available for guests, just change this part $this->access = "member" to $this->access = "guest".
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
|
|
What's New? |
What's Hot? |
What's Popular? |