Menu
Receptacle
v1.0 - initial release June 25, 2008 (compatible with pn .764 & Zikula 1.0+)
Description
A module to hold stand-alone plugins, templates and images.
Receptacle is seen as an agile, developer-focused module that shortens the development cycle of simple, stand-alone projects that do not require the complexity of module-status. A developer can create one or more plugins and templates, drop them in Receptacle and easily call them as a block. This is an API-compliant solution to the old stand-alone block problem.
As more plugins and templates become available, the module will become less developer-centered and more useful to a general admin.
INTENDED USERS
This module is not for a beginner*. It is expected that you know how to write plugins, templates and are comfortable with php and html. Without this basic knowledge, the module will do nothing for you.
*Beginners might find this useful in simply using existing plugins from here or other sources. You will still have to know where to put them
INSTALL
Install this module by placing in your modules directory. Regenerate your modules list, then install and activate Receptacle.
USAGE
This module is not intended to do anything by itself - it is a Receptacle for plugins (get it?) so you do not clutter-up other areas of your Zikula installation. It has no admin or user interface (so it will NOT appear in your Administration page). It is intended to take advantage of pnRender's "custom pnRender Block" so that one can utilize stand-alone plugins with templates and images.
Instructions
- create your custom plugins. They need to have templates to be useful and you can use images too.
- drop your files in place:
- plugins -> modules/Receptacle/pntemplates/plugins/
- templates -> modules/Receptacle/pntemplates/
- images -> modules/Receptacle/pnimages
- go to your Zikula Administration page -> System -> Blocks
- create a new block and choose your block Type as "pnRender/custom pnRender block"
- In your new block configuration enter the following:
- Module Name: Receptacle
- template file: <your template file> (from step 2)
- Parameters: If your plugin accepts parameters, you can enter them here.
- Click "Update" and you should be good to go!
Use of Images
If you use images in your plugin, be sure to note how the pnimg plugin is used in the included getpm plugin (imagepaths get confused easily when jumping between themes and modules). Also note that if you have duplicate copies of your images in your themes/<yourtheme>/images/ directory, the pnimg plugin will take that path first and confuse your plugin. I think images will work properly when used in your templates, however.
INCLUSIONS
I have included a few stand-alone plugins with images and templates for you to see how it works.
Included templates:
- gallery_random.htm
- myonline.htm
- myonline2.htm
Included plugins:
- function.getpm.php (uses old Messages module - shows mailbox image of PM status)
- function.guests_online.php (returns number of unregistered users online)
- function.random_photo.php (a simple, working random photo from gallery 1.5.x, requires parameters)
- function.users_online.php (returns comma-seperated list of registered users online)
CREDITS
This module was formatted on top of a copy of Mark West's DynaMod? module (because it is simple and the old blank module has disappeared).
