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) |
RE: Search plugin (I18N) - Carlos - 2015-07-06 I'll try to explain Oleg's problem. It's an issue with PHP's strftime and the %B placeholder. In Russian, Polish and I suppose other languages, months names are slightly different if genitive (e.g. in %d %B %Y) or nominative ("%B" or "%B %Y") But %B will always return either genitive or nominative, depending on the server setup. As a temporary workaround I made a small plugin (the one that Oleg links) that allows replacing strings (given array) between given start and end strings (to avoid replacing unwanted strings in the content), with an example for News Manager, to change month names returned by stftime, to the ones Oleg needed (genitive, for post dates). However this doesn't work for him with I18N Search (using the appropriate start/end strings) - I suppose that it's because both my plugin and yours use the content filter, and so it depends on which one is run first. PS I was thinking about some fix for News Manager (which should use both genitive -post dates- and nominative -archives-), maybe adding support for two months arrays in the language file and replace %B by the correct one depending on the context. RE: Search plugin (I18N) - Carlos - 2015-07-06 Oleg, do you use a custom component to display results? RE: Search plugin (I18N) - Oleg06 - 2015-07-06 I use the plugin I18N Special Pages RE: Search plugin (I18N) - Carlos - 2015-07-07 I'll reply in the Special Pages thread RE: Search plugin (I18N) - lazlo - 2015-07-11 Hi I have a website for the Town of Cornwall using GetSimple: http://www.cornwallct.org/minutes/index.php?id=home Trying to set up search box the same way as seen here on this page, that is listing the past searches by popularity: http://www.chattanooga.gov/ Is it possible to do with I18N Search ? I am not very good with PHP, so could you give me a detailed answer if you have one thanks Lazlo RE: Search plugin (I18N) - moonspider - 2015-08-08 I have a simple question, pretty sure there's got to be an answer for that. I use return_i18n_search_results in my template for various lists. My pages also have numeric slugs, e.g. 01,02,03, etc. Being a PHP noob that I am, at first I named everything straightforward with 1,2,3. But then came page 10 and all my search lists reavealed that 10 comes after 1 and not 9. I fixed the problem temporarily by adding a zero to the first 9 pages, but that's only until I get to page 100 In short, if I use 'reverseurl' and 'url' as $order, is there a way to sort the results in natural order so that 10 comes after 9 etc? I tried sorting by creDate but that returns results in ascending order, and I sometimes need them descending. Btw, is there a way to do a reverse creDate? RE: Search plugin (I18N) - mvlcek - 2015-08-08 (2015-08-08, 05:43:55)moonspider Wrote: I have a simple question, pretty sure there's got to be an answer for that. Not tested: looking at the code it might work if you use 'id' or '-id' as order instead - the url/slug is stored in the id field and when comparing numeric strings, it should sort them numerically. RE: Search plugin (I18N) - moonspider - 2015-08-08 (2015-08-08, 06:05:51)mvlcek Wrote:(2015-08-08, 05:43:55)moonspider Wrote: I have a simple question, pretty sure there's got to be an answer for that. Yay, it works! Thank you. '-creDate' works too. RE: Search plugin (I18N) - gslexx - 2015-08-23 Hello! Tell me, you can do so in the settings (% searchresults %) it was possible to specify classes for the tags ul and li? Thank you! RE: Search plugin (I18N) - phpman - 2015-08-26 Hi, what´s are the correct syntax if i like to use I18Nseacht with Read Agency Theme: Original Theme search are: <div class="search"> <form role="form"> <input type="text" class="search-form" autocomplete="off" placeholder="Search"> <i class="fa fa-search"></i> </form> but if i like to replace this with I18Nsearch syntax like sample from your side it does not show like original one. Hope anyone can help. best regards, Harald RE: Search plugin (I18N) - moonspider - 2015-09-02 (2015-08-08, 06:24:05)moonspider Wrote:(2015-08-08, 06:05:51)mvlcek Wrote:(2015-08-08, 05:43:55)moonspider Wrote: I have a simple question, pretty sure there's got to be an answer for that. well, as you said, it works when comparing numeric strings. if there are letters preceding numbers (e.g. 'slug1', 'slug2', 'slug10'), it does the usual 1-10-100-2. just ran into this issue and had to switch from -id to -credate. Search for multiple fields - Alexander_ - 2015-10-23 Hi there, ist there a way to do a search on more than one fields? E. g. search for specialfield_1 = x and specialfield_2 = y. Alex RE: Search plugin (I18N) - Tyblitz - 2015-10-23 (2015-10-23, 03:37:22)Alexander_ Wrote: Hi there, From the docs: Quote:Parameters for the search results: Eg, on your page: Code: (% searchresults tags=specialfield_1 specialfield_2 %) In PHP (untested, might need to specify an array for the tags param): PHP Code: <?php RE: Search plugin (I18N) - Oleg06 - 2015-10-23 as far as I understood, this code allows you to exclude tags ul and li from the code search Code: <?php RE: Search plugin (I18N) - Oleg06 - 2015-10-24 Code: <?php RE: Search plugin (I18N) - dryland404 - 2015-11-13 I've been searching for a while for a way to implement the below in a custom component. Have I over looked a way to have I18N provide the complete page content rather then an excerpt? I would like to implement a basic blog page that contains all (or paginated) blog entry's of a tag / category on a single page. The current excerpt appears to strip HTML, where as I would like to also include the formatting and the media from the post without having to duplicate it into a custom field. If this is not already available how would I get the current search result entry slug so I may use in a custom component <?php get_page_excerpt(1000, $html); ?>; The reason why is I have converted a wordpress site to GetSimple and would like to replicate the previous blog entry page layout which showed the full html of the blog entry's in sequence. RE: Search plugin (I18N) - Carlos - 2015-11-13 You can use Custom Rendering with a component http://mvlcek.bplaced.net/get-simple/i18nsearch/i18n-search-custom-rendering and display the content with, I suppose: Code: echo $item->content; RE: Search plugin (I18N) - dryland404 - 2015-11-13 (2015-11-13, 08:38:16)Carlos Wrote: You can use Custom Rendering with a component Thank you AGAIN! Carlos. I could have sworn when tested before it stripped the html tags. Works as you directed. RE: Search plugin (I18N) - 0zz - 2016-02-05 Something weird happens on my website: I'm using SpecialPages and Search to display news on the main page. I also want to have a search form in my template. The code I use to call news: Code: <?php get_i18n_search_results(array('tags'=>'news', 'DATE_FORMAT'=>'%d %B, %Y', 'max'=>5, 'i18n'=>0, 'lang'=>'ru', 'numWords'=>'1p', 'order'=>'created', 'showPaging'=>1, 'HEADER'=>'')); ?> The code I use to call search form: Code: <?php get_i18n_search_form (array('slug'=>'search', 'showTags'=>0, 'minTagSize'=>90, 'maxTagSize'=>200, 'GO'=>'Найти', 'PLACEHOLDER'=>'Поиск по сайту')); ?> Code: (% searchform %) But for some reason, when I try search "something", for example, it states in the address bar: http://.../?words=something&search=Найти instead of: http://.../search/?words=something&search=Найти So, it does not redirect to the relevant page, and the results are shown instead of news. I'm using latest plugins, and cannot figure out what is causing the problem.. RE: Search plugin (I18N) - mvlcek - 2016-02-05 (2016-02-05, 01:44:23)0zz Wrote: ... What does the generated HTML form look like? What is your URL pattern? Any redirects in your .htaccess? RE: Search plugin (I18N) - 0zz - 2016-02-05 (2016-02-05, 04:22:55)mvlcek Wrote: What does the generated HTML form look like? Code: <form action="http://rkvaqt.uz/index.php?id=search" method="POST" class="search"> The URL pattern is default and no changes to the default .htaccess - I tried switching on and off Friendly URLs in AdminPanel - same result. RE: Search plugin (I18N) - mvlcek - 2016-02-06 (2016-02-05, 15:00:20)0zz Wrote: This information does not match your problem description: * above form uses POST, but in your description you state that the URL is http://.../?words=something&search=Найти, which is a GET. Looking at the source of your site, you manually add a form (without action!) and then call get_i18n_search_form inside resulting in Code: <form class="navbar-form navbar-right search" role="search"> RE: Search plugin (I18N) - 0zz - 2016-02-06 omg! yeah, for some reason I didn't notice that additional form tag - this is a bootstrap theme thing.. Thank you! I'm back to life! )) RE: Search plugin (I18N) - FrédéricG - 2016-02-10 Hi, @mvlcek very very nice plugin. but any project to make a better navigation ? Some ideas to improve (perhaps it's already possible but how ?) 1. Actually we have for a page 2 an link towards http://localhost/getsimple/blog/?tags=&words=&search=&page=2 Is it possible to have only http://localhost/getsimple/blog/?page=2 (url which is already active) 2. When we are on page 2 to come back page 1 we have http://localhost/getsimple/blog/?tags=&words=&search=&page=1 is it possible to have only http://localhost/getsimple/blog/ (to avoid duplicate content for seo between http://localhost/getsimple/blog/?tags=&words=&search=&page=1 et http://localhost/getsimple/blog/) 3. Is it possible to add on the header tag prev and next (cF. https://support.google.com/webmasters/answer/1663744) like this, if we are on page 2 : <link rel="prev" href="http://localhost/getsimple/blog/" /> <link rel="next" href="http://localhost/getsimple/blog/?page=3" /> Regards, keep improving Frédéric RE: Search plugin (I18N) - mvlcek - 2016-02-14 I18N Search version 2.13:
Comment:
|