Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
3 + 3 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
getGroups(); if (in_array(2, $group)) { //or other group-IDs $modversion['sub'][1]['name'] = _MI_NEWS_SMNAME1; $modversion['sub'][1]['url'] = "submit.php"; } } $modversion['sub'][2]['name'] = _MI_NEWS_SMNAME2; $modversion['sub'][2]['url'] = "archive.php"; Note: if (in_array(2, $group)) { //or other group-IDs Choosing group "2" hides the sub-menu from anon users[/quote]" />

Re: Hiding links from anonymous users
by JackJ on 2004/4/23 22:04:34

Go to the xoops_version.php file in the root of the module and look for the "menu" code.

I don't have calender, but this is how I do in in "News"

// Menu
$modversion['hasMain'] = 1;
global $xoopsUser;
if(!empty($xoopsUser)) {
$group = $xoopsUser->getGroups();

if (in_array(2, $group)) { //or other group-IDs
$modversion['sub'][1]['name'] = _MI_NEWS_SMNAME1;
$modversion['sub'][1]['url'] = "submit.php";
}
}
$modversion['sub'][2]['name'] = _MI_NEWS_SMNAME2;
$modversion['sub'][2]['url'] = "archive.php";


Note:

if (in_array(2, $group)) { //or other group-IDs

Choosing group "2" hides the sub-menu from anon users
Hiding links from anonymous users
by nthomson on 2004/4/23 21:31:22

Hi,

Is there a way to hide certain links from every one else except the webmasters?

For example, i want every one/anonymous users to view my Agendax calendar and events.But i don't want them to add a new event..So i have to hide the "Post a new event link" in minical and "Add a event" in agendax page..

I tried the following in minical.php


if ($isadmin) {
$block['postNewEvent'] = '<a href="'.XOOPS_URL.'/modules/agendax/index.php?op=eventform"><small>'._AGX_POSTANEWEVENT.'</small></a>';
}

It hides the "Post a new event link". But it hides for the admin user too.. Is there a way we can work around this?

Thanks,
Ann

Who's Online

342 user(s) are online (286 user(s) are browsing Support Forums)


Members: 0


Guests: 342


more...

Donat-O-Meter

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

Latest GitHub Commits