Search plugin (I18N) - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: Search plugin (I18N) (/showthread.php?tid=1256) |
Search plugin (I18N) - mvlcek - 2012-02-11 geroyche Wrote:Thanks for the quick reply. Great! You should post instructions on how to use your code to the news manager support thread. One more tip: You could pass array('news', $category) as tags to the indexer, where $category is the category of the news item (I think there is one?). Then you can specifically search for news and categories. geroyche Wrote:I have one more question though: somehow your index is created everytime a regular page is being saved/updated. Just call delete_i18n_search_index(). The index is recreated, when the next search is executed. geroyche Wrote:FYI: here are the functions as they need be for News Manager. Don't know if you want to include them in your plugin, though I figure I should probably give them to the NM dev instead. You should try to have it included in the news manager. I specifically created this functionality in the Search plugin to allow other plugins to use this global search instead of implementing a search themselves. I think, if you include a register_plugin call thus making a regular plugin from it, you should have no problems with loops. If you additionally add checks for the News Manager in your function i18n_search_nm_index - if (!function_exists('nm_get_posts')) return; - your plugin won't crash even if News Manager is not installed. This shows that it's easy to not only extend GetSimple with plugins, but also to extend plugins themselves. Search plugin (I18N) - mvlcek - 2012-02-11 I18N Search version 2.4:
Search plugin (I18N) - Carlos - 2012-02-11 I've tried custom rendering, but with the sample (default way) component I get this: Quote:Notice: Undefined variable: dateFormat in [...]/plugins/i18n_search/searchresults.php(4) : eval()'d code on line 10That is, with debug mode enabled. Dates and excerpts are not rendered, only lang, link and page title. Did I miss something? Search plugin (I18N) - Carlos - 2012-02-11 Is there a way to remove (not hide) the Search Results title/header: Code: <h2 class="search-header">Search Results</h2> (sorry if it has been asked before, I couldn't find anything about this...) Search plugin (I18N) - mvlcek - 2012-02-12 Carlos Wrote:Is there a way to remove (not hide) the Search Results title/header: (% searchresults HEADER= %) Search plugin (I18N) - mvlcek - 2012-02-12 I18N Search version 2.4.1:
Search plugin (I18N) - Carlos - 2012-02-12 Thanks. Works perfect. Search plugin (I18N) - Carlos - 2012-02-12 Suggestion: (% searchresults parent=myparent ... %) If you wish to implement this, it also would be fine being able to select the current parent ( parent=., parent=0, ...?) Search plugin (I18N) - Carlos - 2012-02-12 Another suggestion: (% searchresults ... order=title %) This is an easy one, ;-) I patched searcher.class.php myself (inserted a bit of code in line 400's switch and a new function compare_title()) to do this. Search plugin (I18N) - mvlcek - 2012-02-12 Carlos Wrote:Suggestion: If you want to get the children of a page, you can use the I18N navigation functions. Or give a unique tag to all these child pages - this can be simplified by using the new I18N Special Pages plugin. Currently I do not plan to extend the searching capabilities of I18N Search beyond words and tags. Search plugin (I18N) - mvlcek - 2012-02-12 Carlos Wrote:Another suggestion: I didn't implement this, because the title is not held in the index files (as opposed to the date, slug, as it is the page key, and the score, which is calculated). For large sites and searches with lots of results that would mean that lots of page xmls are accessed instead of only those on the first result page. However, for most sites it shouldn't make much difference. I'll include it in the next release. Search plugin (I18N) - Carlos - 2012-02-13 Issue: in excerpts, is rendered as � Search plugin (I18N) - mvlcek - 2012-02-13 Carlos Wrote:Issue: in excerpts, is rendered as � Works for me. Maybe you don't display your page in UTF-8? Search plugin (I18N) - AsgeirSH - 2012-02-14 Hi! I get the following when I try to implement the searchform: Code: Warning: preg_replace_callback() [function.preg-replace-callback]: Unable to call custom replacement function in /store/1/web/hkmedia.no/plugins/i18n_search/viewer.class.php on line 11 Any idea what's causing this? Search plugin (I18N) - mvlcek - 2012-02-14 AsgeirSH Wrote:Hi! Never had this before. Try to change line 76 private static function replaceContentMatch to public static function replaceContentMatch. Which version of PHP are you using? Which operating system? Search plugin (I18N) - Carlos - 2012-02-14 mvlcek Wrote:Works for me. Maybe you don't display your page in UTF-8? No, it's UTF-8. But I've tried in a live server and doesn't happen. So it may be something wrong in my local site (will reinstall XAMPP some day). Thanks. Search plugin (I18N) - mvlcek - 2012-02-14 Carlos Wrote:mvlcek Wrote:Works for me. Maybe you don't display your page in UTF-8? Maybe the multibyte string (mbstring) PHP extension is not installed (http://www.php.net/manual/en/mbstring.installation.php). Search plugin (I18N) - AsgeirSH - 2012-02-14 mvlcek Wrote:AsgeirSH Wrote:Hi! Changing it to public had no effect. Running Apache on a Linux-server. (Linux server33 2.4.37.5-ow1-ip, Apache Release 10337100 ) A sidenote is that ZipArchive is not installed on the server, although I can't imagine that would matter for this plugin? Search plugin (I18N) - avoleoo - 2012-02-14 Hey guys, is there any way I can add I18N gallery into I18N search results? Search plugin (I18N) - avoleoo - 2012-02-14 Please take a look here: http://www.graf1x.com/index.php?id=news The cropped pictures from the gallery show up, even links work, but the alignment and JS is not working. I managed to display pictures by putting these two lines: (% gallery type=prettyphoto autostart=true %) (% searchresults tags:news numWords:-50 order:reverseurl %) Search plugin (I18N) - mvlcek - 2012-02-14 avoleoo Wrote:Please take a look here: http://www.graf1x.com/index.php?id=news Showing galleries in the search results is generally not possible. But if all your galleries have the same properties, you can create a special page template for the search result page and add something like <?php get_i18n_gallery_header('my-gallery', array('type'=>'prettyphoto', 'autostart'=>true)); ?> to its header. This should set the appropriate styles and load the JS files. Search plugin (I18N) - avoleoo - 2012-02-15 mvlcek Wrote:avoleoo Wrote:Please take a look here: http://www.graf1x.com/index.php?id=news Thanks mvlcek, It worked out well, but the only thing is that every time I will want to post new gallery I will have to add syntax to header of the special page, right? Is there any way around? Search plugin (I18N) - mvlcek - 2012-03-03 I18N Search version 2.5:
To use live search, just add live=1 to search form and results: Code: (% searchform live=1 %) Search plugin (I18N) - Carlos - 2012-03-03 mvlcek Wrote:Currently I do not plan to extend the searching capabilities of I18N Search beyond words and tags. Could it be possible that when page is indexed, its parent is added as a (virtual) tag like _parent_{SLUG}, so that you can do: Code: (% searchresults tags=_parent_myparent ... %) Do you think there is a way to do this without patching the indexer? (I think there's some hook or filter in the plugin, but don't know if it can be used for this...) Search plugin (I18N) - mvlcek - 2012-03-03 Carlos Wrote:Could it be possible that when page is indexed, its parent is added as a (virtual) tag like _parent_{SLUG} That's a great idea! It's implemented in I18N Search version 2.6:
You can list all direct children of a page e.g. products with Code: (% searchresults tags=_parent_products %) Code: (% searchform %) |