1
hughs
Tinycontent and private Info
  • 2004/5/26 8:02

  • hughs

  • Not too shy to talk

  • Posts: 117

  • Since: 2003/10/7


Hello.
I use Tinycontent and i have 5 pages in it, now the question is
i should like to protect one of this pages because i've want to
put some private information.
what's the best way to protect this page and how?

Thanks
hughs

2
chapi
Re: Tinycontent and private Info
  • 2004/5/26 8:17

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


Tinycontent doesn't have group permissions right now, so this is a little problem. Only way I see now is to hack the index.php of TC. I guess you like to restrict the site based on groups. So you can use the following snippet, which will firstly check if the user isn't an anonymous. Then he checks if the user belongs to the special group. For this you have to look for the groupID, maybe through your phpmyadmin.

global $xoopsUser;
if (
$id == 5) {  // id of your content
    
if(!empty($xoopsUser)) {
        
$group $xoopsUser->getGroups();
        if (
in_array(1$group)) { // 1 is the groupID
            // read content
        
}
    }
}

3
hughs
Re: Tinycontent and private Info
  • 2004/5/26 8:29

  • hughs

  • Not too shy to talk

  • Posts: 117

  • Since: 2003/10/7


Hello Chapi.
Thank you for your answer.
What i have is very private information about me ( CV,etc) and i should like people to get this with a PW, i was thinking about .htaccess, but i'm not sure if it will be possible.

hughs

Login

Who's Online

340 user(s) are online (46 user(s) are browsing Support Forums)


Members: 0


Guests: 340


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits