1
fdeconiac
Using user table for manage display of external content
  • 2011/5/2 7:52

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Hi all,

I just developped somes php pages (my first ones) (which do not open yet in my xoops site - they are independants), and i would like to manage the display of some contents depending on users groups... (in fact use the user management system for my pages).

I'm using the same db and ftp directory.

So, could you indicate me any "simple" topic on it ?

Is it as simple as adding an include in the header and a code like :
?

Thanks for your help

2
redheadedrod
Re: Using user table for manage display of external content

There are a couple smarty tags but beyond that you will have to use PHP code to decipher your groups.

If you look in some of the themes you will see these smarty variables being used...

isadmin
isuser

I am not sure of the exact references on these but I am assuming they are looking for membership in the "registered users" and "admin" groups.

And there are xoops specific objects in the xoops_user class that you can pull the group memberships out of but I would have to look at examples when I get home. Unless someone else does so before I get home.

I have a program that automatically adds or subtracts someone from a group but the object code with xoops 2.4.5 would error out so I had to access the database directly to modify groups. I don't believe that reading them caused me any grief though so I can try to look at that code later.

3
blackrx
Re: Using user table for manage display of external content
  • 2011/5/2 14:59

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1



Login

Who's Online

126 user(s) are online (32 user(s) are browsing Support Forums)


Members: 1


Guests: 125


walkero,

more...

Donat-O-Meter

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

Latest GitHub Commits