PEAK XOOPS - mymenu 1.00 for conventional modules in englishin japanese






Main : Etc. : 

Category: Etc.           php5
Download Now! mymenu 1.00 for conventional modules Popular Version: 1.00
Submitted Date:  2008/12/8
Description:
in englishin japanese- mymenu for conventional modules -


SUMMARY:

This file makes your conventional module friendly with altsys.
If you make D3 modules, try "mymenu for D3".


BACKGROUND:

myblocksadmin, mytplsadmin or mylangadmin offered by altsys will be more useful if the user can access them via the module's admin area directly.

This "mymenu" must help module developpers and site administrators.


HOW TO USE:

1) copy mymenu.php to modules/(your module)/admin/

2) edit all of your admin's files and add include('./mymenu.php');
after xoops_cp_header();

3) edit admin/index.php and insert branch code for altsys after including cp_header.php

4) insert a constant definition '_MYMENU_CONSTANT_IN_MODINFO' into the top of admin/index.php for preventing notices by double definitions. (if necessary)

5) define constants _MD_A_MYMENU_MYTPLSADMIN , _MD_A_MYMENU_MYBLOCKSADMIN , _MD_A_MYMENU_MYLANGADMIN , _MD_A_MYMENU_MYPREFERENCES in your language/(lang)/admin.php (if necessary)


This is a sample skelton of your admin/index.php

require_once( '../../../include/cp_header.php' ) ;
define( '_MYMENU_CONSTANT_IN_MODINFO' , '(constant name defined in modinfo.php)' ) ;

// branch for altsys
if( defined( 'XOOPS_TRUST_PATH' ) && ! empty( $_GET['lib'] ) ) {
	$mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
	$mydirpath = dirname( dirname( __FILE__ ) ) ;

	// common libs (eg. altsys)
	$lib = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , $_GET['lib'] ) ;
	$page = preg_replace( '/[^a-zA-Z0-9_-]/' , '' , @$_GET['page'] ) ;
	
	if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ) ) {
		include XOOPS_TRUST_PATH.'/libs/'.$lib.'/'.$page.'.php' ;
	} else if( file_exists( XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ) ) {
		include XOOPS_TRUST_PATH.'/libs/'.$lib.'/index.php' ;
	} else {
		die( 'wrong request' ) ;
	}
	exit ;
}


(DB update section)

xoops_cp_header() ;
include(dirname(__FILE__).'/mymenu.php');

(output section)

xoops_cp_footer() ;


code snippet for language/(lang)/admin.php

// altsys
define('_MD_A_MYMENU_MYTPLSADMIN','Templates');
define('_MD_A_MYMENU_MYBLOCKSADMIN','Permissions');
define('_MD_A_MYMENU_MYLANGADMIN','Literals');
define('_MD_A_MYMENU_MYPREFERENCES','Preferences');


That's all !





CHANGELOG:

2008-12-08 1.00 modified altsys friendly radically
2007-03-22 0.20 added page title for breadcrumbs of "admin in theme"
2006-12-18 0.19 modified compatibility environment without XOOPS_TRUST_PATH
2006-10-31 0.18 modified compatibility with Cube 2.1
modified altsys friendly
2006-05-03 0.17 updated gticket2
2006-02-10 0.16 fixed compatibility problem with XoopsCube2.1alpha (thx nobunobu)
2005-11-13 0.15 modified the compatibility with PHP 5.0.5
modified some files from CR+LF into LF
fixed some Notices in saving preferences (0.15a)
2005-06-09 0.14 modified 'area' in preference.inc.php
2005-05-25 0.13 modified XoopsGTicket supports 'area' and 'referer'
2005-02-22 0.12 fixed a typo of HTML tag
2005-02-21 0.11 disable checking IP
modified not to display top menu against ORETEKI
modified HTML of menu
2005-01-13 0.10 modified ticket system (limit stubs max 10)
fixed the highlight and the link to configs
2005-01-04 0.08 modified the usage of XoopsForm (thx okuhiki)
2004-12-30 0.07 modified using $_SERVER instead of $_ENV (thx Marijuana)
2004-12-16 0.06 eliminated unsed codes from preferences.inc.php for the security
2004-12-10 0.05 modified ticket system
2004-12-06 0.04 modified ticket system
2004-12-05 0.03 modified ticket system
2004-12-03 0.02 modified to use $_GET or $_POST instead of $HTTP_*_VARS (mari)
added admin_refcheck() for security (mari)
added ticket system for security (mari)
eliminated foreach() extraction from $_POST (mari)
fixed a place to include language files (thx marcan)
2004-06-15 0.01 the first release



COPYRIGHT:

I do not insist on the right of these codes, and don't guarantee.


Downloaded 13491 times  13491  File Size 3.51 KB  Supported Platforms zip|php5  Home Page http://www.peak.ne.jp/
Modify | Report Broken File | Tell a Friend | Comments (0)


Comments list

Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!