Quote from: sarah at Nov 01, 2007, 01:45 AM
I changed this line in the HFSF_module1.php file:
include_once $modx->config[’rb_base_dir’]."../manager/cache_sync.class.processor.php";
to
include_once $modx->config[’rb_base_dir’]."../manager/processors/cache_sync.class.processor.php";
after i deleted the autogenerated file...i am using this snippet call
[[HyperFlexSearchForm]] I also used this [!HyperFlexSearchForm?!]
and nothing displays on the page. What am I doing wrong?
I stumbled on the same error Sarah found, and made that change. And then I also got nothing for awhile! Not having a week to play with the code, I experimented. My solution was truly bizarro.... almost out of desperation, I opened up the archive to a previous version, 3r2, pulled this snippet code from the README, and used it to replace the latest suggested code:
<?php
// snippet name
$snipName_t = "HyperFlexSearchForm";
// snippet description
$snipDesc_t = "<strong>v3r2</strong> Add advanced search features to the original FlexSeachForm snippet";
// setting snippet path
$snipPath_t = $modx->config["rb_base_dir"].'snippets/';
// including the main file
return require $snipPath_t.$snipName_t."/".$snipName_t.".inc.php";
?>
Worked like a champ! My snippet call was this: [!HyperFlexSearchForm? &FSF_showResults=`1` !] I also got it to work using both the Parent Search and Template Search parameters. I used the snippet on a page rather than in a template, and that’s why I wanted to "show results" there. I’m quite sure it would work fine in a template too, just display the results in a separate page rather than right in the template.
It’s SO tantalizing to find a snippet like this with fancy features, but at the same time very frustrating when it doesn’t work. Oh, well, I guess we get what we pay for!
Why didn’t the snippet code from the latest README work? I think it’s because it contains example code, but it’s not obvious what to take out, despite the notes in there. in any case, I don’t really know, and because the above works, I’ll let someone else figure it out.
I’m sure Benjamin can enlighten us when he comes back again in a few months.
To me, it’s extremely useful to be able to search by template or folder! I hope this helps someone, causing them to swear less than I did!
Cheers, Samba