Using the GrouperShow function within Grouper
by Paul Flyer
GrouperShow is used to fetch and display a news feed. This should not be used to make pretty displays of the news feed. It will simply generate the xml sturcture and display it as such (some browsers will even display it without line breaks)
The GrouperShow command requires at least a search term string. There are three optional settings for GrouperShow.
GrouperShow (searchterms [,cachefile, [,showit[,fromcache]]]);
searchterms
terms need to be placed in either single ticks or double ticks ie both ‘fishing’ and “fishing” will work. Searching for phrases is also possible. “chicago crime” or ‘chicago crime’ are valid. Note that this will complete an “all of the word” search. To execute an exact phrase search, the phrase needs to be put in double quotes, then this is surrounded by single quotes.’”chicago crime”‘
GrouperShow(’chicago crime’); — all of the words search
GrouperShow(’”chicago crime”‘); — exact phrase search
cachefile: The name of the cache file of the RSS newsfeed. It is highly suggested that this be left blank until all decisions have been made about the use/format of the feed. In the end, setting up the cache file will speed up the display. However, it wil cause a few grey hairs if development is still proceeding. If a cache file is named, the cache file is displayed when the feed is called. This can cause frustration when changes are made and they do not show up immediately. The reason? The cache is displayed.
The name of a cache file can be anything. Do no use spaces. Just use a name, no path is necessary. By default Grouper saves the cache in the rsscache folder. examples: mycache, my_cache, fishing, fishing_europe, etc.
The name should be unique from other feeds that have been created.
Why Cache?
Speed.
showit: Not setting this option/leaving it blank will display the updated cache file AND display results. Setting the option to 0 (zero) will make Grouper update the cache file but it will NOT display the results. Why use this setting? Set the arugument to 0(zero) if using CaRP or another means to display the Grouper feed on a website.
fromcache: used in conjunction with GrouperCache. GrouperCache saves results in a cache file. this option will display the results from that cache. Specify the name of the cache created while using GrouperCache.
Examples:
GrouperShow(”fishing”);
GrouperShow(”fishing”,”myfishingfeed”);
GrouperShow(”fishing”,”myfishingfeed”,0);
this would be the equivalent of GrouperCache(”fishing”,”myfishingfeed”);
GrouperShow(”fishing”,”myfishingfeed”,0,”thatotherfishingfeed”);
GrouperShow(”",”myfishingfeed”,0,”thatotherfishingfeed”);
Be sure to review our list of recommended web tools.




Great! More good things to come in the future.
January 27th, 2006 at 9:52 am