Requirements

SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
I think I've seen it in action somewhere, but I can't find it now.

How do I add requirements (eg jrEmbed is required to use this module) to my module?


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 12/11/13 12:22:41PM
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Also, just a comment, having all the versions in the module directory is a bit of a bummer for the way I've been working until now (I will need to change). There are more results for word searches (that's how I look for functions which might be relevant to what I'm doing) in the module directory.

Fine when you are looking for a function name or something specific, but when you are looking for something more general (like case insensitive "embed", or "validate"), it means a lot more search results to go through.

Obviously this is a personal gripe rather than a request for change, and most jr users don't even search, but I wanted to mention it anyway.

Note to self: get to grips with grep rather than gripe about it. But its going to be a total pain in the ass (like complete obfuscation) when there are 25 versions of each module. I need to advance my search techniques massively, and soonish.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
11 years ago
7,746 posts
I think what your after is 'requires' in the _meta() function. check jrFoxyCartBundle, it requires jrFoxyCart:

/**
* meta
*/
function jrFoxyCartBundle_meta()
{
$_tmp = array(
'name' => 'FoxyCart Bundles',
'url' => 'bundle',
'version' => '1.0.1',
'developer' => 'The Jamroom Network, ©' . strftime('%Y'),
'description' => 'Package multiple items for sale into bundles so they can be priced separately',
'category' => 'ecommerce',
'requires' => 'jrFoxyCart',
'priority' => 81
);
return $_tmp;
}

as for the other issue, your still not using phpstorm i see.
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Thanks Michael.

No, still haven't got into phpstorm, I'll try it again this week coming.

Frustrated with bbedit because whilst I can filter the search on "no files with -release- in the name of the parent dir", I can't get it to follow the alias so it just sees no files.

It does have neat saved sets for search directories though, so I am using those and just need to update the set when new versions of modules are added.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
11 years ago
10,148 posts
Ultrabubble:
Also, just a comment, having all the versions in the module directory is a bit of a bummer for the way I've been working until now (I will need to change). There are more results for word searches (that's how I look for functions which might be relevant to what I'm doing) in the module directory.

Fine when you are looking for a function name or something specific, but when you are looking for something more general (like case insensitive "embed", or "validate"), it means a lot more search results to go through.

Obviously this is a personal gripe rather than a request for change, and most jr users don't even search, but I wanted to mention it anyway.

Note to self: get to grips with grep rather than gripe about it. But its going to be a total pain in the ass (like complete obfuscation) when there are 25 versions of each module. I need to advance my search techniques massively, and soonish.

This is probably a good reason to not use the marketplace on your dev install. Note that you can still download the latest versions of any module/skin from the "Marketplace" section here as well and work with it old school :)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Thanks Brian, I think that's what I'll be doing.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
alt=
smith.kyle
@smithkyle
11 years ago
87 posts
If you need to require multiple modules, can it be an array? or should it be a comma-separated list?

Kyle
brian
@brian
11 years ago
10,148 posts
comma separated - i.e.

requires = 'jrCore:5.1.0,jrAudio:1.1.0,jrVideo:1.1.0'



--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
smith.kyle
@smithkyle
11 years ago
87 posts
nice! AND versions!
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
I guess the version is a requirement. For the ipsumjam module I've required core 5.1.0 and just jrEmbed

requires = 'jrCore:5.1.0,jrEmbed'
ipsum-screenshot.jpg




--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 10/19/13 09:41:15AM
brian
@brian
11 years ago
10,148 posts
The version should not be required - what you have there should work. Are you seeing an error on it somewhere?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Yes, the requirement text seems a bit off
ipsum-screenshot.jpg




--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 10/19/13 09:43:34AM
brian
@brian
11 years ago
10,148 posts
Okay - let me check that out.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,148 posts
Okay - this should be fixed now. Reload the Core module and let me know if that looks better.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Looks perfect: "jrEmbed not found!" / "TinyMCE Embed Button not active!" / "TinyMCE Embed Button"


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 10/19/13 11:02:40AM
michael
@michael
11 years ago
7,746 posts
suggestion: that the red buttons become links to install the module, just like the ones in the marketplace if the marketplace is installed.

Tags