Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search plugin (I18N)
Your site feeds are working for me now.
mvlcek Wrote:If you use the I18N plugin and get the RSS feed with an RSS client ...
More accurately, if your site visitors want to use a feed reader – it's an essential update.
--
Nick.
Reply
hameau Wrote:More accurately, if your site visitors want to use a feed reader – it's an essential update.

You are of course right, i edited my previous post...
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek,

an option for the search form which sets the value for the input field would be nice.

Code:
<input type="text" name="words" value="Suchbegriff eingeben"/>

Additionally, an id attribute ("search", "searchform" or similar?) for the form itself would be practical, easier to target with CSS.

Checked the docs in my site's plugin section and the output markup.
Reply
polyfragmented Wrote:an option for the search form which sets the value for the input field would be nice.

Code:
<input type="text" name="words" value="Suchbegriff eingeben"/>

Then the user would have to delete the text first - or you need to add Javascript to delete it, when the input gets the focus?

polyfragmented Wrote:Additionally, an id attribute ("search", "searchform" or similar?) for the form itself would be practical, easier to target with CSS.

The form is in a div with class search - easy to target. I won't use an id because you could have more then one search form on the page, e.g. one on the search page and one in the template for quick search.

Anyway, the form was more like an afterthought, because (without tag cloud) it's too simple.
You can easily create a search form component and include it with the DynPages plugin.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:The form is in a div with class search - easy to target. I won't use an id because you could have more then one search form on the page, e.g. one on the search page and one in the template for quick search.
Anyway, the form was more like an afterthought, because (without tag cloud) it's too simple.
You can easily create a search form component and include it with the DynPages plugin.

Taken from the final markup (plugin version 1.2.1), that's why I asked for a CSS hook:

Code:
<form action="http://www.get-simple.de/suche/" method="POST">
  <input type="text" name="words" value=""/>
  <input type="submit" name="search" value="Suche starten" />
</form>

You're right about rolling your own search form which is what I'll start doing. Easy to add classes/ids or a wrapper.

As for the input field value, you're right about using Javascript, just thought it might be a nice addition for out-of-the-box usage. Totally personal opinion of course. I can add this myself no problem.
Reply
polyfragmented Wrote:[Taken from the final markup (plugin version 1.2.1), that's why I asked for a CSS hook:

Code:
<form action="http://www.get-simple.de/suche/" method="POST">
  <input type="text" name="words" value=""/>
  <input type="submit" name="search" value="Suche starten" />
</form>

You are right, there is no div - what I saw on my site was the div with the slug of the page as class name.
I will add a class "search" to the form.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I18N Search version 1.2.2 adds a class "search" to the search form.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Ok, this is probably basic but I'm certainly missing something here. I post:

(% searchform %)
(% searchresults %)

this into my page and in the view I don't get results back. What am I doing wrong?
Reply
When you say 'the view', do you mean when you click the button to preview the page? Because you'll only get the results if you actually search something using the form or place preset tags to search for within your (% searchresults %) parameters.
Reply
how to place the RSS in the sidebar?
Code:
(% searchrss name:news title:"Новости" lang:ru tags:news numWords:30 %)
Reply
Oleg06 Wrote:how to place the RSS in the sidebar?
Code:
(% searchrss name:news title:"Новости" lang:ru tags:news numWords:30 %)

You MUST place above RSS placeholder on a page (although this page need not be in the menu).
Then you can copy the link (it's the link to the page + the name) to your template or sidebar, e.g. (assuming the page's slug is rss):
Code:
<a href="/rss/?news"><img src="/plugins/i18n_search/images/rss.gif" alt="rss"/>Новости</a>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Angryboy Wrote:When you say 'the view', do you mean when you click the button to preview the page? Because you'll only get the results if you actually search something using the form or place preset tags to search for within your (% searchresults %) parameters.

Thanks everyone that replied. I believe i'm making some progress with the notion that you need to call to the tag. All has been extremely helpful.
Reply
I guess next step is how to define search results with the rss feed. I'll root around in the documentation as there has to be something on that. I'm trying to create a feed of latest article postings on my website.
Reply
There are two main ways you could approach this. Firstly, you can make a meta tag of the pages for your articles called 'articles', then post this as your RSS feed:

Code:
(% searchrss name:rss title:"RSS Feed" tags:articles numWords:30 %)

A second way accomodates more feed related items. So you can still give your article the tag 'articles', but instead ensure that the tag 'rss' is included. Then use this instead:

Code:
(% searchrss name:rss title:"RSS Feed" tags:rss numWords:30 %)

This way gives you slightly more control/flexibility over what goes into the feed. It isn't restricted solely to articles, and you can add any page you want to the feed so long as it has the 'rss' tag.
Reply
Anyway, that a custom field can be created and then have the rss search go to that table instead. I'm ok with adding it to the regular keyword field as it works, but would rather not have to include rss or article in the valuable meta tag area for seo purposes.

but appreciate the help..this is a great feature.
Reply
Got two things:

Pages set to 'private' are shown on results pages here. The page in question is http://www.get-simple.de/index/gs-weiter...nde-links/ which is positively set to private.

---

Despite having site, i18n and user language set to "de" (just checked), search results links got ?lang=de appended.

Code:
http://www.get-simple.de/index/gs-weiterfuehrende-links/?lang=de

I see that it's like this on your own site as well, but we don't actually compose multi-lingual pages. Can the appendage be removed somehow?
Reply
polyfragmented Wrote:Pages set to 'private' are shown on results pages here. The page in question is http://www.get-simple.de/index/gs-weiter...nde-links/ which is positively set to private.

I'll fix this.

polyfragmented Wrote:Despite having site, i18n and user language set to "de" (just checked), search results links got ?lang=de appended.

This is only done if you use the I18N plugin - of course you probably use it because of the navigation functionality ;-)

You can try to delete i18n_base.php (or rename to i18n_base.php.bak) and make sure you do not use get_i18n_component and get_i18n_content. Everything should still work (with the exception of the I18N pages view in the administration) and you should get links without lang parameter.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:This is only done if you use the I18N plugin - of course you probably use it because of the navigation functionality ;-)
Indeed ;-) I wonder if you're planning on detaching navigation from I18N some day? Installing a multi-lingual plugin in order to get a hierarchical navigation... ;-)

mvlcek Wrote:You can try to delete i18n_base.php (or rename to i18n_base.php.bak)...
Works as described by you, thanks.
Reply
I'm in a dliemma now after applying the workaround:

since your page list kicks so much ass, I'm already missing it Big Grin

Any chance there will be another way to remove the ?lang= appendage sometime in the future?
Reply
polyfragmented Wrote:I'm in a dliemma now after applying the workaround:

since your page list kicks so much ass, I'm already missing it Big Grin

Any chance there will be another way to remove the ?lang= appendage sometime in the future?

You can patch i18n_search/searchresults.php: replace the 3rd line with
Code:
$is_i18n = false;
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:You can patch i18n_search/searchresults.php: replace the 3rd line with
Code:
$is_i18n = false;
Works, thanks.
Reply
How can I fetch entered search terms so I can display them with the results?
Example: You searched for the term(s) 'administration'

How can I programmatically include the text? Our search page is a (deliberately) visible page which can be found in the sitemap and search. If the user arrives on the page from the search form, I'd like to include above text. Oh, btw, the search form sits in the sidebar on each and every page ;-
Reply
polyfragmented Wrote:How can I fetch entered search terms so I can display them with the results?

Example: You searched for the term(s) 'administration'

And how can I programmatically include the text? Our search page is a (deliberately) visible page which can be found in the sitemap and search. If the user arrives on the page from the search form, I'd like to include above text.

Code:
<?php if (@$_REQUEST['words']) { ?>
You searched for the term(s) '<?php echo htmlspecialchars($_REQUEST['words']); ?>'
<?php } ?>

If you need in in the content of a page, you can use the DynPages plugin to include this code in a component.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Our posts (my edits) overlapped some, so I'm posting the search URL question here separately.

Is there a direct URL for the search in which I can include search terms?
I am looking into creating a Firefox Search Plugin for the German GS site. Those need an URL of the site which calls the search with appended search terms, e.g. www.domain.tld/search/?s=[searchterms]
Reply
polyfragmented Wrote:Our posts (my edits) overlapped some, so I'm posting the search URL question here separately.

Is there a direct URL for the search in which I can include search terms?
I am looking into creating a Firefox Search Plugin for the German GS site. Those need an URL of the site which calls the search with appended search terms, e.g. www.domain.tld/search/?s=[searchterms]

As you can see by looking at the search form, it is: http://my.site/search-result-page?words=searchtems
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 2 Guest(s)
Free HDTV Channels Residential Solar Panels