Requesting files from other modules items

alt=
@dobmat
10 years ago
93 posts
Hi

Is there a way to request for files to be shared by modules. Like user-1 has some files in an entry of module A. User-2 wants to see under module B certain files from module A entry that user-1 has created. Please give some suggestions as to how to go about it.

Thanks.
updated by @dobmat: 06/14/14 09:24:34PM
michael
@michael
10 years ago
7,715 posts
The question is very broad so im not sure where you want the answer to start from.

To learn how to create a module perhaps start here:

"Creating a Module"
http://www.jamroom.net/the-jamroom-network/documentation/development/26/creating-a-module

Then once you have a module you need a 'view' to cover the "User-2 wants to see " part of it.

In that view function you can write queries against any other modules datastore to get the information that you want.

If its required, then add that as a requirement to the modules _meta() function.

eg:(you can see that the jrChainedSelect module requires jrCore 5.1.36 or above to work.)
 */
function jrChainedSelect_meta(){
    $_tmp = array(
        'name'        => 'Chained Select',
        'url'         => 'chained_select',
        'version'     => '1.1.0',
        'developer'   => 'The Jamroom Network, ©' . strftime('%Y'),
        'description' => 'Manage chained_select field options and choices',
        'category'    => 'forms',
        'license'     => 'mpl',
        'requires'    => 'jrCore:5.1.36'
    );
    return $_tmp;
}

Tags