Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search plugin (I18N)
(2016-12-29, 05:13:54)Oleg06 Wrote: code to search
Code:
<?php get_i18n_search_results(array('addTags'=>'_search', 'DATE_FORMAT'=>'', 'max'=>10, 'i18n'=>0, 'numWords'=>'30', 'order'=>'created','showPaging'=>1,'HEADER'=>'','NOT_FOUND'=>'Not Found','component'=>'search')); ?>
I use plugin I18N Custom Fields.
http://prntscr.com/doztwm

Thanks that works.

Unfortunately the default does not apply to existing pages so I will need to edit them all to apply that value.
Reply
Posting as a last resort. I'd like to use the search results as a list of categories on a page except to have them displayed in a single line. I need a little help with the CSS to get it to do this, please. I got the tagclassprefix figured out but I've been googling and trying several things for over an hour and can't get the list to display inline. Source code looks like this:

Code:
<li  class="search-entry  nav-categories">

I tried all manner of combinations of "nav-categories" and "li" {display:inline;} in the Innovation Theme style sheet but nothing is working. What the heck do I put in the CSS to get it to display inline?
Reply
li {display:inline;} has got to be right
Reply
(2017-03-17, 05:16:42)Timbow Wrote: li {display:inline;} has got to be right

I thought so too but it doesn't work (and yeah, I cleared all my caches to make sure that wasn't the problem). Weird, huh?
Reply
This is the Innovation theme?
Reply
Quote:I tried all manner of combinations of "nav-categories" and "li" {display:inline;} in the Innovation Theme style sheet but nothing is working. What the heck do I put in the CSS to get it to display inline?

Yes.
Reply
(2016-03-18, 06:23:16)Oleg06 Wrote: Martin, please add a checkbox to the plugin settings I18N Search to disable the tags <ul> and <li>.
They are very interfere when you use the plugin "Special pages" and various frameworks.
I did it for myself, but I'll have to re-add that functionality after each update.
http://prntscr.com/agjw7s
Maybe it will be useful for other users.
http://getsimplecms.ru/plaginy-dlya-gets...8n-search/

Oleg,

thank you so much! I was almost ripping my hair off trying to find a solution for getting rid of the tags, you saved my day Big Grin.
That way, i am able to position the search results sideways and make em fit really nicely to the desired design.

@Martin, thank you for all the plugins you made, they are really useful and add a lot of additional functionality to GetSimple.
I also would be really glad to see Oleg's request for a checkbox, to disable the list tags, implemented in an updated version of l18nsearch, if there will be one.

Thanks a lot for your contribution.
Regards.
Shasaar
Reply
As jlyon1515 commented, there seems to be a small bug/typo in searchresults.php line 207 (checked in plugin version 2.13.1):
<span class="next"> should be <span class="last">
Reply
Good morning, how are you?

I'm Brazilian and the plugin is working perfectly!

I would like to know if there is an option to use a friendly URL

My site returns the following link http://alexandrino.cim.br/buscar/?tipo=A...dade=Venda

I would like to use this way:

http://alexandrino.cim.br/buscar/apartam...drao/venda

it's possible?
Reply
Hi,

i'm using the "tags-and-numbers" example (http://mvlcek.bplaced.net/get-simple/i18.../tag-count) to display a list of categories.

Now i'd like to know if somebody can tell me how to show the tags labels as the link description instead of the tags name.
The reason is, i usually set the tags name in shortcuts while the label is what it is meant to be.

In special pages, the fields look like this:
tag name = pic_ls
tag label = Light and Shadow

The results are now: pic_ls(1).
I'd be pleased if it's possible to have here: Light and Shadow(1).

The important part of code is here:
PHP Code:
<?php
  
global $args;
  
$tags return_i18n_tags();
  foreach (
$args as $arg) {
    
$tag strtolower($arg);
    if (
count($tags[$tag]) > 0) {
?>
    <a href="<?php echo htmlspecialchars(find_i18n_url('search-results',null)); ?>?tags=<?php echo urlencode($tag); ?>">
      <?php echo htmlspecialchars($arg); ?> (<?php echo count($tags[$tag]); ?>)
    </a>
<?php
    
}
  }
?>

Could somebody lend me a helping hand in how to achieve this?
Thank you very much in advance.
Shasaar
Reply
Hi there,

I'm looking for a way to find a site called "example page" when typing in "ample". What must be done?

Alex
Reply
http://191.252.94.191

View my site.
Reply
(2017-05-11, 03:02:29)Carrara Wrote: http://191.252.94.191

View my site.

It doesn't work on your site. There are results when earching for "apartemento". But searching for parts of words - e. g. "partemento" - doesn't find anything: http://alexandrino.cim.br/buscar/?words=partamento

I need a search which finds parts of words.

Alex
Reply
(2017-05-12, 20:05:51)Alexander_ Wrote: It doesn't work on your site. There are results when earching for "apartemento". But searching for parts of words - e. g. "partemento" - doesn't find anything: http://alexandrino.cim.br/buscar/?words=partamento

I need a search which finds parts of words.

Alex

The plugin searches inside the page (the actual content) and page-tags. You want it to search inside the slug.
Reply
(2017-05-17, 20:44:39)datiswous Wrote:
(2017-05-12, 20:05:51)Alexander_ Wrote: It doesn't work on your site. There are results when earching for "apartemento". But searching for parts of words - e. g. "partemento" - doesn't find anything: http://alexandrino.cim.br/buscar/?words=partamento

I need a search which finds parts of words.

Alex

The plugin searches inside the page (the actual content) and page-tags. You want it to search inside the slug.

No, the plugin only finds complete words but not parts of words. A site with the text "have a look at our apartments" is found when searching for 'apartment' bout not when searching for 'part'.

Alex
Reply
I have not had luck finding any search engine that allow partial word searches. Even if you try to instruct Google to search for "part" you will never get "apartments" within the search results - which is a good thing, otherwise the search results would be extrem inaccurate.
Reply
(2017-05-19, 00:41:35)Alexander_ Wrote: No, the plugin only finds complete words but not parts of words. A site with the text "have a look at our apartments" is found when searching for 'apartment' bout not when searching for 'part'.

Searching with wildcards at the beginning is very expensive, in processing terms. However, if you search for 'apart' it should find 'apartments' (implied wildcard at the end).
--
Nick.
Reply
(2017-05-19, 04:50:51)hameau Wrote: Searching with wildcards at the beginning is very expensive, in processing terms. However, if you search for 'apart' it should find 'apartments' (implied wildcard at the end).

That works fine. So if I want the user to find "bittersweet chocolate" when searching for "sweet chocolate" I have to fill the keywords-field separately with the word "sweet".

Alex
Reply
Dear mvlcek,

Is there a way to generate relative urls from (% searchform %) or get_i18n_search_form ?
alternatively, is there a return-style return_search_form equivalent for the function get_i18n_search_form
alternatively, could searchform make use of a component that filters the generated action url?

I looked inside the plugin and found that the $type=full/relative parameter is not used in the find_url call (or is it geturl? I forget the details), so there is currently no hope that an undocumented feature of param would be present to solve the (ever recurring, mostly CKEditor-caused, but not in this case) absolute/relative url hardships.

[Context info: My intended config is with several DNS names pointing to the same Getsimple root dir on the base site, where I want the referring domain name to be persistent in the url line. I've cracked most situations: relative, migratable prefixes to relative urls in links and img src refs, nav with i18n (using filter component -- thanks, mvlcek), but the searchform solution should be simpler than brewing my own link.]

Sorry for asking a possibly duplicate question, but I didn't have the courage to plough through all 26 pages of this forum thread.

Thanks for any help or insights that you could provide.
Reply
(2013-08-01, 01:40:22)Angryboy Wrote: Hopefully this is a cleaner and easier to understand way of doing what I mentioned before (again, using return_i18n_search_results, since its purpose is for custom outputs)

PHP Code:
<?php
  
// total number of results
 
 $total 5;
 
 
  
// change parameters (except $max) to ones relevant to your search)
 
 $search return_i18n_search_results($tags=null$words=null$first=0$max=999$order=null$lang=null);
 
 
  
// apply this function as many times as you want to throughly shuffle the results
 
 shuffle($search['results']);
 
 
  
// now limit the results to the max number
 
 $search['results'] = array_slice($search['results'], 0$total);
 
 
  
// loop through each result and output as desired
 
 foreach ($search['results'] as $result) {
 
   // output
 
 }
?>

Hello,

thank you for the snippet, but could you please tell me what to write in the foreach-loop to display the results in the same way as if i'd use "get_i18n_search_results(array('tags'=>'news','words'=>' ', 'max'=>3,'numWords'=>10,'HEADER'=>null)); ?>"?

I tried "echo $result->content;" but that doesn't output anything.
However, the "echo $result->url;" outputs the desired random page slugs.

Thank you very much in advance.
Cheers.
Shasaar
Reply
Hello,

I'd like to add more tags than just one to limit the search results only to those pages but I'm already ripping my hair off cause whatever I do, it only accepts one tag.

The situation is as following:
Pages are:
Some Other Pages
Categories > Categorie 1 > products of Categorie 1
Categories > Categorie 2 > products of Categorie 2
Categories > Categorie 3 > products of Categorie 3

If I use now (% searchresults addTags=_parent_categories %), the searchresult is only a list with a link to Categorie1 - Categorie3, but NO products are shown.

If I use instead (% searchresults addTags=_parent_categorie1 %), the searchresults are only the products in Categorie1.

But my searchresults should be the results of all the products in Categorie 1-3.
How can I achieve that?

I tried (% searchresults addTags=_parent_categorie1 _parent_categorie2 %) or (% searchresults addTags=_parent_categorie1 addTags=_parent_categorie2 %), but it's not working. Sad

Does anybody have an advice for me, what I'm doing wrong?

Thank you very much in advance.
Cheers.
Shasaar
Reply
Hello,

I found the solution for my problem, guess I'm just quite perfect in a really complicated way of thinking Big Grin.
In german we say, "there are so many trees visible, that it is impossible to see the wood".

Just added the keyword "_product" to any product-templates and limited the search to this tag only.
(% searchresults addTags=_product %)

It is even mentioned on mvlcek's website and I stumbled across it many times when trying to figure out a solution, I just didn't catch it.
Well, well, another problem solved, case closed Wink.

Cheers.
Shasaar
Reply
Hi everybody!

I have a problem with I18N search plugin. On my site is two language: slovak and english, but if i want to search words with diacritics (for example: č, š, ž etc.) it's return that  "No results found".

Can you help me?

Thanks!
Reply




Users browsing this thread: 1 Guest(s)
Free HDTV Channels Residential Solar Panels