skimppimppin along! NEWS   FORUM   DOWNLOAD   LINKS    
HOME ACCOUNT PRIVATE MESSAGE  
Login
Username:

Password:


Lost Password?

Register now!

Main Menu

Search

skimpydog.com Forum Index
   xoops
  Create xoops modules

Browsing this Thread:   1 Anonymous Users

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
Create xoops modules
#1
Webmaster
Joined: 2007/6/10
From Dallas, TX
Posts: 79
Level : 7
HP : 0 / 170
MP : 26 / 8763
EXP : 83
Group:
Webmasters
Registered Users
Offline
This is the basics for creating a xoops module while being able to use permissions such as access rights:

Create a folder in the modules directory:

ex:
mkdir /home/user/public_html/modules/newdirectory


Then, add the pages you want viewable in that directory such as:
Create a default index.php for the module
<?php
include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>
<!-- Start add html/php here -->


<!-- End of add html/php -->
<?php
include(XOOPS_ROOT_PATH."/footer.php");
?>




You will also want to add xoops_version.php so the module may be installed:
<?php
$modversion['name'] = "name of module";//name of module
$modversion['version'] = 1.0;
$modversion['description'] = "description of module";
$modversion['author'] = "Your Name";
$modversion['credits'] = "Company Name";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "logo.gif";
$modversion['dirname'] = "module-folder-name";//name of directory on server

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

// Menu/Sub Menu
$modversion['hasMain'] = 1;//make 0 to not have this appear in main menu
$modversion['sub'][1]['name'] = _MI_MYPAGE_SMNAME1;
$modversion['sub'][1]['url'] = "../../modules/module-folder-name/link1.php";

$modversion['sub'][2]['name'] = _MI_MYPAGE_SMNAME2;
$modversion['sub'][2]['url'] = "../../modules/module-folder-name/link2.php";

$modversion['sub'][2]['name'] = _MI_MYPAGE_MYPHPFILE;
$modversion['sub'][2]['url'] = "link3.php";//ANY PHP FILE IN SAME FOLDER AS MODULE
?>



Then you may install as a module, and change permissions in blocks/groups.
Posted on: 2008/12/20 19:19
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.
Links