How to make a content item used as 404 page, or any other item, to be unsearchable

More
8 years 10 months ago - 8 years 10 months ago #54737 by ggppdk
Hello

please read my above answer

also you can go to items manager and

select 1 item, that has falang translations
then click translate, select target language
and select to create the new translation of the item by importing Falang data
- a new item will be created and associated with the item

then re-index, and also go to falang and disable the translation that you imported
everything should work with the new item

see if that is better choice for you,
- if you do not have frontend editors, then i strongly recommend that you do not use falang for translating items


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 10 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #54760 by pipedream
Thanks, I do use frontend editors and have written a manual to the client, since it is so easy to translate existent content or to create a new item in both languages. By not using Falang, is it impossible to have frontend editors? By the way, I couldn't see any Translate button (maybe I must change something in the configuration?).

Regarding you first reply, in Search Areas, I have only one option available: All
By activating Falang search plugin, the search in the default Portuguese language returns results in duplicate.

I don't mind to have a worse search in English without autocomplete, images, etc.
But I don't want that autocomplete in the English site returns the Portuguese index of words and to have duplicate results in the default Portuguese language.

If it can also be easy for the client to edit in the frontend without using Falang for the items, I would like to try, though.

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago - 8 years 10 months ago #54790 by ggppdk
Hello

you can try to use multi-categories view with text search,

Try:
- create a menu item to link to multi-category view, selecting none categories (aka ALL)
(also you may enable field filters in it)

- you can create a simple form module and

1. set as action of the form the above menu URL
add a text input with field name 'filter'
e.g.
Code:
<form action="..."> Search: <input type="text" name="filter"/> <input type="submit" value="submit"/> </form>


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 10 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago - 8 years 10 months ago #54795 by pipedream
Thanks.

Just created the menu item and then added the searchword query variable, but nothing changed.

So, the url www.mysite.com/index.php?option=com_flex...ategory&layout=mcats gives the same results as www.mysite.com/index.php?option=com_flex...s&searchword=vinegar , ie all the items.

Did you mean perhaps adding &filter=searchword...

Well... while I was writing this I just saw that you edited your post and, in fact, the query variable should be filter. :)

This solution is only to prevent having duplicate results in the default Portuguese language, right?
Bu then I would also loose autocomplete for it and highlighting in the search results page. :(

I guess it might be simpler to have a hack to prevent both autocomplete in alternative languages and duplicate search results in the default language, don't you think so?
Last edit: 8 years 10 months ago by pipedream.

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #54806 by pipedream
I already solved how to disable autocomplete to happen in alternative languages when using Falang.
I was thinking of having a different menu and module, but I guess the following is more easy, clean and can avoid future similar issues from other users:

So, instead of only:
Code:
$search_autocomplete = $params->get( 'search_autocomplete', 1 );
This should solve it:
Code:
$search_autocomplete = ($params->get('flexi_fish') && flexicontent_html::getUserCurrentLang() != substr(flexicontent_html::getSiteDefaultLang(),0,2) ) ? 0 : $params->get( 'search_autocomplete', 1 ) ;
If you confirm this, I can create a PR and insert this code in the module and component (and maybe elsewhere?).

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago - 8 years 10 months ago #54813 by pipedream
Just solved also the duplicate results with a solution you might also consider to integrate, should it be fit for other duplicate situations (when people choose more than one search plugin at the same time).

So, in the function getData, file "components/com_flexicontent/models/search.php", I changed from this:
Code:
$rows = array(); foreach($results AS $result) { $rows = array_merge( (array) $rows, (array) $result); }
To this:
Code:
$slugs = array(); $rows = $results[0]; foreach($rows as $row) { $slugs[] = $row->slug; } for($i = 1, $ti = count($results); $i < $ti; $i++) { $result = $results[$i]; for($j = 0, $tj = count($result); $j < $tj; $j++) { if(!in_array($result[$j]->slug, $slugs)) { $rows[] = $result[$j]; $slugs[] = $result[$j]->slug; } } }
Don't know if this can mess with other possibilities, but it is working okay for me.
Again, if you wish I can submit a PR with this code.
Last edit: 8 years 10 months ago by pipedream.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.282 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline