Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search plugin (I18N)
#51
Can I add a folder "data/articles"to search for
Reply
#52
Oleg06 Wrote:Can I add a folder "data/articles"to search for

No, the Search plugin only searches the pages.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#53
and why news stopped working?
Reply
#54
Oleg06 Wrote:and why news stopped working?

Did you change the call (in the component) after the upgrade to I18N Search 1.0?
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#55
I put in the components
Code:
<?php get_i18n_search_results('news', null, 'No news found', 'l, F jS, Y - g:i A', 15, -1); ?>
and on page
Code:
<?php get_component('news'); ?>
before so it worked
http://neowebtime.ru/1/news
http://neowebtime.ru/1/news/news-20110101-1544
previous plugin works
http://neowebtime.ru/2/news/
Reply
#56
Oleg06 Wrote:I put in the components
Code:
<?php get_i18n_search_results('news', null, 'No news found', 'l, F jS, Y - g:i A', 15, -1); ?>
and on page
Code:
<?php get_component('news'); ?>

The call syntax changed (and there was a small bug - please download version 1.1), just put the following text in your page (the component isn't needed anymore):

Code:
(% searchresults tags:news max:15 numWords:-1 %)

You can find more information on the Plugins/Search configuration page in the admin back-end.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#57
Angryboy Wrote: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.

The new version 1.1 of the Search plugin features:
  • Sort results by Score, URL, publishing date or creation date (see below)
  • Russian translation (by lnx - thanks)

ad creation date: the creation date attribute (creDate) must be stored in the page file, otherwise the publishing date is used. The I18N CustomFields plugin automatically stores the creation date for new pages (and those updated for the first time).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#58
Thanks, it works
but as a sidebar to place?
Reply
#59
Oleg06 Wrote:Thanks, it works
but as a sidebar to place?

Code:
<?php get_i18n_search_results(array('tags'=>'news','max'=>15,'numWords'=>-1)); ?>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#60
Well 'eff me running. I didn't think you'd get to making those adjustments and then some in this space of time. This is the most complete Search plugin for GS to date, and (when combined with the CustomFields plugin) provides everything necessary for a core news plugin! You've done it again, mvclek.

If you aren't working on a standalone news plugin, this is quality stuff for someone confident with utilising GS, and they can get exactly what they want out of it. However, because it is a little "piece-meal" in this respect (and in all honesty it needs to be in order to have the utility it does), it may scare away some newcomers just wanting a quick way to blog/display news. If you could, it'd be nice to take the essential elements from this and the CustomFields plugin and tailor them into one easily approachable package for producing articles, because that result and roog's News Manager would give GS two solid and easily approachable news systems.
Reply
#61
Thanks Smile on page news in the sidebar appeared lines
Code:
Fatal error: Cannot redeclare i18n_compare_search_results_score() (previously declared in /home/cp068800/public_html/neowebtime.ru/1/plugins/i18n_search/search.php:2) in /home/cp068800/public_html/neowebtime.ru/1/plugins/i18n_search/search.php on line 9
http://neowebtime.ru/1/news

For some reason the search does not search for words with a hyphen (polling-booth, сайт-визитка)
Reply
#62
Oleg06 Wrote:Thanks Smile on page news in the sidebar appeared lines
Code:
Fatal error: Cannot redeclare i18n_compare_search_results_score() (previously declared in /home/cp068800/public_html/neowebtime.ru/1/plugins/i18n_search/search.php:2) in /home/cp068800/public_html/neowebtime.ru/1/plugins/i18n_search/search.php on line 9

This happens if two search results are visible at the same time - I will correct it. Thanks for testing.

Oleg06 Wrote:For some reason the search does not search for words with a hyphen (polling-booth, сайт-визитка)

No it doesn't because it splits the text into words on character boundaries - polling and booth are treated as separate words. You need to search for "polling booth" but it will find any page that has "booth" and "polling" on it.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#63
Oleg06 Wrote:Thanks Smile on page news in the sidebar appeared lines
Code:
Fatal error: Cannot redeclare i18n_compare_search_results_score() (previously declared in /home/cp068800/public_html/neowebtime.ru/1/plugins/i18n_search/search.php:2) in /home/cp068800/public_html/neowebtime.ru/1/plugins/i18n_search/search.php on line 9

Fixed in version 1.1.1.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#64
oh yeah, thanks again Smile
but is it possible to add the ability to create news for the other tag, such as tags:blog
Code:
(% searchresults tags:blog max:2 numWords:30 %)
to be able to create categories for news
Reply
#65
Just give a page the tag 'blog' (or literally anything else) instead of 'news' and that does it. Smile
Reply
#66
http://neowebtime.ru/1/blog
I've tested it, does not work
on page
Code:
(% searchresults tags:blog max:2 numWords:30 %)
http://neowebtime.ru/1/blog/blog-1
on tags 'blog'
although in the sidebar it works
Code:
<?php get_i18n_search_results(array('tags'=>'blog','max'=>1,'numWords'=>30)); ?>
Reply
#67
Really? On this page I have the following code:

Code:
(% searchresults tags:news max:5 showLanguage:0 showDate:0 order:reverseurl HEADER:News %)

And on this test page I have the following code:

Code:
(% searchresults tags:podcasts max:5 showLanguage:0 showDate:0 order:reverseurl HEADER:News %)

And both seem to display just fine, assuming that the tags are correctly spelt on both the pages and within the codes.
Reply
#68
Thanks, it works Smile
I put the following code in the sidebar
Code:
<?php get_i18n_search_results(array('tags'=>'podcasts','max'=>1,'numWords'=>30,'HEADER'=>Новости)); ?>
<?php get_i18n_search_results(array('tags'=>'news','max'=>1,'numWords'=>30,'HEADER'=>Блог)); ?>
and there were these lines
Code:
Notice: Use of undefined constant Блог - assumed 'Блог' in /home/cp068800/public_html/neowebtime.ru/1/admin/inc/theme_functions.php(583) : eval()'d code on line 20
Reply
#69
I'm trying to get the script to work but I can't...

Where should I put the

(% searchform %)
(% searchresults %)

because look at what it's giving me

http://www.oxyda.net/index.php?id=search

I must do something wrong or i'm just too tired to see it lol


PS. My website is in french I don't know if it has something to do.
Reply
#70
try to install the plugin http://get-simple.info/extend/plugin/dynpages/81/
Reply
#71
djburnout Wrote:I'm trying to get the script to work but I can't...

Where should I put the

(% searchform %)
(% searchresults %)

because look at what it's giving me

http://www.oxyda.net/index.php?id=search

I must do something wrong or i'm just too tired to see it lol


PS. My website is in french I don't know if it has something to do.

The only way to get this result with an active I18N Search plugin is, if you have entered entities, e.g.

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

or something similar in the source code view of the page editor. Goto the page, make sure (% and %) are displayed in the text and source code view and save again.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#72
the source code is :

<p>
(% searchform %)<br />
(% searchresults %)</p>

And i'm gonna try the plugin dynpages



Same problem with the plugin, if it can help here's my list of plugin :

dynpages
hitcount
i18n_search
exec-php
Reply
#73
dah nvm I can't get it to work so I just removed it.
Reply
#74
mvlcek,

I'm using 1.1.1 and testing the "news blog" usage. In the generated results list of available pages, the page's URL has

Code:
?lang=en

appended (there's only one news article yet). Please note that there's a space before ?lang=en. Clicking that URL generates a 404. No other URLs in my site has any lang suffix as far as I can tell.

I previously had the default language of my user set to en which I edited to be de now. I read through the help pages for the plugin and found the following sentence which I don't quite get:

Quote:To switch the language for the current session, add links like http://my.site/?setlang=de (German) to your template or home page.

I added such a link to the homepage (edited to match my domain) and clicked it, hopefully removing the English lang setting. It didn't work. I noticed that the search form for regular searches is displayed in English as well.

Any idea? If you need more info, I'll gladly provide it.
Reply
#75
polyfragmented Wrote:mvlcek,

I'm using 1.1.1 and testing the "news blog" usage. In the generated results list of available pages, the page's URL has

Code:
?lang=en

appended (there's only one news article yet). Please note that there's a space before ?lang=en. Clicking that URL generates a 404. No other URLs in my site has any lang suffix as far as I can tell.

The blank should not happen - and looking at the source code, it can't happen ;-)
Can you give me a link to your site?

polyfragmented Wrote:I previously had the default language of my user set to en which I edited to be de now.

I suppose that means changing it in the admin I18N pages view and then saving?

polyfragmented Wrote:I read through the help pages for the plugin and found the following sentence which I don't quite get:

Quote:To switch the language for the current session, add links like http://my.site/?setlang=de (German) to your template or home page.

This has nothing to do with the default language.
  • the default language is the language that all pages without language suffix have. It can be set on the I18N pages view (e.g. you have pages "index" and "index_de" and default language "en", then the language of "index" is supposed to be "en")
  • the site visitor has a preference of languages he has set in the browser (e.g. "fr_FR", "de_DE"). Initially the site is then presented to him in the best matching language (in this case "de" - "index_de").
  • by clicking on a link with ?setlang=en the visitor can set his preferred language for this visit to "en" and will thus see the page "index" (en).
  • by using a ?lang=de link the corresponding page will be displayed in this language regardless of the settings of the visitor.

polyfragmented Wrote:I added such a link to the homepage (edited to match my domain) and clicked it, hopefully removing the English lang setting. It didn't work. I noticed that the search form for regular searches is displayed in English as well.

Regarding the link see above.

If you have the pages "index" (in German) and "index_en" and you have set your default language do "en" the plugin will assume that the pages without suffix are Englisch.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 4 Guest(s)