Grouper - Documentation
Introduction to Grouper Themes
"Themes" is basically just a fancy way of saying "preset configurations".
They make it easier to manage and share different configurations.
If you look at the file "atom-1.0.php" in the themes folder,
you will see that it contains a number of calls to GrouperLoadPlugin which configure Grouper to convert an Atom 1.0 feed to RSS 2.0.
Themes might also call GrouperConf or GrouperSourceConf to set configuration options to commonly used settings.
Putting all of these settings in a theme file makes it easy to reuse this configuration for various feeds around your site.
There are three ways to load themes.
The most efficient is to add a line of code before the "require_once" line that loads Grouper, as follows:
or, if you're inside a function (basically, if the above doesn't work for any reason):
Either of those will tell Grouper to load the "atom-1.0" theme when it starts up.
The name "atom-1.0" happens to match the name of the file, "atom-1.0.php",
but it's possible that that won't always be the case--the important thing is that this value match one of the "case" statements in grouperconf.php,
for example, "atom-1.0" in the line in grouperconf.php that begins with "case 'atom-1.0':".
If you've already loaded Grouper, you can load a theme like this:
Notice that in this case, you enter the filename, not the "case" value from grouperconf.php.
Note that this method will NOT reset Grouper's configuration to it's defaults,
so if you've changed any settings for a different feed on the same page, those changes will still be there unless the theme overrides them.
If you want to reset Grouper before applying the theme, do this instead:
Note that we're back to the "case" value from grouperconf.php again, not the filename.
You can create new themes by modifing an existing theme file or create your own from scratch.
Just be sure to upload it to the "themes" folder and to add a "case" line to grouperconf.php like that one that's there for "atom-1.0".