|
NOTE: This article is for Mambo 4.5 (1.0.x) versions
What Are They?
Parameters or affectionately known as Mammeters give an Administrator the ability to modify script variables within the administration area of Mambo and without opening a PHP script file; the downside is that the module creator has to program the module to handle this option. NOTE: not all modules use this feature.
Why Use Mammeters?
Say you have a module that has Mammeters enabled and you want to change a value within that module. You could simply apply the changes to that module by going to your administration area and modifying the script using the parameters text box. This is a lot easier than opening the script file, searching through the variables for the one you're interested in changing, making the changes needed, then uploading the script.
Then there's always the possibility that you made a typo and have to do it again. Then consider the user that doesn't have a clue on how to modify PHP code. Are you beginning to see why Mammeters can be a useful feature?
How To Use Mammeters
Using Mammeters really couldn't be easier! No, really! Let's say you have a module that supports the use of Mammeters, like Moment For Tips Mod. Because the author of this module took the time to adapt it to Mammeters you'll be able to make all the changes available, without having to open the script file.
Let's look at an example. This particular script has an option that allows the user to modify how many tips show up. This can be useful for obvious reasons. The variable just happens to be named Tips. That's simple enough. Now, Tips is case sensitive and takes an integer value. So, if we want more than the default number of tips to display on our Web page, we could use Tips in this manner: Tips=3.
This will display 3 random tips on our page. Wow, didn't have to open a script file and surf through a bunch of code and was able to make my changes. Pretty cool. Of course, changing the value to a lower or higher number would affect the tips output accordingly.
Modifying Actual Mammeters
Now that we know what Mammeters are, why you should use them and how to use Mammeters, let's look at how this all takes shape in the real world.
Okay, you opened your administration area, clicked on Manage Modules, clicked on the module you want to modify and scrolled down to the parameters box. See image below.

As you can see the box is empty. This is where you make all the modification that the module allows. Your module should have come with a readme file explaining how to set mammeters.
But for this article we will use the example from above. The "Moment For Tips module." As stated earlier, this module has an option called Tips. It also has the options: Window, Title, Copy and Debug, making a total of 5 options to play with. The image below shows what the parameter (Mammeter) box would look like with 4 of the 5 option enabled.

The first option Debug=0 means we have debugging turned off. The second option Tips=2 means we want two tips to display on our page. The third option Window=_blank means we want the clickable or source link to load in a new window, while the fourth option Copy=0 means we don't want the creator's link being displayed on our page. We didn't use the fifth option called Title, but you can incorporate it on your site. It might look like: Title=My Site Name
Notice how we are not using quotes with these options. That's because no quotes are needed. As a matter of fact, if you use quotes with this script you will probably break it.
Once we have all the options set the way we want we can save our preferences and go see how everything's working. As long as things are good... we shouldn't need to make anymore changes.
Conclusion
It's my hope that you have discovered a new feature in Mambo Open Source CMS and that you have learned that parameters (affectionately know as Mammeters) are simple to work with, should be used when ever possible and can make modifying your modules a snap.
|