I came across this modded version of FlexSearchForm and the thread ended pretty much with this question.
Quote from: rodsor at Jul 12, 2006, 06:15 AM
Thanks guys. Now I can view the snippet (only the txt). But after changing the snippet code, the following error ocurrs:
Fatal error: Cannot redeclare preparesearchcontent() (previously declared in C:\Apache2\htdocs\manager\includes\document.parser.class.inc.php(705) : eval()’d code:466) in C:\Apache2\htdocs\manager\includes\document.parser.class.inc.php(705) : eval()’d code on line 475
How to correct this?
Whoever did the last mod, added two functions to the end of the script, after the return command. I moved the functions to their proper place and the snippet started working.
This seems to be the latest (modded) version of FlexSearchForm.
// -----------------------
// Snippet: FlexSearchForm
// -----------------------
// Version: 0.6j
// Date: 2005.02.01
// [email protected]
//
// This snippet was designed to create a search form
// that is highly flexible in how it is presented. It
// can be used as both a small, subtle, persistent
// search field element, as well as present the search
// results. All elements are branded with classes
// for easy CSS styling.
//
// 2006.02.06 added extract functionality by Marc Hinse, [email protected]
// some extract functionality credits go to Joomla Open Source CMS
// 2006.05.01 Modified by Stephan Dale for http://mindSpill.net. Email: modx(a)mindspill.net
// Added access control, i.e. hide private documents if the user doesn't have permission to view them. This functionality uses code lifted from the MODx getDocumentObject method in document.parser.class.inc.php.
// Added better support for weblinks.
// &useWeblink - [ true | false ] If true and the doc is of type 'reference', link to the doc's weblink (it's 'content' field) rather than to the doc itself. Defaults to false.
// &weblinkClass - [ string ] CSS class for a weblink's anchor. Defaults to "weblink".
Access control is working; I haven’t tried weblinks. Apologies if this is the current version of the snippet and I didn’t know it.