Instead of those parameters being passed into a function in the profile module, its being passed into a function defined in the jrImage module.
So you don't have to have 2 copies of a function to display an image.
Quote: so inside the jrProfile module you would just create a 'magic view' for the image?
No, you don't need to do anything to use it, its just there
Quote: Now thats because the jrImage module provides it as a magic view, correct?
That's exactly right. It's just there
. You don't have to do anything for your module to be able to use it.
module can ask the user for an image, then store that image in its datastore, but it doesn't need to provide a function to go and get that image.
The profile module can 'do nothing' and let the jrImage magic view do all the work.
If the jrProfile module allowed the user to upload an extra image, it could use the '/image/' magic view to display that image.
The '/image/' magic view can be used by any existing modules or any modules that may be created in the future that also want to store images in their datastore.
If you had to build a function to go get the image for every module that you built, you wouldn't bother with all the extra functionality that exists in the function that is provided by the jrImage module.
You probably would not bother putting in image resizing, cropping and all the other features that the jrImage module has built into its function because its just over-kill.
Quote: Right, its all done for you. Its already all there. That's awesome.
And I didn't know that at all.