UMIL/UMIF - New MOD Installation Library - Feedback needed

Discussion forum for MOD Writers regarding MOD Development.
User avatar
Highway of Life
Former Team Member
Posts: 6048
Joined: Wed Feb 02, 2005 5:41 pm
Location: Seattle, WA
Name: David Lewis
Contact:

UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by Highway of Life » Tue Dec 02, 2008 9:19 pm

Introducing UMIL - What is it?
The MOD Team is working on creating a new tool for the MOD Community. This new tool called UMIL (Unified MOD Install Library) built by EXreaction under the supervision of the MOD Team, enables MOD Authors to create simple installation scripts for their MOD that allow the user to one-click install, update, or uninstall a MOD.

UMIL does not perform file edits. AutoMOD (Blinky) is the tool of choice for file edits and installing MODs from a MODX (xml) file. However, AutoMOD (Blinky) does not perform database changes. This is why UMIL exists.

What does UMIL do?
The Unified MOD Install Library will perform the following operations:
  1. Cache functions
    • Purge Cache
  2. Config functions
    • Add configs
    • Update configs
    • Remove configs
    • Determine if a config exists
  3. Module functions
    • Add modules
    • Remove modules
    • Determine if a module exists
  4. Permissions/Auth functions
    • Add Permissions
    • Remove permissions
    • Determine if a permission exists
  5. Table functions
    • Add tables
    • Remove tables
    • Determine if a table exists
  6. Table column functions
    • Add columns
    • Remove columns
    • Update (change) columns
    • Determine if a column exists
  7. Table Key/Index functions
    • Add key/index
    • Remove key/index
    • Determine if a key/index exists
How does the end-user use UMIL?
When a user download’s a UMIL enabled Modification, they can run the installation script (called a UMIF - Unified MOD Install File) provided with the MOD through a browser on their server. This file will call UMIL - if the UMI Library not exist, the script allows the user to easily download UMIL and then run the installation script provided by the MOD Author. UMI Files can be ran in much the same way phpBB3 is installed onto the server.
UMIFs provide a nice GUI (Graphical User Interface) that enables the user to easily install, update and uninstall MODs.

Multiple translations are supported in the UMI library with no need for MOD Authors to support all languages. They are automatically translated and provided within the UMI Library.

How does UMIL benefit the end-user?
UMIL makes installing modules, permissions, making SQL changes, purging caches, etc. an easy and pain-free task. The user would simply run the installation script provided and the UMI Library would determine how it needs to run, if it needs to update the installation of the MOD, install the MOD, or uninstall the MOD at the user’s request. Where MODs would normally use the DIY-Instructions in MODX, or their own installation script, they would now use the UMI Library.

How does the MOD Author use UMIL?
The MOD Author will create a file called the UMIF (Unified MOD Install File), this file utilises the UMI Library to perform the database installation, updates or uninstalls at the user’s request. UMIL is a very easy to use API (Application Programming Interface) that allows MOD Authors to easily and quickly create UMIF files. UMIL is extremely intuitive and easy to learn.
The MOD Team will also provide a method by which MOD Authors can easily create a UMI File through a GUI tool located on phpBB.com

How does UMIL benefit the MOD Author?
UMIL will allow MOD Authors to create installation scripts very easily and quickly. These installation files will conform to the MOD Database Guidelines with regard to language and templates. UMIL provides translations and templates for the GUI, so there is no need for the MOD Author to create anything other than the database actions to install the MOD.
This means that it will alleviate complicated instructions in the DIY section of MODX files, and will diminish support requests for installation of database changes, such as installing modules, creating new permissions, adding configs, or running SQL queries.
UMIL is use friendly, so it will mean less support headaches, and decreased user-error.

UMIL Progress/Status
UMIL is currently in the testing phase of development, nearing release. However, the MOD Team would like feedback from the community on what features and functionality to include into UMIL before releasing it to the public, thus the reason for this topic.

Feedback, Suggestions, Comments
The MOD Team is looking for feedback and suggestions on what you would like to see in a UMI Library, what kind of functionality would you be looking for as a MOD Author. What can we add to UMIL that will fulfil all of your needs?
The phpBB Weekly Podcast - Discussing the developments of phpBB4 and beyond.

New to phpBB3? Want to learn about programing?
Visit phpBB Academy at StarTrekGuide to learn how.

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by Erik Frèrejean » Tue Dec 02, 2008 9:31 pm

I haven't had the opportunity to look closer at this but I like the idea of such a package :).
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
mtotheikle
Registered User
Posts: 188
Joined: Thu Sep 25, 2008 5:32 am
Location: Spokane, WA
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by mtotheikle » Wed Dec 03, 2008 3:08 am

This will definitely be nice for MOD Authors, making install scripts more unified and also allowing us to spend more time developing the MOD instead of working on the install/update script and making sure it will work for everyone.
New to phpBB3? Want to learn about programing? Then phpBB Academy is the place for you!

No support via PM, I will not respond!

Image

idiotnesia
Registered User
Posts: 509
Joined: Sun Jun 18, 2006 10:58 am
Location: www.phpbbindonesia.com
Name: Pungky Putra
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by idiotnesia » Wed Dec 03, 2008 4:39 am

wow nice script, i'm sure it will be very useful for mod authors.

About the permissions feature can the script also assign the permission to user? for example for registered user.

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by Erik Frèrejean » Wed Dec 03, 2008 8:18 am

Having a quick look at the code I don't think it sets permissions, but that would indeed be a really nice feature in this tool ;).
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
Highway of Life
Former Team Member
Posts: 6048
Joined: Wed Feb 02, 2005 5:41 pm
Location: Seattle, WA
Name: David Lewis
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by Highway of Life » Wed Dec 03, 2008 8:48 am

Erik Frèrejean wrote:Having a quick look at the code I don't think it sets permissions, but that would indeed be a really nice feature in this tool ;).
Can you guys be a bit more specific on how this could be achieved?
Permissions on a per-user basis are a no-no, so I think it would be either group based, or role based, which to me is a much better option. If this functionality were added, how would the MOD Author go about specifying it, or would he? would the responsibility of choosing which role(s) to add the permission to fall on the administrator running the installation script?
The phpBB Weekly Podcast - Discussing the developments of phpBB4 and beyond.

New to phpBB3? Want to learn about programing?
Visit phpBB Academy at StarTrekGuide to learn how.

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by Erik Frèrejean » Wed Dec 03, 2008 9:15 am

Sorry David :).

No user based is an absolute no, I agree on that one :).

I'll try if I can explain what I mean. Im my MOD installers I first create a auth the same way as UMIL does, but than often find myself in the position that the auths I add are permissions that fit into an existing role (full access/full admin/etc). So what I tend to do during installation is to update the acl_* tables so that this new permission gets added to this role and all the users imedately can use this permission.
It might remove an aditional step for the admin cause he doesn't have to setup the permissions for those groups.
You coul'd handle it as a MOD author by entering an array with the default roles that should get this permission added.

[edit]
Somehow this post feels like it doesn't make sense :?. I write down some code as that maybe gives a better idea of what I mean.
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by mtrs » Wed Dec 03, 2008 2:54 pm

Some mods use custom profile fields and define field type, identifiaction, name, entries and default values in mod DIY section. Would UMIL also make automatic custom profile field creation script?
I abandoned all of my mods.

User avatar
Highway of Life
Former Team Member
Posts: 6048
Joined: Wed Feb 02, 2005 5:41 pm
Location: Seattle, WA
Name: David Lewis
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by Highway of Life » Wed Dec 03, 2008 6:51 pm

Erik Frèrejean wrote:I'll try if I can explain what I mean. Im my MOD installers I first create a auth the same way as UMIL does, but than often find myself in the position that the auths I add are permissions that fit into an existing role (full access/full admin/etc). So what I tend to do during installation is to update the acl_* tables so that this new permission gets added to this role and all the users imedately can use this permission.
It might remove an aditional step for the admin cause he doesn't have to setup the permissions for those groups.
You coul'd handle it as a MOD author by entering an array with the default roles that should get this permission added.
Certainly, that makes sense... but my question is should the MOD Author be specifying the role that the permission is added to, or the Administrator/End-user? ... or maybe support both?
mtrs wrote:Some mods use custom profile fields and define field type, identifiaction, name, entries and default values in mod DIY section. Would UMIL also make automatic custom profile field creation script?
I think the Table/Column editing abilities would cover this. We just have to make sure we support normal SELECT/INSERT/UPDATE/DELETE queries.
The phpBB Weekly Podcast - Discussing the developments of phpBB4 and beyond.

New to phpBB3? Want to learn about programing?
Visit phpBB Academy at StarTrekGuide to learn how.

User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by EXreaction » Wed Dec 03, 2008 7:22 pm

As for permissions, I am not sure of the best way to implement that, I do like the idea though. I use this code for the User Blog Mod to insert default permissions:

Code: Select all

// Add default permissions for Roles
$role_data = array(
	'ROLE_ADMIN_FULL'		=> array('a_blogmanage', 'a_blogdelete', 'a_blogreplydelete'),
	'ROLE_MOD_FULL'			=> array('m_blogapprove', 'm_blogedit', 'm_bloglockedit', 'm_blogdelete', 'm_blogreport', 'm_blogreplyapprove', 'm_blogreplyedit', 'm_blogreplylockedit', 'm_blogreplydelete', 'm_blogreplyreport'),
	'ROLE_MOD_STANDARD'		=> array('m_blogapprove', 'm_blogedit', 'm_bloglockedit', 'm_blogdelete', 'm_blogreport', 'm_blogreplyapprove', 'm_blogreplyedit', 'm_blogreplylockedit', 'm_blogreplydelete', 'm_blogreplyreport'),
	'ROLE_MOD_QUEUE'		=> array('m_blogapprove', 'm_blogedit', 'm_bloglockedit', 'm_blogreplyapprove', 'm_blogreplyedit', 'm_blogreplylockedit'),
	'ROLE_MOD_SIMPLE'		=> array('m_blogedit', 'm_bloglockedit', 'm_blogdelete', 'm_blogreplyedit', 'm_blogreplylockedit', 'm_blogreplydelete'),
	'ROLE_USER_FULL'		=> array('u_blog_css', 'u_blog_style', 'u_blog_vote', 'u_blog_vote_change', 'u_blog_create_poll', 'u_blogattach', 'u_blognolimitattach', 'u_blogview', 'u_blogpost', 'u_blogedit', 'u_blogdelete', 'u_blognoapprove', 'u_blogreport', 'u_blogreply', 'u_blogreplyedit', 'u_blogreplydelete', 'u_blogreplynoapprove', 'u_blogbbcode', 'u_blogsmilies', 'u_blogimg', 'u_blogurl', 'u_blogflash', 'u_blogmoderate'),
	'ROLE_USER_STANDARD'	=> array('u_blog_style', 'u_blog_vote', 'u_blog_vote_change', 'u_blog_create_poll', 'u_blogattach', 'u_blogview', 'u_blogpost', 'u_blogedit', 'u_blogdelete', 'u_blognoapprove', 'u_blogreport', 'u_blogreply', 'u_blogreplyedit', 'u_blogreplydelete', 'u_blogreplynoapprove', 'u_blogbbcode', 'u_blogsmilies', 'u_blogimg', 'u_blogurl', 'u_blogmoderate'),
	'ROLE_USER_LIMITED'		=> array('u_blog_vote', 'u_blog_vote_change', 'u_blogview', 'u_blogpost', 'u_blogedit', 'u_blogreport', 'u_blogreply', 'u_blogreplyedit', 'u_blogbbcode', 'u_blogsmilies', 'u_blogimg', 'u_blogurl'),
	'ROLE_USER_NOPM'		=> array('u_blog_style', 'u_blog_vote', 'u_blog_vote_change', 'u_blogview', 'u_blogpost', 'u_blogedit', 'u_blogreport', 'u_blogreply', 'u_blogreplyedit', 'u_blogbbcode', 'u_blogsmilies', 'u_blogimg', 'u_blogurl'),
	'ROLE_USER_NOAVATAR'	=> array('u_blog_style', 'u_blog_vote', 'u_blog_vote_change', 'u_blogview', 'u_blogpost', 'u_blogedit', 'u_blogreport', 'u_blogreply', 'u_blogreplyedit', 'u_blogbbcode', 'u_blogsmilies', 'u_blogimg', 'u_blogurl'),
);

foreach ($role_data as $role => $options)
{
	$sql = 'SELECT role_id FROM ' . ACL_ROLES_TABLE . " WHERE role_name = '{$role}'";
	$db->sql_query($sql);
	$role_id = $db->sql_fetchfield('role_id');

	if ($role_id)
	{
		$sql = 'SELECT auth_option_id FROM ' . ACL_OPTIONS_TABLE . ' WHERE ' . $db->sql_in_set('auth_option', $options);
		$result = $db->sql_query($sql);
		while ($row = $db->sql_fetchrow($result))
		{
			$sql_ary = array(
				'role_id'			=> $role_id,
				'auth_option_id'	=> $row['auth_option_id'],
				'auth_setting'		=> 1,
			);
			$sql = 'INSERT INTO ' . ACL_ROLES_DATA_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
			$db->sql_query($sql);
		}
	}

	$role_id = false;
}
The data could be sent like I have the array, but I would need to add some checks on it to make sure permissions are not added multiple times and I think it needs to have the option to insert permissions for the guest group as well since the guest group has no role.
mtrs wrote:Some mods use custom profile fields and define field type, identifiaction, name, entries and default values in mod DIY section. Would UMIL also make automatic custom profile field creation script?
I don't think adding custom profile fields are a requirement for enough mods to warrant a function for it, but you can setup the instructions to call your own custom function as well, so you can have it do whatever you like.

User avatar
poyntesm
Registered User
Posts: 1671
Joined: Tue Jan 18, 2005 11:19 am
Location: Dublin, Ireland
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by poyntesm » Wed Dec 03, 2008 7:32 pm

There are role/group functions in my permissions KB article -> http://www.phpbb.com/kb/article/permiss ... -part-two/

User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by EXreaction » Wed Dec 03, 2008 8:09 pm

Nice, I shall take a look at those when I get to this. :)

User avatar
Erik Frèrejean
Former Team Member
Posts: 9899
Joined: Tue Oct 09, 2007 9:09 am
Location: The Netherlands, 3.0.x Support Forum
Name: Erik Frèrejean
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by Erik Frèrejean » Wed Dec 03, 2008 9:37 pm

Highway of Life wrote:
Erik Frèrejean wrote:I'll try if I can explain what I mean. Im my MOD installers I first create a auth the same way as UMIL does, but than often find myself in the position that the auths I add are permissions that fit into an existing role (full access/full admin/etc). So what I tend to do during installation is to update the acl_* tables so that this new permission gets added to this role and all the users imedately can use this permission.
It might remove an aditional step for the admin cause he doesn't have to setup the permissions for those groups.
You coul'd handle it as a MOD author by entering an array with the default roles that should get this permission added.
Certainly, that makes sense... but my question is should the MOD Author be specifying the role that the permission is added to, or the Administrator/End-user? ... or maybe support both?
I would say both. Because as a MOD author you could only supply this information for the default groups. And I think a lot of end-users will use custom roles (at least they should).
Support Toolkit | Support Request Template | Knowledge Base | phpBB 3.0.x documentation
I don't give support via PM or IM! (all unsolicited pms will be trashed!)

User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by EXreaction » Wed Dec 03, 2008 10:14 pm

I would not add anything that would give the end user options to change the permissions set or select what roles/etc.

At the very most I would give the option to have them select if they want the default permissions set or not. They can set it themselves later otherwise.

User avatar
mtotheikle
Registered User
Posts: 188
Joined: Thu Sep 25, 2008 5:32 am
Location: Spokane, WA
Contact:

Re: UMIL/UMIF - New MOD Installation Library - Feedback needed

Post by mtotheikle » Fri Dec 05, 2008 2:15 am

EXreaction wrote:I would not add anything that would give the end user options to change the permissions set or select what roles/etc.

At the very most I would give the option to have them select if they want the default permissions set or not. They can set it themselves later otherwise.
If you don't want to allow them to change the default permissions provided by the MOD Author on the installer, I think that at least a notice to the user saying:
"The MOD has permissions that an Admin needs to look at before this MOD works correctly",
should be added so users don't complain about the MOD not working when they did not use the default permissions
New to phpBB3? Want to learn about programing? Then phpBB Academy is the place for you!

No support via PM, I will not respond!

Image

Locked

Return to “[3.0.x] MOD Writers Discussion”