Forum Index   -   Topic Index
   Tools
     enCube tool: system requirement remover
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
Mikhail
Posted on: 2007/11/8 22:45
Home away from home
Joined: 2005/12/30
From: Rio de Janeiro, Brasil
Posts: 444
enCube tool: system requirement remover
I'm coding a new tool to remove the system module requirement of modules and themes. Sure, is not perfect in some cases, but can be very useful.

A good example is the MultiMenu module, please, look the sql file:


INSERT INTO `multimenu08` VALUES (1, 2, 'General Settings', 1, 1, 'modules/system/admin.php?fct=preferences&op=show&confcat_id=1', '', 3, '_blank', '1');
INSERT INTO `multimenu08` VALUES (2, 2, 'Preferences', 1, 0, 'modules/system/admin.php?fct=preferences', '', 2, '_blank', '1');
INSERT INTO `multimenu08` VALUES (3, 2, 'User Settings', 1, 1, 'modules/system/admin.php?fct=preferences&op=show&confcat_id=2', '', 4, '_blank', '1');
INSERT INTO `multimenu08` VALUES (4, 2, 'Meta & Footer', 1, 1, 'modules/system/admin.php?fct=preferences&op=show&confcat_id=3', '', 5, '_blank', '1');
INSERT INTO `multimenu08` VALUES (5, 5, 'Admin', 1, 4, 'admin.php', '', 0, '_blank', '1');
INSERT INTO `multimenu08` VALUES (6, 2, 'Word Censorship', 1, 1, 'modules/system/admin.php?fct=preferences&op=show&confcat_id=4', '', 6, '_blank', '1');
INSERT INTO `multimenu08` VALUES (7, 2, 'Search Options', 1, 1, 'modules/system/admin.php?fct=preferences&op=show&confcat_id=5', '', 7, '_blank', '1');
INSERT INTO `multimenu08` VALUES (8, 2, 'Mail Setup', 1, 1, 'modules/system/admin.php?fct=preferences&op=show&confcat_id=6', '', 8, '_blank', '1');
INSERT INTO `multimenu08` VALUES (38, 37, 'Admin', 1, 2, 'modules/news/admin/', '', 31, '_blank', '1');
INSERT INTO `multimenu08` VALUES (36, 36, 'Modules', 1, 4, '', '', 29, '_self', '1 2 3');
INSERT INTO `multimenu08` VALUES (37, 37, 'News', 1, 0, 'modules/news/', '', 30, '_self', '1 2 3');
INSERT INTO `multimenu08` VALUES (12, 12, 'Blocks', 1, 0, 'modules/system/admin.php?fct=blocksadmin&selmod=-1&selgrp=2&selvis=2', '', 10, '_blank', '1');
INSERT INTO `multimenu08` VALUES (13, 12, 'Visible', 1, 1, 'modules/system/admin.php?fct=blocksadmin&selmod=-1&selgrp=2&selvis=1', '', 11, '_blank', '1');
INSERT INTO `multimenu08` VALUES (14, 12, 'Hidden', 1, 1, 'modules/system/admin.php?fct=blocksadmin&selmod=-1&selgrp=2&selvis=0', '', 12, '_blank', '1');
INSERT INTO `multimenu08` VALUES (39, 37, 'Create article', 1, 2, 'modules/news/admin/index.php?op=newarticle', '', 32, '_blank', '1');
INSERT INTO `multimenu08` VALUES (16, 12, 'Add custom block', 1, 1, 'modules/system/admin.php?fct=blocksadmin#newblock', '', 13, '_blank', '1');
INSERT INTO `multimenu08` VALUES (18, 18, 'Groups', 1, 0, 'modules/system/admin.php?fct=groups', '', 18, '_blank', '1');
INSERT INTO `multimenu08` VALUES (19, 19, 'Users', 1, 0, 'modules/system/admin.php?fct=users', '', 14, '_blank', '1');
INSERT INTO `multimenu08` VALUES (20, 19, 'Find', 1, 1, 'modules/system/admin.php?fct=findusers', '', 15, '_blank', '1');
INSERT INTO `multimenu08` VALUES (21, 21, 'Modules', 1, 0, 'modules/system/admin.php?fct=modulesadmin', '', 9, '_blank', '1');
INSERT INTO `multimenu08` VALUES (22, 19, 'Mail', 1, 1, 'modules/system/admin.php?fct=mailusers', '', 16, '_blank', '1');
INSERT INTO `multimenu08` VALUES (23, 19, 'Ranks', 1, 1, 'modules/system/admin.php?fct=userrank', '', 17, '_blank', '1');
INSERT INTO `multimenu08` VALUES (25, 18, 'Webmaster', 1, 1, 'modules/system/admin.php?fct=groups&op=modify&g_id=1', '', 19, '_blank', '1');
INSERT INTO `multimenu08` VALUES (26, 18, 'Registered', 1, 1, 'modules/system/admin.php?fct=groups&op=modify&g_id=2', '', 20, '_blank', '1');
INSERT INTO `multimenu08` VALUES (27, 18, 'Anonymous', 1, 1, 'modules/system/admin.php?fct=groups&op=modify&g_id=3', '', 21, '_blank', '1');
INSERT INTO `multimenu08` VALUES (28, 28, 'Misc.', 1, 0, '', '', 22, '_blank', '1');
INSERT INTO `multimenu08` VALUES (29, 28, 'Banner', 1, 1, 'modules/system/admin.php?fct=banners', '', 23, '_blank', '1');
INSERT INTO `multimenu08` VALUES (30, 28, 'Image manager', 1, 1, 'modules/system/admin.php?fct=images', '', 24, '_blank', '1');
INSERT INTO `multimenu08` VALUES (31, 28, 'Smilies', 1, 1, 'modules/system/admin.php?fct=smilies', '', 25, '_blank', '1');
INSERT INTO `multimenu08` VALUES (32, 28, 'Avatars', 1, 1, 'modules/system/admin.php?fct=avatars', '', 26, '_blank', '1');
INSERT INTO `multimenu08` VALUES (33, 28, 'Template manager', 1, 1, 'modules/system/admin.php?fct=tplsets', '', 27, '_blank', '1');
INSERT INTO `multimenu08` VALUES (34, 28, 'Comments', 1, 1, 'modules/system/admin.php?fct=comments', '', 28, '_blank', '1');
INSERT INTO `multimenu08` VALUES (35, 35, 'System admin', 1, 4, 'modules/system/admin.php', '', 1, '_blank', '1 2 3');
INSERT INTO `multimenu08` VALUES (40, 37, 'Submit new', 1, 2, 'modules/news/submit.php', '', 33, '_self', '1 2 3');






Now, after the use of enCube tool:


INSERT INTO `xclmenus08` VALUES (1, 2, 'General Settings', 1, 1, 'modules/legacy/admin/index.php?action=PreferenceEdit&confcat_id=1', '', 3, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (2, 2, 'Preferences', 1, 0, 'modules/legacy/admin/index.php?action=PreferenceList', '', 2, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (3, 2, 'User Settings', 1, 1, 'modules/user/admin/index.php', '', 4, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (4, 2, 'Meta & Footer', 1, 1, 'modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=4', '', 5, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (5, 5, 'Admin', 1, 4, 'admin.php', '', 0, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (6, 2, 'Word Censorship', 1, 1, 'modules/legacy/admin/index.php?action=PreferenceEdit&confcat_id=4', '', 6, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (7, 2, 'Search Options', 1, 1, 'modules/legacy/admin/index.php?action=PreferenceEdit&confcat_id=5', '', 7, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (8, 2, 'Mail Setup', 1, 1, 'modules/legacy/admin/index.php?action=PreferenceEdit&confcat_id=6', '', 8, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (38, 37, 'Admin', 1, 2, 'modules/news/admin/', '', 31, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (36, 36, 'Modules', 1, 4, '', '', 29, '_self', '1 2 3');
INSERT INTO `xclmenus08` VALUES (37, 37, 'News', 1, 0, 'modules/news/', '', 30, '_self', '1 2 3');
INSERT INTO `xclmenus08` VALUES (12, 12, 'Blocks', 1, 0, 'modules/legacy/admin/index.php?action=BlockList&selmod=-1&selgrp=2&selvis=2', '', 10, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (13, 12, 'Visible', 1, 1, 'modules/legacy/admin/index.php?action=BlockInstallList', '', 11, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (14, 12, 'Hidden', 1, 1, 'modules/legacy/admin/index.php?action=BlockInstallList', '', 12, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (39, 37, 'Create article', 1, 2, 'modules/news/admin/index.php?op=newarticle', '', 32, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (16, 12, 'Add custom block', 1, 1, 'modules/legacy/admin/index.php?action=BlockList', '', 13, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (18, 18, 'Groups', 1, 0, 'modules/user/admin/index.php?action=GroupList', '', 18, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (19, 19, 'Users', 1, 0, 'modules/user/admin/index.php', '', 14, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (20, 19, 'Find', 1, 1, 'modules/user/admin/index.php?action=UserSearch', '', 15, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (21, 21, 'Modules', 1, 0, 'modules/legacy/admin/index.php?action=ModuleList', '', 9, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (22, 19, 'Mail', 1, 1, 'modules/user/admin/index.php?action=MailjobList', '', 16, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (23, 19, 'Ranks', 1, 1, 'modules/user/admin/index.php?action=RanksList', '', 17, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (25, 18, 'Webmaster', 1, 1, 'modules/user/admin/index.php?action=GroupEdit&groupid=1', '', 19, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (26, 18, 'Registered', 1, 1, 'modules/user/admin/index.php?action=GroupEdit&groupid=2', '', 20, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (27, 18, 'Anonymous', 1, 1, 'modules/user/admin/index.php?action=GroupEdit&groupid=3', '', 21, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (28, 28, 'Misc.', 1, 0, '', '', 22, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (29, 28, 'Banner', 1, 1, 'modules/legacyRender/admin/index.php?action=BannerList', '', 23, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (30, 28, 'Image manager', 1, 1, 'modules/legacy/admin/index.php?action=ImagecategoryList', '', 24, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (31, 28, 'Smilies', 1, 1, 'modules/legacy/admin/index.php?action=SmilesList', '', 25, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (32, 28, 'Avatars', 1, 1, 'modules/user/admin/index.php?action=AvatarList', '', 26, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (33, 28, 'Template manager', 1, 1, 'modules/legacyRender/admin/index.php?action=TplsetList', '', 27, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (34, 28, 'Comments', 1, 1, 'modules/legacy/admin/index.php?action=CommentList', '', 28, '_blank', '1');
INSERT INTO `xclmenus08` VALUES (35, 35, 'System admin', 1, 4, 'modules/legacy/admin/index.php', '', 1, '_blank', '1 2 3');
INSERT INTO `xclmenus08` VALUES (40, 37, 'Submit new', 1, 2, 'modules/news/submit.php', '', 33, '_self', '1 2 3');



One note: in this case, the encube also rename/clone the multimenu module to xclMenus



Download:
http://www.esnips.com/doc/6fa2bcc7-81cf-41dd-8837-725bfb8f9c6a/encube-v0.7.1.1.0.4


----------------
XOOPS Brasil

Threaded | Newest First Previous Topic | Next Topic | Top

Register To Post
 

Who's Online
20 user(s) are online (12 user(s) are browsing Forums)

Members: 0
Guests: 20

more...

Welcome | News | Overview | Documentation | Forum | Tutorialstop
Brasilian | French | German | Greek | Japanese | Korean | Russian | T-Chinese
Powered by XOOPS Cube © 2001-2011 The XOOPS Cube Project