Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search plugin (I18N)
Your link ''i18n_search_dummy.zip'' Is not working.
I speak spanish, sorry for my english. I'm learning english with GetSimple too... LOL!

.
Reply
volaverunt Wrote:Your link ''i18n_search_dummy.zip'' Is not working.

Fixed - this was caused by the forum upgrade requiring an additional parameter for the download.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
As you do this?
Code:
// title and description are texts with no HTML tags or HTML entities
    // you can combine the text of multiple fields for the title or content
    // the only difference between title and content is that words in the title count more
    i18n_search_index_item('isd:'.$id, null, $date, $date, null, $item['title'], $item['description']);

With these options...

Code:
$dir = opendir(GSDATAOTHERPATH.'/calendar');
    while($file = readdir($dir)) {
        if($file != '.' and $file != '..'){
            $xml = simplexml_load_file(GSDATAOTHERPATH.'/calendar/'.$file);
            $date = $xml->date;
            $dateYear = substr($date, 4, 7);
            $dateMonth = substr($date, 2, 2);
            $dateDay = substr($date, 0, 2);
            if($number <= $numberOE and $dateMonth == $_GET['month'] and $dateYear == $_GET['year']) {
                if(isset($events["$dateDay"])) {
                    $events["$dateDay.".rand(0,100)] = $file;
                } else {
                    $events["$dateDay"] = $file;
                }
                $number++;
            }
        }
    }

Is it possible?
I speak spanish, sorry for my english. I'm learning english with GetSimple too... LOL!

.
Reply
Dear support team,

I installed search plugin, it works fine. But the problem is it does not index Unicode page. As our page is in Vietnamese, search engine cannot search words with accents. I found that i18n_word_index.txt and i18n_tag_index.txt files are encoded in ASCII (when it should be UTF-8 encode).

Do you have some idea for this issue ?
____________________________

Edit:

Dear,
I solved this problem by installing mbstring library for PHP. Without this library, the index function cannot index words in UTF-8.
Simple commands like this:
# yum install php-mbstring
# service httpd restart

Smile
Reply
hungld Wrote:Dear support team,

There is no support team, just one person doing this in his free time...

hungld Wrote:I installed search plugin, it works fine. But the problem is it does not index Unicode page. As our page is in Vietnamese, search engine cannot search words with accents. I found that i18n_word_index.txt and i18n_tag_index.txt files are encoded in ASCII (when it should be UTF-8 encode).

Do you have some idea for this issue ?

You might not have the PHP mbstring module installed.

I18N Search will use UTF8, if the mbstring module is installed and fall back to ASCII/default 8-bit code page, if it is not installed.

See this page for an example with multiple languages and search here for any of the words on that page.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
how to disable search button so only input field is shown?
Reply
Dear all, first of all thank you for your wonderfull job.

Now the question: is there a way to personalize the (% searchform %) ... I mean like (% searchresult %) ... I would like to define id or class to style it with css

thanks
Reply
ccorsani Wrote:Dear all, first of all thank you for your wonderfull job.

Now the question: is there a way to personalize the (% searchform %) ... I mean like (% searchresult %) ... I would like to define id or class to style it with css
Why wouldn't you enable source view, and add there <div id="searchresults">(% searchresult %)</div> ? Smile
Addons: blue business theme, Online Visitors, Notepad
Reply
ccorsani Wrote:Dear all, first of all thank you for your wonderfull job.

Now the question: is there a way to personalize the (% searchform %) ... I mean like (% searchresult %) ... I would like to define id or class to style it with css

thanks

If you look at the HTML code, you will see that the search form is a <form class="search"> and the search results are in a <ul class="search-results">. Thus you can style it according to your wishes using these classes.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
yojoe Wrote:
ccorsani Wrote:Dear all, first of all thank you for your wonderfull job.

Now the question: is there a way to personalize the (% searchform %) ... I mean like (% searchresult %) ... I would like to define id or class to style it with css
Why wouldn't you enable source view, and add there <div id="searchresults">(% searchresult %)</div> ? Smile
This will probably do what has been asked for sufficiently. A nice future feature though would be custom rendering of the form (in very much the same way that the results can already be done) just to make the whole plugin as potent and fully customisable as possible.
Reply
Angryboy Wrote:A nice future feature though would be custom rendering of the form (in very much the same way that the results can already be done) just to make the whole plugin as potent and fully customisable as possible.

You don't need a feature like this - or it's rather there already:
  • in its simplest form the search form is just a form (class "search") with an input field and a submit input - just style it with CSS
  • if you want to replace the submit input with a button or image or do something similar: just copy the generated HTML/Javascript into your template or a component and customize it to your wishes - just make sure that the submitted parameters are the same as in the generated form
  • if you want to have a customized form with the tag cloud (the only dynamic part of the form) and styling it with CSS is not sufficient, you will need to use the return_i18n_tags function to build the tag cloud.
As you can see, you can customize the form in any way you want!
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:
Angryboy Wrote:A nice future feature though would be custom rendering of the form (in very much the same way that the results can already be done) just to make the whole plugin as potent and fully customisable as possible.

You don't need a feature like this - or it's rather there already:
  • in its simplest form the search form is just a form (class "search") with an input field and a submit input - just style it with CSS
  • if you want to replace the submit input with a button or image or do something similar: just copy the generated HTML/Javascript into your template or a component and customize it to your wishes - just make sure that the submitted parameters are the same as in the generated form
  • if you want to have a customized form with the tag cloud (the only dynamic part of the form) and styling it with CSS is not sufficient, you will need to use the return_i18n_tags function to build the tag cloud.
As you can see, you can customize the form in any way you want!
Thanks once again :-) It's always amusing to me when you've accomodated for certain features beforehand and they've yet to be noticed/realised xD
Reply
Is there a way of utilising I18N Search to create automatic archiving for certain page types? Much like the archive of roog's News Manager plugin. I can see how someone can create a static one using tags - so they have the tag 'may2012' for all of their May entries, then have a link in their sidebar called 'May 2012' with the url "?tags=may2012". But what if someone wanted the links to be generated automatically whenever there is a new in a different month is posted?
Reply
I've found my own way of doing so now utilising tags (_year and _month).

Tutorial: Examples:
Best solution I could think of in the mean time (if you don't want to add an archiving feature to i18n/i18n search in the future).

---*edit*---

@mvlcek ↓ : Thanks for updating the plugin to have those new tags! They work perfectly, so I've updated the tutorial accordingly. *emphatic swollen thumbs up*
Reply
I18N Search version 2.8:
  • automatically adds (virtual) tags for publishing/creation year and month (e.g. a page from January 2012 would get the tags _pub_2012 and _pub_201201; if a creation date exists (via I18N Custom Fields or I18N Special Pages), tags _cre_yyyy and _cre_yyyymm are also created - @Angryboy: this should simplify archiving as described in your great tutorial)
  • CSS classes search-words and search-submit for the input field and submit button of search forms to simplify CSS styling in older browsers (@ccorsani, @alrobeler)
  • danish language (thanks to @chrsand)
  • polish language (thanks to @yojoe)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I use it in combination with i18n Special Pages, but if i search for the content of one of the Customs Textfields I get no result, it appears that it only searches for the page content... any way to resolve this?
Reply
m1k3y Wrote:I use it in combination with i18n Special Pages, but if i search for the content of one of the Customs Textfields I get no result, it appears that it only searches for the page content... any way to resolve this?

You have to select a value from the index dropdown (words, as tag) for the fields on the special page configuration. After that you should update/resave a page to trigger reindexing.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
THX... Its incredible how flexible this Plugin is... you're doing a great job


Edit: Another Question, how can i style the suggestions in the form?
EDit2: I got it Big Grin
Reply
Finally my last question, who can i add a filtering Function when displaying specialpages ?

I would like to filter after tags
Reply
m1k3y Wrote:Finally my last question, who can i add a filtering Function when displaying specialpages ?

I would like to filter after tags

I don't understand, what you want to do.
If you use I18N Search, you can get a list of special pages filtered by tags by specifying the tag(s) in the search call.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:
m1k3y Wrote:Finally my last question, who can i add a filtering Function when displaying specialpages ?

I would like to filter after tags

I don't understand, what you want to do.
If you use I18N Search, you can get a list of special pages filtered by tags by specifying the tag(s) in the search call.

What I want to achieve is a product list which is automatically sorted after the producttag (e.g Topsellers at the top, beneath all products tagged as category2 and so on) Is this possible
Reply
m1k3y Wrote:What I want to achieve is a product list which is automatically sorted after the producttag (e.g Topsellers at the top, beneath all products tagged as category2 and so on) Is this possible

If your products are each tagged with only one of e.g topsellers, offers, normal, you can use multiple search results, e.g.
Code:
(% searchresult tags=topsellers HEADER='' NOT_FOUND='' %)
(% searchresult tags=offers HEADER='' NOT_FOUND='' %)
(% searchresult tags=normal HEADER='' NOT_FOUND='' %)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
hmm... but then i would have to make seperate Specialpages for each product am I wrong?
Thanks for your help
Reply
m1k3y Wrote:hmm... but then i would have to make seperate Specialpages for each product am I wrong?
Thanks for your help

You'd have one special page type product, which - among others - has a dropdown field category with the values topsellers, offers and normal, which is configured to be indexed as tags.
It might also have a dropdown field type with e.g. hardware, software (depending on your products, also indexed as tags)

You'd have one special page (of this type) per product.

You'd have one normal page, which contains the list of products as described above:
Code:
All our products:
(% searchresult tags=_special_product,topsellers HEADER='Top Sellers' NOT_FOUND='' %)
(% searchresult tags=_special_product,offers HEADER='Special Offers' NOT_FOUND='' %)
(% searchresult tags=_special_product,normal HEADER='Other Products' NOT_FOUND='' %)

You could also have additional normal pages for your product types like for your software products:
Code:
All our Software:
(% searchresult tags=_special_product,software,topsellers HEADER='Top Sellers' NOT_FOUND='' %)
(% searchresult tags=_special_product,software,offers HEADER='Special Offers' NOT_FOUND='' %)
(% searchresult tags=_special_product,software,normal HEADER='Other Products' NOT_FOUND='' %)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Unfortunately that doesnt work for me ,as I use Jquery Masonry, so the two <ul>s with the class "search results" break my layout and the elements don't get positioned the way i want it....

I recognized, that by default the last saved elements are at the top, and i wondered if i could rewrite this that certain categories are at the top and others not
Reply




Users browsing this thread: 11 Guest(s)