Grouper: RSS Generator - Documentation
Version 1.4.3 (7/15/2005)
This documentation has been replaced.
The new documentation is available here.
Download |
Install |
Configure |
Functions |
Grouper Evolution Plugins |
Atom Example |
News Example |
Associates Program
Functions
The following functions are provided by Grouper for use by your web pages.
All other functions are intended only for internal use, and may be changed or removed without notice.
Arguments listed in square braces are optional.
If more than one optional argument is listed and you wish to set the values of any but the first, you must also set the values of any preceeding arguments.
- GrouperConf(option name(s),value);
Sets a Grouper configuration option to the specified value.
You may set more than one option to the same value at the same time by listing the option names, separated by pipe characters (|).
See the configuration page for a list of available configuration options.
option name(s): The name of the option or options to set.
value: The value to which to set the option or options.
- GrouperSourceConf(option name(s),value);
Sets a news-source-specific configuration option to the specified value.
Note that you must set the "source" option (for example, GrouperConf('source',1);) BEFORE calling this function
if you wish to set an option for a non-default source.
See the configuration page for a list of available configuration options.
option name(s): The name of the option to set.
value: The value to which to set the option.
- GrouperSourceURL(URL);
[This function requires Grouper Evolution 1.4.3 or later]
This function is a shortcut to setting the "searchdomain" and "querystart" configuration settings at the same time.
When Grouper was originally created, it only worked with news search engines, for which these configuration setting names made complete sense.
But when blog and XML support were added, it made more sense to specify the source URL all at once.
URL(s): The address of the feed or other document to be converted by Grouper.
- GrouperConfReset();
Resets all of the values in $grouperconf (which control Grouper's behavior) to the default values specified in grouper.php.
When you are displaying multiple newsfeeds on one page with significantly different appearance, this is a convenient way to reset the configuration.
- GrouperShow(searchterms [, cachefile [, showit [, fromcache]]]);
Fetches an RSS newsfeed from the internet, a local file, or a local cache file and displays it according to any settings you may have specified.
If a cache file was specified, $grouperconf['mtime'] will contain the UNIX timestamp for the last time the cache was updated after this function is called.
searchterms: The terms you would like to search Google News for.
cachefile: The filename of the cache file in which to store an RSS newsfeed based on your search.
If this argument is omitted, no cache file is used, and the search is re-done and re-formatted every time.
We recommend only doing this while working on the formatting (unless using GrouperCache, described below, to maintain a local copy of the search results).
Once you have finalized your settings and search terms, you will get significantly better performance by specifying a cache file.
showit: If you set this argument to 0, GrouperShow will generate or update the specified cache file, but will not display its results.
fromcache: If you have saved some Google search results using the GrouperCache function, you may specify the name of the cache file you created using that function.
If you do, GrouperShow will read the search results from that file instead of searching Google again.
Note that if you specify a filename here, your search terms will be ignored, since the search terms were determined when you called GrouperCache.
- GrouperCache(search terms, cachefile);
Fetches Google search results and stores them, unmodified, in a local cache file.
The cache file is refreshed if it is older than the number of minutes specified in the cacheinterval configuration setting.
This function returns 1 if it was necessary to refresh the cache, and 0 if not.
After this function completes, $grouperconf['mtime'] will contain the UNIX timestamp for the last time the cache was updated.
searchterms: The terms you would like to search Google News for.
cachefile: The filename of the local cache file.
"Google", "Yahoo!" and "Feedster" are trademarks of their respective owners.
Grouper is not endorsed by these companies, and Gecko Tribe, LLC is not affiliated with them in any way.