Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search plugin (I18N)
#26
all, it dawned on me, put the code in the component of news and then pasted to the page news
http://neowebtime.ru/01/news-i18n
Reply
#27
Oops! Page not found!

Hello,
I am trying to work this out, but no success after many tryouts. I can get news/search res displayed correctly but when links to acctual pages clicked I get this Oops call. Pages ids seem to be stripped of ?lang=cs property (when deleted manualy in the browser bar, page displays). What am I missing? Thanks up front. kuba

link to site
http://sanitrak.cz/getsimpleinternational/

GetSimple Version 2.03
I18N Search 0.9
I18N 0.9.1 (default lang set to "cs" in i18n.php)
DynPages 0.6
Reply
#28
kuba.sanitrak Wrote:Oops! Page not found!
...
http://sanitrak.cz/getsimpleinternational/

The reason is that the lang parameter is added with a '?' instead of a '&' as separator - with fancy URLs without '?id=...' it works.

I corrected the problem and uploaded the i18n search plugin, version 0.9.1 (Extend still shows version 0.9, but the download file is 0.9.1).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#29
mvlcek Wrote:
kuba.sanitrak Wrote:Oops! Page not found!
...
http://sanitrak.cz/getsimpleinternational/

The reason is that the lang parameter is added with a '?' instead of a '&' as separator - with fancy URLs without '?id=...' it works.

I corrected the problem and uploaded the i18n search plugin, version 0.9.1 (Extend still shows version 0.9, but the download file is 0.9.1).

Works, perfect. Thank you so much. Diky
Reply
#30
why pictures are not showing?
http://neowebtime.ru/01/news-i18n
http://neowebtime.ru/01/news-i18n/news-20110101?lang=ru
Reply
#31
Oleg06 Wrote:why pictures are not showing?

The search plugin only show the n first words (pure text), where n is the 5th parameter to get_i18n_search_results. Alternatively you can set it to 0 (only title is shown) or -1 (full news text is shown):

Code:
get_i18n_search_results('news', null, null, 3, -1);
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#32
Thank you, mvlcek, for your excellent plugins! They are easy to use and have such broad functionality, all the while blending in seamlessly with Get Simple. *thumbs resolutely pointed upwards*

One question though: how do I make the News derivation of the Search function have a set number of results per page like Oleg06? I have got my site like that, but the paginated pages have an unfriendly url on the end of them, unlike Oleg's which manages to stay clean.

Code
Code:
<?php
    get_i18n_search_results('news', null, null, 7, 30);  
?>

http://spritingonawhim.tk/

Any advice?

Thanks again, and keep up the amazing work!
Reply
#33
Is your search function able to sort the data by page name/slug? I was thinking this may be an easier thing for ensuring an order when articles are retrospectively edited (ie having year-month-date in decending order at the beginning), because then you need to re-save them in the corresponding order to get the original order back.
Reply
#34
Angryboy Wrote:Is your search function able to sort the data by page name/slug?

No, it isn't. Because the focus is on displaying the most important (word in title or often in text) pages first.

And I have not yet had time for combining all ideas for a perfect news plugin ;-)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#35
Well, I shall wait on the horizon like an eager and excited child for when the ultimate mvlcek news plugin arrives Big Grin
Reply
#36
I18N Search version 1.0 (http://get-simple.info/extend/plugin/i18n-search/82/) is finally available.

It features a configuration page and is much easier to use. Just add the following text to your search page:

Code:
(% searchform %)
(% searchresults %)

For more information see the configuration page (Plugins/Configure I18N Search).

For an example see http://mvlcek.bplaced.net/search.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#37
Just installed 1.0 on GS 3.0b r408. Got the following notice (right above the search form) after loading the page where I put the two required placeholders:

Quote:Notice: Undefined offset: 3 in /www/htdocs/foo/plugins/i18n_search.php on line 198

Search itself works fine, I don't understand the notice though. What's it mean?
Reply
#38
New version 1.0.2 uploaded: Fixes some notices/warnings in debug mode, corrected some texts on configuration view (but still not fully translated to german).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#39
Thanks!
Reply
#40
Hi!
Just installed plugin, as it is discribed in manual, but it doesn't work. I've placed search form on page, and when search button is pressed, instead of search results it shows me main page, and in browser's address bar i see ....index.php?words=KEYWORD&search=Search
If I manually write URL in browser's address bar like ...index.php?id=search&words=KEYWORD&search=Search - then it shows results.
May be i missed something?
Reply
#41
lnx Wrote:Hi!
Just installed plugin, as it is discribed in manual, but it doesn't work. I've placed search form on page, and when search button is pressed, instead of search results it shows me main page, and in browser's address bar i see ....index.php?words=KEYWORD&search=Search
If I manually write URL in browser's address bar like ...index.php?id=search&words=KEYWORD&search=Search - then it shows results.
May be i missed something?

Might be a problem with not having fancy urls. Please try embedding the search form with
Code:
(% searchform slug:search %)

If this doesn't work: what's the URL generated for the action of the search form. (<form action="...">)
Are you using GetSimple 2.03 or 3.0b?
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#42
Yes, at current time i'm not using fancy urls, and thought that it can be issue, but in post #28 you mentioned, that fancy-url problem is solved.
Quote:Are you using GetSimple 2.03 or 3.0b?
Sorry, forgot to mention. I'm using 2.03.
(% searchform slugConfusedearch %) gives same result - after pressing serch button, it drops me to a "start page" of site and in a browser's address bar i see index.php?words=my-entered-keyword&search=Search
Quote:If this doesn't work: what's the URL generated for the action of the search form. (<form action="...">)
I have no separate action, search form is displayed by using code <?php get_i18n_search_form(array('slug'=>'search','showTags'=>0)); ?> in template.php
When looking page source with serch form, action is <form action="<my-site>/index.php?id=search">
Reply
#43
lnx Wrote:(% searchform slugConfusedearch %) gives same result - after pressing serch button, it drops me to a "start page" of site and in a browser's address bar i see index.php?words=my-entered-keyword&search=Search
I have no separate action, search form is displayed by using code <?php get_i18n_search_form(array('slug'=>'search','showTags'=>0)); ?> in template.php

So you have a search form in the template (header or somewhere else) and on the result page you have again a search form and the search results?

I'll try to reproduce it.

For now just replace the <?php get_i18n_search_form(array('slug'=>'search','showTags'=>0)); ?> and the (% searchform %) with the HTML form itself, as the action of the generated form seems to be wrong:

Code:
<form action="index.php?id=search">
    <input type="text" name="words"/>
    <input type="submit" name="search" value="Search"/>
  </form>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#44
Quote:So you have a search form in the template (header or somewhere else)
in sidebar
Quote: and on the result page you have again a search form and the search results?
exactly.

Tried to place your suggested html code in template - completely same result, as it was before.

Tried to turn on fancy urls and web-server's rewrite engine, now instead of search results it gives me 404.
All other pages are displayed normally.
My lighttpd rewrite directive:
Code:
url.rewrite-once = ( "^/gs/?([A-Za-z0-9-]+)/?$" => "/gs/index.php?id=$1" )
Reply
#45
lnx Wrote:Tried to place your suggested html code in template - completely same result, as it was before.

This form produces the same URL as the one you said works. The only difference is GET/POST - add a method="GET" attribute to the form tag and it is exactly the same.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#46
Quote:This form produces the same URL as the one you said works. The only difference is GET/POST - add a method="GET" attribute to the form tag and it is exactly the same.
wow! it works with method="post"

Now on search page i have two forms, one on page itself above search results (with default "GET") and another in sidebar with "POST".
form with POST - works, but form without method defined (assuming default is GET) - not works.
I'm little bit perplexed. Were to look?
Reply
#47
lnx Wrote:Now on search page i have two forms, one on page itself above search results (with default "GET") and another in sidebar with "POST".
form with POST - works, but form without method defined (assuming default is GET) - not works.
I'm little bit perplexed. Were to look?

It's a problem in the plugin - I'll correct it or at least document, which method to use.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#48
mvlcek Wrote:It's a problem in the plugin - I'll correct it or at least document, which method to use.

It's fixed in I18N Search 1.0.3, the (% searchform %) now uses POST.
(form action parameters - here the id for the page - are lost on a GET request)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#49
plugin from the Dominion stores data in a folder plugins/dominion-blog/blogs/, not in a folder data/pages, so search plugins are not looking for text.
if you just want to post news on your site, then use the same plugin Search plugin (I18N)
Reply
#50
News in version 3.0 does not work
http://neowebtime.ru/1/news
http://neowebtime.ru/1/news/news-20110101-1544
previous version of your plugin works
Reply




Users browsing this thread: 11 Guest(s)