2011-01-21, 07:21:32 (This post was last modified: 2013-04-22, 02:09:27 by mvlcek.)
My I18N Search plugin (http://get-simple.info/extend/plugin/i18n-search/82/) allows you to search for tags (keywords) and words. It uses an automatically created index and orders the results by relevancy (number of occurences, title is more important than content, etc.).
Each result entry includes the title, the language (if used together with the I18N plugin), the date and an excerpt of the page. It can be styled with CSS or the results can be retrieved as array, in which case you are responsible for creating the HTML.
The plugin is fully configurable and optimized to work on multi-language sites together with the I18N plugin (http://get-simple.info/extend/plugin/i18n/69/), but will also work standalone.
Version 2.0+ supports indexing of custom fields (see I18N Custom Fields) and of other non-page data (plugin developers: see attached example plugin - i18n_search_dummy.zip).
2011-01-23, 03:47:19 (This post was last modified: 2011-03-20, 05:00:40 by nime.)
Update: INVALID as of version 1.0
The I18N Search plugin now provides functions to display all tags in a size proportional to their frequency. For a enhanced search where the user can select tags, include the following in your template or (with the DynPages plugin) a component:
It seems, it only finds words with ASCII characters, not even german äöü.
I'll look into it.
Regarding searching for tags: "_pagify 2000" is one tag, but searching for tags with blanks is not supported. A newer version of search will ignore all tags with _ in the beginning.
get_i18n_search_results($tags=null, $words=null,
$notfoundtext='No results found!', $dateformat='l, F jS, Y - g:i A',
$max=10, $excerptlength=30)
That's the function definition. To call it you should use something like get_i18n_search_results(null, null, 'No results found!', 'l, F jS, Y - g:i A', 10, 30) into your component or your template (within <?php ... ?> tags).
Hi, I search plugin works and look for results, but does not seek texts on the Dominion blog (plugin). I make mistakes or not it is connected? Thank you.
astherix Wrote:Hi, I search plugin works and look for results, but does not seek texts on the Dominion blog (plugin).
The search plugin indexes all pages of the installation, but the Dominion blog does not store the news as pages but in a separate file.
In my opinion every piece of content on a CMS should be stored in the same way, only differing by the metadata. For example the news on my site http://mvlcek.bplaced.net are normal pages with a slug/URL with date and time like news-20110114-1235 and as parent the page news. Additionally they get the tag/keyword _news.
On the news page I just use a search for all content with tag _news. It's automatically sorted with the newest news first.
I plan on updating the I18N plugin so that you can configure it to exclude certain pages and their children (to exclude the news) and creating a plugin which will simplify news entry:
admin: list the news ordered by date, grouping them by year and month, if their are too many.
admin: create a news item and automatically set the tag, slug and parent
provide a news list where the first paragraph and possibly the first picture of the news item is displayed
<?php get_i18n_search_results('news', null, 'No news found', 'l, F jS, Y - g:i A', 15, -1); ?>
plugin I downloaded yesterday
:-)
send me the complete code, which I will put on the news page, to display the calendar in the format dd / mm / year, to be displayed on the page 3 news and a pagination
The search in your side bar works. The page that doesn't work, seems to be the news page/component/template (.../news-i18n), where you also call the search function - still with the old syntax?
2011-02-06, 01:25:39 (This post was last modified: 2011-02-06, 01:28:32 by jhondavis.)
in the sidebar I have a different plugin of news
:-)
send me the complete code, which I will put on the news page, to display the calendar in the format dd / mm / year, to be displayed on the page 3 news and a pagination
Oleg06 Wrote:send me the complete code, which I will put on the news page, to display the calendar in the format dd / mm / year, to be displayed on the page 3 news and a pagination
assuming your tag for news is 'news' and you want to see the complete news content (last parameter -1), with date and time (without time use just 'd/m/Y', other formats see http://php.net/manual/de/function.date.php):