1
rayking
Simple Module Question
  • 2006/11/10 8:11

  • rayking

  • Just popping in

  • Posts: 8

  • Since: 2006/10/3


basically, i'm trying to have an active module that i can access through links but without having it show on the main menu.

i tried to set modversion['hasMain'] to 0 in the xoops_version.php file but the module disappears from the main menu and also from the groups page in admin.

so there is no longer a check box for setting priviliges to this module and the home page says "permission denied".

if modversion['hasMain']=1 everything works fine just that the module appears in the main menu, which i'm trying to avoid.

any way around this?
thank you.


here's the index.php:

include("../../mainfile.php");
$xoopsOption['show_cblock'] =1;
$xoopsOption['show_rblock'] = 1;
include(XOOPS_ROOT_PATH."/header.php");

some html here

include(XOOPS_ROOT_PATH."/footer.php");

------

xoops_version.php file:

$modversion['name'] = "simple_mod";//name of module
$modversion['version'] = 1.01;
$modversion['description'] = "My Module";
$modversion['author'] = "";
$modversion['credits'] = "";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "blackhat.gif";
$modversion['dirname'] = "simple1";//name of directory

// Admin things
$modversion['hasAdmin'] = 0;
$modversion['adminpath'] = "";


// Menu
// Menu for submenus in main menu when page loads
$modversion['hasMain'] = 1;//0 to remove from main menu

---

2
davidl2
Re: Simple Module Question
  • 2006/11/10 9:22

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


I'm sure that this is explained on the Xoopsdocs site

Set the module position on the module page to zero. It will then not be displayed on the main menu, but the module will be active

3
OldFriend
Re: Simple Module Question
  • 2006/11/11 7:56

  • OldFriend

  • Just popping in

  • Posts: 99

  • Since: 2005/10/28


Doesn't it make sense to use "Select groups with access rights" during the install to just allow "Webmaster". Then it will not be displayed for anyone else.

Login

Who's Online

225 user(s) are online (131 user(s) are browsing Support Forums)


Members: 0


Guests: 225


more...

Donat-O-Meter

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

Latest GitHub Commits