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) - Angryboy - 2012-04-21 Robzilla Wrote:...Please provide me support with php-code "ready 2 paste" - i'm so a php-noOob.Well here you go Mr Zilla: Firstly change the current php code you've got for the search results to this: Code: <?php get_i18n_search_results(array('tags'=>'news', 'max'=>3,'showLanguage'=>0, 'showDate'=>0, 'numWords'=>10,'HEADER'=>null, 'component'=>'display_news')); ?> Code: <h3 class="search-entry-title"> Look to mvlcek's custom results rendering example for more, but that should give you your [more] link. You can edit your display_news component to output the results to whatever you wish to. Making numWords subjected to letter count is beyond my scope however (but if you want you can restrict it by paragraphs by using 'numWords'=>Np where N is the number of paragraphs) so accept my apologies for being unable to help you with that. Hope this is your solution! Search plugin (I18N) - Robzilla - 2012-04-21 Dear Sir Angryboy, thank you very much! That's it. Works like a charm. :-) Really nice support here! Unfortunately i'm back agaein with another "error". I use the code above ^ to include my newsticker in header on all sites. On a "i18n search" page with this code: Code: (% searchform addtags=_special_foo %) ...the newsticker displays: Quote:Keine Ergebnisse gefunden (No search results found)...when clicking the search button. The search results from the form are all well. :-( Coul'd anyone please help me to "split" the newsticker (search results) from the searchform (search results)? Kind regards, Rob Search plugin (I18N) - Angryboy - 2012-04-21 Sorry that I can't help you with that problem there. It's one I've never realised was in the plugin itself, so we'll need to ask mvlcek if he can include a fix for it in the next update (whenever that may be). @mvlcek (in case the request is misunderstood): Rob has asked for the ability to link a specific 'searchresults' placeholder/code to one or more 'searchform(s)' so that any existing placements of i18n Search are unaffected by use of the search form. Perhaps this could be solved by giving the option of providing an id for the search form which correlates to the results, e.g Code: (% searchform id=search %) Code: <!--news results shown in the header--> So when a the form is used on that page, only the searchresults with the id search is affected, and the other(s) still output(s) the results shown from before (i.e. the header still shows the news results, unaffected by the search made by the form). Search plugin (I18N) - mvlcek - 2012-04-21 @Robzilla, @Angryboy: If you have a search result call in the template, just make sure to specify tags and words, then the results will not be influenced by form parameters, e.g.: Code: <?php get_i18n_search_results(array('tags'=>'news', 'words'=>' ', ...)); ?> @Robzilla: all search calls (searchform, searchresults, searchrss) should have the same search parameters (tags, addtags, words, addwords): tags specifies the keywords to use, while addtags specifies the tags to add to those given by the user. If in you example you show the tag cloud and the user selected a tag (-> tags parameter), it would be ignored in the results, as the tags are already set. Search plugin (I18N) - Angryboy - 2012-04-21 Once again I stand corrected :-) Thanks again, mvlcek. @Robzilla: after the Code: 'tags'=>'news', in your search form's PHP coding, paste Code: 'words'=>' ', as mvlcek said and your problem should be solved (I've tested it also to see if it works, and it did). Search plugin (I18N) - Robzilla - 2012-04-21 YOU ROCK!!! Works well now. Thx, Rob :-) Search plugin (I18N) - Robzilla - 2012-04-22 Sorry guys, but there is one little bug / error left and i can't figure out how to solve this issue. :-( This code in template header (calling component "newsticker"): Code: <?php get_i18n_search_results(array('tags'=>'news', 'words'=>' ', 'max'=>3,'showLanguage'=>0, 'showDate'=>0, 'numWords'=>8,'HEADER'=>null, 'component'=>newsticker)); ?> This one as component "newsticker": Code: <h3 class="search-entry-title"> And that in site "foo" content: Code: (% searchform addtags=_special_foo %) ...also this one on another site called "news": Code: (% searchresults tags:"news" lang:de numWords:-1 order:reverseurl HEADER: %) Behavior: If i click on the bottom "newsticker-pagination" (< << 1,2,3,4,5 >> >) Code: span class="search-results-paging" Quote:Keine Ergebnisse gefunden (No search results found)... in site content of "news" and "foo" (the sites mentioned above). If this one is solved - everything works how it should. It woul'd be great if anyone can give me a little help, maybe others can benefit from my support-request / your answers too. Regards & Thanks in advance, Rob :-) Search plugin (I18N) - mvlcek - 2012-04-22 I18N Search version 2.6.1
Basically you can't use paging for search results embedded in the template. Rather add a more link below these results leading to a page displaying more results (and offering paging), e.g. Template: Code: ... Code: ... Search plugin (I18N) - alienee2 - 2012-04-22 this is great! - i was just about to post on this issue, because of the scenario where one might be using i18n Search to display a blog listing, and then in the sidebar, the results of some other search; when you page in the blog listing, the other results were also paging.. but it is now fixed in this update! in my instance, i am using special pages to output 2 different special page search results on the same page; the blog listing is in the left column, and then i created a special page type called widgets, of which the results (widgets) are being displayed in the sidebar... ...which brings up my next questions since these are all 'widgets' i'm trying to create: 1.) how would one create a clickable tag cloud, using i18n search, for a specific special page type, in this case the blog.. EDIT: i found my notes for this...and this is the code (for anyone else needing it): Code: <?php get_i18n_tags(array('slug'=>'search')); ?> 2.) any ideas on how to do a popular posts listing? I'm guessing there is some way to access the hitcount data and setup something like this.. 3.) for Special Pages Blog - is there any easy/ quick way to setup an archive listing by month/year... thanks again! -marc Search plugin (I18N) - mvlcek - 2012-04-27 I18N Search version 2.7:
Search plugin (I18N) - shawn_a - 2012-04-27 mvlcek, check your inbox. Search plugin (I18N) - Connie - 2012-05-02 Martin, I just installed the i18NSearch 2.7 in a GetSimple 3.1 the language files are uploaded, there is the de.php-file but it is not read. In the page of a german website, http://www.lyriktext.de/Suche, you can see that is shows the english text, the button and the results bring english text it should read german text in gsconfig.php I set: Code: # Set PHP locale what to do? Search plugin (I18N) - mvlcek - 2012-05-03 Connie Wrote:I just installed the i18NSearch 2.7 in a GetSimple 3.1 If you use the I18N plugin, you have to set the default language on Pages/View All Pages (I18N). Otherwise you need to set $LANG in gsconfig.php. Search plugin (I18N) - Rene - 2012-05-14 mvlcek Wrote:diem Wrote:I suppose you are referring to these lines of code: Hi Martin, Search result is showing content from protected pages by plugin 'Front-End User Login'. So i've add the following filter to an existing custom plugin: add_filter('search-veto','show_result'); But now I'm stuck: what to check for in the 'show_result' function? Must I read the XML again or is this fields already in a var? The XML in protected page is: <memberonly><![CDATA[yes]]></memberonly> Search plugin (I18N) - mvlcek - 2012-05-14 Rene Wrote:Search result is showing content from protected pages by plugin 'Front-End User Login'. Try the following: Code: function show_result($item) { Search plugin (I18N) - Rene - 2012-05-15 Awesome, your reactions are just as quickly and professional as your plug-ins. I couldn't place the $item parameter right and renamed the function (was a test). Thx Search plugin (I18N) - volaverunt - 2012-05-15 (Someone speak spanish? I don't speak english, I'm learning, sorry) Instale los plugins de ''News Manager'' para los nuevos posts y ''Calendar'' para eventos. News Manager crea un folder en: data/posts Calendar: /data/other/calendar Como hacer que I18N Search muestre esos datos en sus resultados? Solo muestra /data/pages/ Alguna solucion? Gracias... -------------------------------- ...English. (Sorry for my english) -------------------------------- I installed ''News Manager'' for new posts and ''Calendar'' for events. News Manager creates a folder in: data / posts Calendar: / data / other / calendar How to make I18N Search these data show the results? Only show / data / pages / Any solution? Thank you ... Search plugin (I18N) - mvlcek - 2012-05-15 volaverunt Wrote:I installed ''News Manager'' for new posts and ''Calendar'' for events. Please ask this question in the "News Manager" thread. Out-of-the-box I18N Search only searches pages, but can be enhanced easily by other plugins (e.g. I18N Gallery plugin, I18N Special Pages plugin). I think some users of News Manager have already extended it!? Por favor, pregunta esto en la topic "News Manager" thread. Es possible extender I18N Search, que News estan buscado. Creo que algunos usuarios de News Manager hacÃÂan esto, pero no estoy seguro. I hope, my spanish is understandable ;-) Search plugin (I18N) - volaverunt - 2012-05-15 mvlcek Wrote:volaverunt Wrote:I installed ''News Manager'' for new posts and ''Calendar'' for events. .... Ok, but my question maybe is not clear, is for this plugin... Can search all pages inside the data folder (Post, events, news)? Because I18N only search inside of pages folder, right? And many plugins create a folder for their exclusives files. Thank you. Sorry for my bad english. Search plugin (I18N) - mvlcek - 2012-05-15 volaverunt Wrote:Can search all pages inside the data folder (Post, events, news)? If a plugin passes its data (e.g. the text of posts, events, news) to the I18N Search plugin during indexing and also tells it, how to display the data, then I18N Search will also find these items - and in this case it does not matter in which folder the data is. Otherwise it only searches the text and tags of pages. Search plugin (I18N) - volaverunt - 2012-05-15 mvlcek Wrote:If a plugin passes its data (e.g. the text of posts, events, news) to the I18N Search plugin during indexing and also tells it, how to display the data, then I18N Search will also find these items. Ok, I understand.... Well, my last question. I can do that? Or that is a possibility just for the plugin's author? I give up... Thanks for your help. Anyway, this is a great plugin. See you! Search plugin (I18N) - mvlcek - 2012-05-15 volaverunt Wrote:Ok, I understand.... Well, my last question. I can do that? Or that is a possibility just for the plugin's author? It should be done by the plugin's author. See this post (and ask @geroyche) for a solution. Doesn't seem to have been included into News Manager yet. Search plugin (I18N) - volaverunt - 2012-05-15 mvlcek Wrote:It should be done by the plugin's author. It's working!!! But, the content doesn't show up, only the title, any solution?... Thank You! And Thank you @geroyche! Search plugin (I18N) - mvlcek - 2012-05-15 volaverunt Wrote:It's working!!! But, the content doesn't show up, only the title, any solution? If you look at the code you see that null is returned for the content. I suppose, replacing this with the following will work: Code: case 'content': return htmlspecialchars_decode($post->content); Search plugin (I18N) - volaverunt - 2012-05-16 mvlcek Wrote:If you look at the code you see that null is returned for the content. Great! Thank you @mvlcek, you are amazing... Reputation +. |