1
golden_edit
user block based on member of group?
  • 2004/5/26 13:35

  • golden_edit

  • Just popping in

  • Posts: 7

  • Since: 2004/5/26


Is there anyway to use this code from the user_block template:
<{/if}>
<{if $xoops_isadmin}>
Admin Menu
<{/if}>

but change the if $xoops_is!!to some other group apart from admin!!?

basically i want another link in the user block based on if your a member of a certain group? possible?

2
winsion
Re: user block based on member of group?
  • 2004/5/26 15:03

  • winsion

  • Just popping in

  • Posts: 55

  • Since: 2003/11/23


A beginning of solution (in php, no templates) :

global $xoopsUser$groups;
if (
$xoopsUser) {    
$groups $xoopsUser->getGroups();} 
else {    
$groups XOOPS_GROUP_ANONYMOUS;}
if (
$groups != "3" ){
...

3
intel352
Re: user block based on member of group?
  • 2004/5/26 16:53

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


if you give admin abilities to a group, i thought the appropriate admin menu links showed up for users of that group...

maybe i'm mistaken, but that's how it's worked for me

4
golden_edit
Re: user block based on member of group?
  • 2004/5/26 17:21

  • golden_edit

  • Just popping in

  • Posts: 7

  • Since: 2004/5/26


yes but the group is not admin and I want to make a custum link on the user_block that only appears to groups

also im a bit confused at the first post? im a newbie soz :(

any other ideas?

5
intel352
Re: user block based on member of group?
  • 2004/5/26 17:33

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


ah, i get it now, you want to make a non-admin link available to a non-admin group...

that would take some modification of the user block (php file) and the user block template


a better method is to goto Blocks Admin, and create an html block, with the link that you want that group to see. Then give that non-admin group access to see the block, should work just fine

Login

Who's Online

527 user(s) are online (80 user(s) are browsing Support Forums)


Members: 0


Guests: 527


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