GetSimple Support Forum

Full Version: I18N Search for News Manager Posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I18N Search plugin for News Manager posts

Features
  • Indexes News Manager posts like I18N Search indexes pages.
  • Automatic detection of changes in News Manager (add/edit/delete/options) so index is always fresh.
  • Configurable language of posts for News Manager stable version.

Requirements
This plugin depends on I18N Search and News Manager (updated)

Installation
Download and unpack the .zip file containing the plugin.
Copy i18n_search_news.php file to the plugins folder of your installation.
Turn on in Admin/Plugins tab, optionaly configure language in Admin/Plugins/News Manager Search Settings

Download
Download below and support in this thread.

http://get-simple.info/extend/plugin/i18...posts/776/
Thank you very much for this useful plugin.
I was wondering if the plugin can renders all the NM fields, i.e. includes image and "readmore" fields.
By the way, I have also some problems in showing the date fields. Indeed, the I18N search generates the "search-entry-date" div, but nothing is inside it.
Thanks!
(2014-03-12, 23:17:42)GPB61 Wrote: [ -> ]Thank you very much for this useful plugin.
I was wondering if the plugin can renders all the NM fields, i.e. includes image and "readmore" fields.
By the way, I have also some problems in showing the date fields. Indeed, the I18N search generates the "search-entry-date" div, but nothing is inside it.
Thanks!

Hi
This plugin was written initially for News Manager stable version.
Now i'm working on update to use all features of News Manager last beta.
Hm, by default rendering of search results is done by I18N Search itself (like standard page) and on my site this works great: http://sebastianbatko.com/szukaj/?words=...rch=Szukaj
so I can't reproduce.
Can You provide more info about this issue ? (versions of plugins and eventually url of Your project ?

Btw, new version (beta) for News Manager (beta) will be released soon.

Greets,
Sebastian
Hi Sebastian,

thanks for replying.
Indeed, you answered both questions. The date issue was related to a misconfiguration (my fault) of the I18N search, while the other problems are related to the fact that I am actually using the beta17 of NM and therefore you still don't have those fields. Will be waiting for the next release.
Thanks so much
GP
To make this plugin work also with non-fancy post URLs and some setups, change:
Code:
case 'link': return get_site_url(false).$NMPAGEURL.'/post/'.substr($this->id,4);
by:
Code:
case 'link': return htmlspecialchars_decode(nm_get_url('post')).substr($this->id,4);

[Edited 2015-03-06]
With News Manager 3.0 Beta20 I only get the Date, when the article was publishd, not the article itself nor a link to that article.
@Yoshi
I haven't tested this plugin much, but works for me with a simple setup, a page 'search' with this in the body:
Code:
(% searchform %)
(% searchresults %)
I get page/post titles with their links and an excerpt (No date)
Strange... Now it works as expected. Had the same code on my site. Deleted it, re-entered it, works... So forget about my issue.
hi there,

the plugin is awesome for news item search but I get &-sign displayed as & in the search results and in the little example text under it. Any chance of a quick fix on this?

example:
[Image: ZvLaF16.png]
(2015-02-28, 09:35:10)dikkewalter Wrote: [ -> ]the plugin is awesome for news item search but I get &-sign displayed as & in the search results and in the little example text under it. Any chance of a quick fix on this?

Not sure if it's the proper solution, but it seems to work:

Edit i18n_search_news.php,

1. find this:
Code:
case 'title': return $this->data['title'];
and change it to:
Code:
case 'title': return strip_decode($this->data['title']);

2. find this:
Code:
case 'content': return '<p>' . htmlspecialchars($this->data['description']) . '</p>';
and change it to:
Code:
case 'content': return '<p>' . $this->data['description'] . '</p>';
thanks Carlos,

It works beautifully. I hope this fix gets implemented with future updates of the plugin.
I've edited this post. The patch didn't work properly if you also had GS fancy URLs disabled (or custom permalink ?id=%slug%)
I just installed GS and have been configuring it all day/night  Big Grin

For some reason, the after enabling the I18N search for news plugin, my search results aren't clickable.  The search results return good results, just not clickable links.

Plus, all of the results have a bullet next to them, which I'd prefer to remove.

Any help, would be awesome!

Dennis
Do you mean that titles have no link, or that links don't work?
(2015-04-29, 03:34:48)Carlos Wrote: [ -> ]Do you mean that titles have no link, or that links don't work?

Sorry.

The links don't appear.  The Titles of the blog posts show up, but aren't clickable
Are you using I18N Search custom rendering with a component?
(2015-04-29, 04:16:19)Carlos Wrote: [ -> ]Are you using I18N Search custom rendering with a component?

Yes, the component 'search' is getting called in the template file using the following:
<?php get_component('search'); ?>


The code in the component is 
<?php get_i18n_search_form (array('slug'=>'search', 'numWords'=>'0', 'showTags'=>0, 'GO'=>'OK', 'PLACEHOLDER'=>'Search')); ?>
It seems that, by default, this plugin has issues if don't have the I18N (base) plugin installed.

To fix this, go to Admin > Plugins > News Manager Search Settings
and remove the value (pl) in Language code for I18N Search Index (leave it empty).
Carlos,

Thank you! That did the trick. I don't have the base plugin AFAIK...

I appreciate the persistent assistance Smile

Dennis
Hi there and thanks for the great plugin. Plugin works fine until I search for posts and the results are shown. The links are not working. For some reason links has extra "/index/" in address.

For example post address is
www.domain.com/testsite/post/post-number-1
Search finds this post but the address is
www.domain.com/testsite/index/post/postnumber-1

Cannot find anything to fix this in setting..
thanks for help Smile
Try doing the patch in post #5 in this thread.
Oh yes. Works like a charm Smile thanks!
Hi there,

I have been using this plugin in for a while but I have now encountered an issue after changing the URL structure. To display language in the URL, a language code is appended at the end, followed by the name of the post such as

www.domain.com/en/news/post/post-name

However when I run search results, the language code is not added to the URL. It display as
www.domain.com/news/post/post-name.

Would be very grateful if a fix could be suggested for this.
Hi

I've just installed this on a basic GS site and it works very well but... when I click on one of the news stories retrieved by 'search' I get an error..

A 500 error has occured

500 errors are generally caused by one of the following two problems.

1) A bad entry in the site .htaccess file, if you are the webmaster try logging into your cPanel, and use the file manager to rename your .htaccess file if this fixes the error you should then check the contents of the .htaccess file / roll back any recent changes.

2) A php error / code error also causes a 500 error, you can try enabling 'PHP display_errors' by following this guide Enable Display errors

If after trying both of the above solutions and you are still seeing the 500 error please do contact support

OOI, I18N search - using the same search form - works fine on the rest of the site. Any suggestions as to what I'm missing?

TiA

David
OK, I now can see the problem but don't understand how to fix it...

If I search for a string which is in a news item, the returned url looks like this:

https://www.imcuk.net/news/post/shadowexplorer ... which then returns an error.

But if I scroll through the news to find that item the url looks like this:


https://www.imcuk.net/index.php?id=news&...owexplorer ... which works fine.

'Normal' search works fine for general pages, it is just the news search plugin searching news that fails.

All help much appreciated!

Thanks!
Pages: 1 2