Posts: 2,094
Threads: 54
Joined: Jan 2011
(2023-01-28, 21:02:33)tuxy Wrote: Today test the I18N Search plugin again, now installed GS CE in the root of my hosting (https://webkust.be), but the search function doesn't work, see my test-pages:
https://webkust.be/algemeen/
https://webkust.be/search/
Seems to work now.
Posts: 116
Threads: 12
Joined: Nov 2014
(2023-01-28, 07:29:57)mvlcek Wrote: (2023-01-28, 06:43:46)tuxy Wrote: Can i use Fancy URL's with the search plugin?
Yes, you can, if you have your server (e.g. .htaccess) correctly configured.
However, you must make sure that your rewrite rules pass on the parameters. For apache this would be done with the QSA flag, e.g.
Code: RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
RewriteRule ^ index.php [L]
(2023-01-28, 21:31:30)mvlcek Wrote: (2023-01-28, 21:02:33)tuxy Wrote: Today test the I18N Search plugin again, now installed GS CE in the root of my hosting (https://webkust.be), but the search function doesn't work, see my test-pages:
https://webkust.be/algemeen/
https://webkust.be/search/
Seems to work now.
Yes, when disable the canonical option in gsconfig.php
Posts: 1,928
Threads: 88
Joined: Apr 2010
Posts: 116
Threads: 12
Joined: Nov 2014
(2023-01-28, 06:10:06)mvlcek Wrote: (2023-01-28, 05:05:16)tuxy Wrote: For testing the search plugin, adding the shortcodes
(% searchform %)
(% searchresults %)
on this page https://gscms.webkust.be/algemeen/
It shows the searchform, but test search for a keyword: geld , nothing shows.
Also adding this code in the sidebar.php:
<?php get_i18n_search_form(array('slug'=>'search','showTags'=>0)); ?>
But the Tag Cloud don't show up.
For testing, remove the files:
../data/other/i18n_*_index.txt
so it can regenerate, but nothing helps :/
What i do wrong??
Using php 8.1
Thanks for being php8 compatibility tester ;-)
You specified 'showTags'=>0, thus no tag cloud is shown. Use 1 to show the tag cloud.
Additionally your page (often) shows php errors in the sidebar, so I suppose, you are still working on it.
(2023-01-28, 18:05:47)Oleg06 Wrote: (2023-01-28, 09:06:31)tuxy Wrote: Try adding the tagCloud in my sidebar.php with: 'showTags'=>1
<?php get_i18n_search_form(array('slug'=>'search','showTags'=>1)); ?>
But doesnt't work!
Only the search form is showing
<?php get_i18n_tags(array('slug'=>'search', 'minTagSize'=>60, 'maxTagSize'=>160)); ?>
(2023-01-29, 00:05:54)Oleg06 Wrote: check this https://skr.sh/sI7xmGmvrfd It's installed...
[font=Arial, "Helvetica Neue", Helvetica, sans-serif]Apache Mod Rewrite
Installed - OK[/font]
Posts: 116
Threads: 12
Joined: Nov 2014
2023-01-29, 19:50:12
(This post was last modified: 2023-01-29, 20:04:26 by tuxy.)
Have two extra questions:
1. How show all the pages indexed by the search plugin?
Adding this in a page, but shows: No results found
(% searchresults words=' ' %)
Trying also:
(% searchresults words:' ' %)
(% searchresults tags=' ' %)
(% searchresults addTags=' ' %)
...
2. I have childpages with a tag _post, so adding (% searchresults addTags=_parent_post %) in the parent-page editor. But nothing happen.
Try follow the docs, but sometimes missed some extra info, sorry i'm a little stupid
PS: maybe it's mistyping but on the usage-tab from the search-plugin the attributes are with ':' and on this website: it is typed with '=', it's a bit confusing how using the attributes.
Posts: 116
Threads: 12
Joined: Nov 2014
2023-01-30, 08:50:25
(This post was last modified: 2023-01-30, 19:56:38 by tuxy.)
Okay, i learn a lot, and found it (again) :
1. Shows all the post-pages (every page with the tag _post):
(% searchresults tags=_post words=' ' %)
2. Shows all the child-pages from a specific parent-page (change YOUR_PARENT_SLUG with the slug from your parent-page):
(% searchresults addTags=_parent_YOUR_PARENT_SLUG words=' ' %)
CASE CLOSED :-)
PS: again awsome plugin, good work Martin ;-)
UPDATE:
Adding the code in the category.php template (instead of the parent-pages itself):
$data_index->url , get the slug from the parent-page
<?php
$parent_category_slug = '_parent_'. $data_index->url;
get_i18n_search_results(array('addTags'=> $parent_category_slug,'words'=>' ', 'showPaging'=>1, 'component'=>'search_results', 'HEADER'=>null));
?>
Maybe it can help others ;-)
Posts: 515
Threads: 21
Joined: Feb 2019
Posts: 116
Threads: 12
Joined: Nov 2014
(2023-01-28, 07:29:57)mvlcek Wrote: (2023-01-28, 06:43:46)tuxy Wrote: Can i use Fancy URL's with the search plugin?
Yes, you can, if you have your server (e.g. .htaccess) correctly configured.
However, you must make sure that your rewrite rules pass on the parameters. For apache this would be done with the QSA flag, e.g.
Code: RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
RewriteRule ^ index.php [L]
(2023-01-28, 21:31:30)mvlcek Wrote: (2023-01-28, 21:02:33)tuxy Wrote: Today test the I18N Search plugin again, now installed GS CE in the root of my hosting (https://webkust.be), but the search function doesn't work, see my test-pages:
https://webkust.be/algemeen/
https://webkust.be/search/
Seems to work now.
(2023-01-30, 18:11:16)Felix Wrote: Hi
did you check this page ?
http://mvlcek.bplaced.net/get-simple/i18n
Not yet, read only the docs about the I18N Search plugin on @mvlcek's website, stupid don't read it first about I18N, it looks useful info.
I use only one language, is the reason why not installed and reading the docs about I18N.
Is the I18N plugin necessary for a good working Search plugin?
Thanks for the attention that i need also must read the other docs, for better understanding how the plugins integrated with each other.
Posts: 116
Threads: 12
Joined: Nov 2014
2023-02-10, 19:30:06
(This post was last modified: 2023-02-10, 19:30:58 by tuxy.)
In the sidebar.php i used this snippet for showing the Tag Cloud:
Code: <?php get_i18n_tags(array('slug'=>'tags', 'minTagSize'=>60, 'maxTagSize'=>160)); ?>
Is there a with I18N Search way showing only the related tags on a single post page?
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2023-02-10, 19:30:06)tuxy Wrote: Is there a with I18N Search way showing only the related tags on a single post page?
What is it you want to achieve? - show only the tags of the current page: this could be done by some use of the global variable $metak...
- show only the tags of the current page, sized relatively by how many pages also have the tag?
- show the tags of the current page + the tags of other pages that also have all those tags?
- show the tags of the current page + the tags of other pages that have at least one of those tags?
- show all tags, but style the tags of the current page differently?
- ...?
Posts: 116
Threads: 12
Joined: Nov 2014
(2023-01-28, 06:10:06)mvlcek Wrote: (2023-01-28, 05:05:16)tuxy Wrote: For testing the search plugin, adding the shortcodes
(% searchform %)
(% searchresults %)
on this page https://gscms.webkust.be/algemeen/
It shows the searchform, but test search for a keyword: geld , nothing shows.
Also adding this code in the sidebar.php:
<?php get_i18n_search_form(array('slug'=>'search','showTags'=>0)); ?>
But the Tag Cloud don't show up.
For testing, remove the files:
../data/other/i18n_*_index.txt
so it can regenerate, but nothing helps :/
What i do wrong??
Using php 8.1
Thanks for being php8 compatibility tester ;-)
You specified 'showTags'=>0, thus no tag cloud is shown. Use 1 to show the tag cloud.
Additionally your page (often) shows php errors in the sidebar, so I suppose, you are still working on it.
(2023-01-28, 18:05:47)Oleg06 Wrote: (2023-01-28, 09:06:31)tuxy Wrote: Try adding the tagCloud in my sidebar.php with: 'showTags'=>1
<?php get_i18n_search_form(array('slug'=>'search','showTags'=>1)); ?>
But doesnt't work!
Only the search form is showing
<?php get_i18n_tags(array('slug'=>'search', 'minTagSize'=>60, 'maxTagSize'=>160)); ?>
(2023-01-29, 00:05:54)Oleg06 Wrote: check this https://skr.sh/sI7xmGmvrfd
(2023-02-11, 01:38:33)mvlcek Wrote: (2023-02-10, 19:30:06)tuxy Wrote: Is there a with I18N Search way showing only the related tags on a single post page?
What is it you want to achieve?- show only the tags of the current page: this could be done by some use of the global variable $metak...
- show only the tags of the current page, sized relatively by how many pages also have the tag?
- show the tags of the current page + the tags of other pages that also have all those tags?
- show the tags of the current page + the tags of other pages that have at least one of those tags?
- show all tags, but style the tags of the current page differently?
- ...?
Hi mvlcek,
- show only the tags of the current page: this could be done by some use of the global variable $metak...
With the links of this tags similar like th tagcloud.
I have also a tagcloud in the sidebar, but this is for the whole site. See gewoonsimpel.be
Now i will showing only the tags from a current blogpost-page. Nu example:
Article1 shows tag7, tag4, tag9
Article2 has shows only tag1, tag6, tag7
Article3 shows only tag9, tag2
All this tags have also a link. When click on one of these tags, it shows a Page with a the articles that has thé certain tagx
...
Similar like a 'classic' blogpost that showing the current tags from a Blog-Page.
I know, i think is possible develop a foreach-loop with te template tag (Keywords) but maybe is simpler using your awesome plugin.
Posts: 116
Threads: 12
Joined: Nov 2014
2023-02-11, 08:50:26
(This post was last modified: 2023-02-11, 09:28:41 by tuxy.)
Found a solution:
Code: <?php
$keywords = get_page_meta_keywords(false);
$keywords_array = array_map('trim', explode(',',$keywords));
foreach($keywords_array as $item){
if (($item != '_post') AND ($item != '')) {
echo '<a class="single-post-tag" href="/tags/?tags='.$item.'">#'.$item.'</a> ';
}
}
?>
This code snippet shows the tags (with the links) for the current page (blogpost).
example:
#tag1 #tag2 #tag3 ... tagx
With the if-statement, exclude the virual tag _post and empty tags, from the list of tags from the current page.
See the result at the bottom of this blogpost (or another blogpost on the website).
Posts: 116
Threads: 12
Joined: Nov 2014
2023-02-22, 09:12:54
(This post was last modified: 2023-02-22, 09:17:28 by tuxy.)
I have a multilevel menu and slugs, see this topic thanks to @mvlcek for the support.
Using three Special pages:
- Province (grandparent)
- City (parent)
- Location (child)
This is the url structure /grandparent/parent/child :
../province-1/city-1/location-1
../province-1/city-1/location-2
../province-1/city-2/location-1
...
../province-2/city-1/location-1
../province-2/city-2/location-1
...
../province-x/city-x/location-x
So is it possible search/filter only the child-pages from a province-x ?
When looking in page's xml-file, it stores only the parent-page, but not the grandparent.
Plan B = adding a field province to the special page Location, but hope that it is possible show the Location pages from a province (grandparent).
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2023-02-22, 09:12:54)tuxy Wrote: I have a multilevel menu and slugs, see this topic thanks to @mvlcek for the support.
Using three Special pages:
- Province (grandparent)
- City (parent)
- Location (child)
This is the url structure /grandparent/parent/child :
../province-1/city-1/location-1
../province-1/city-1/location-2
../province-1/city-2/location-1
...
../province-2/city-1/location-1
../province-2/city-2/location-1
...
../province-x/city-x/location-x
So is it possible search/filter only the child-pages from a province-x ?
When looking in page's xml-file, it stores only the parent-page, but not the grandparent.
Plan B = adding a field province to the special page Location, but hope that it is possible show the Location pages from a province (grandparent).
Currently you can limit your search based on tags: - give each page in province-1 a tag Province 1 or _province_1 (leading _ means not visible in tag cloud)
- add the parameter addTags=_province_1 (replace spaces, etc. with _) to search form and search results call.
Posts: 116
Threads: 12
Joined: Nov 2014
2023-02-23, 19:56:39
(This post was last modified: 2023-02-23, 20:02:30 by tuxy.)
(2023-01-28, 07:29:57)mvlcek Wrote: (2023-01-28, 06:43:46)tuxy Wrote: Can i use Fancy URL's with the search plugin?
Yes, you can, if you have your server (e.g. .htaccess) correctly configured.
However, you must make sure that your rewrite rules pass on the parameters. For apache this would be done with the QSA flag, e.g.
Code: RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
RewriteRule ^ index.php [L]
(2023-01-28, 21:31:30)mvlcek Wrote: (2023-01-28, 21:02:33)tuxy Wrote: Today test the I18N Search plugin again, now installed GS CE in the root of my hosting (https://webkust.be), but the search function doesn't work, see my test-pages:
https://webkust.be/algemeen/
https://webkust.be/search/
Seems to work now.
(2023-02-23, 01:10:58)mvlcek Wrote: (2023-02-22, 09:12:54)tuxy Wrote: I have a multilevel menu and slugs, see this topic thanks to @mvlcek for the support.
Using three Special pages:
- Province (grandparent)
- City (parent)
- Location (child)
This is the url structure /grandparent/parent/child :
../province-1/city-1/location-1
../province-1/city-1/location-2
../province-1/city-2/location-1
...
../province-2/city-1/location-1
../province-2/city-2/location-1
...
../province-x/city-x/location-x
So is it possible search/filter only the child-pages from a province-x ?
When looking in page's xml-file, it stores only the parent-page, but not the grandparent.
Plan B = adding a field province to the special page Location, but hope that it is possible show the Location pages from a province (grandparent).
Currently you can limit your search based on tags:- give each page in province-1 a tag Province 1 or _province_1 (leading _ means not visible in tag cloud)
- add the parameter addTags=_province_1 (replace spaces, etc. with _) to search form and search results call.
Hi mvlcek,
If i understand, when adding the tag _province_1 ... _province_x to the Special Page Province (=grandparent-page) it can list the child-pages (Location-pages).
This would be awesome. i will try this
Thanks for your fast support mvlcek!
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2023-02-23, 19:56:39)tuxy Wrote: If i understand, when adding the tag _province_1 ... _province_x to the Special Page Province (=grandparent-page) it can list the child-pages (Location-pages).
This would be awesome. i will try this
No, you have to add it to all pages you want to be found, all the pages below the grandparent page and probably the grandparent page itself.
Posts: 116
Threads: 12
Joined: Nov 2014
2023-02-24, 04:26:02
(This post was last modified: 2023-02-24, 06:06:55 by tuxy.)
(2023-01-28, 06:10:06)mvlcek Wrote: (2023-01-28, 05:05:16)tuxy Wrote: For testing the search plugin, adding the shortcodes
(% searchform %)
(% searchresults %)
on this page https://gscms.webkust.be/algemeen/
It shows the searchform, but test search for a keyword: geld , nothing shows.
Also adding this code in the sidebar.php:
<?php get_i18n_search_form(array('slug'=>'search','showTags'=>0)); ?>
But the Tag Cloud don't show up.
For testing, remove the files:
../data/other/i18n_*_index.txt
so it can regenerate, but nothing helps :/
What i do wrong??
Using php 8.1
Thanks for being php8 compatibility tester ;-)
You specified 'showTags'=>0, thus no tag cloud is shown. Use 1 to show the tag cloud.
Additionally your page (often) shows php errors in the sidebar, so I suppose, you are still working on it.
(2023-01-28, 18:05:47)Oleg06 Wrote: (2023-01-28, 09:06:31)tuxy Wrote: Try adding the tagCloud in my sidebar.php with: 'showTags'=>1
<?php get_i18n_search_form(array('slug'=>'search','showTags'=>1)); ?>
But doesnt't work!
Only the search form is showing
<?php get_i18n_tags(array('slug'=>'search', 'minTagSize'=>60, 'maxTagSize'=>160)); ?>
(2023-01-29, 00:05:54)Oleg06 Wrote: check this https://skr.sh/sI7xmGmvrfd
(2023-02-24, 03:12:11)mvlcek Wrote: (2023-02-23, 19:56:39)tuxy Wrote: If i understand, when adding the tag _province_1 ... _province_x to the Special Page Province (=grandparent-page) it can list the child-pages (Location-pages).
This would be awesome. i will try this
No, you have to add it to all pages you want to be found, all the pages below the grandparent page and probably the grandparent page itself. Oh okay i understand, i will try it
Posts: 116
Threads: 12
Joined: Nov 2014
2023-03-04, 03:18:01
(This post was last modified: 2023-03-04, 03:23:13 by tuxy.)
Hi mvlvek,
A screenshot of my project (dogvalley.be) in alpha-stage rebuild with GS and I18N, following your advice: adding the grandparent-pages (provinces) as tags _prov_province-x.
There is a lot of work todo, but it works
For the parent using this snippet in city.php:
Code: <?php
$citySlug = '_parent_'.$data_index->url; // use the url from the city.php (parent)
$result = return_i18n_search_results($citySlug, $words=null, $first=0, $max=9999, $order=null, $lang=null);
?>
I don't know, it is GS related, but when a parent-page (city) has hyphen ' -' in the url, by example:
../provincie/antwerpen/ heist-op-den-berg/
It does not show the locations (child-pages).
When edit the city-page slug in dashboard to heistopdenberg (without '-'):
../provincie/antwerpen/ heistopdenberg/
Then shows the locations correct.
Is there a way allow the ' -' character in the search-plugin?
Regards,
Christophe
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2023-03-04, 03:18:01)tuxy Wrote: Code: <?php
$citySlug = '_parent_'.$data_index->url; // use the url from the city.php (parent)
$result = return_i18n_search_results($citySlug, $words=null, $first=0, $max=9999, $order=null, $lang=null);
?>
I don't know, it is GS related, but when a parent-page (city) has hyphen '-' in the url, by example:
../provincie/antwerpen/heist-op-den-berg/
It does not show the locations (child-pages).
When edit the city-page slug in dashboard to heistopdenberg (without '-'):
../provincie/antwerpen/heistopdenberg/
Then shows the locations correct.
Is there a way allow the '-' character in the search-plugin?
In the search plugin all non-word-characters are translated to "_" (compare data/other/i18n_tag_index.txt). Try
Code: $citySlug = '_parent_'.preg_replace("/\W+/","_",$data_index->url);
$result = return_i18n_search_results($citySlug, null, 0, 9999)
BTW: the assignments within the function call serve no functionality except assigning the value to a variable, too, i.e. after the function call variable $max is set to 9999.
PHP8 supports named parameters, thus you should be able to write
Code: $result = return_i18n_search_results(tags: $citySlug, max: 9999)
Posts: 116
Threads: 12
Joined: Nov 2014
2023-03-04, 07:51:46
(This post was last modified: 2023-03-04, 07:52:39 by tuxy.)
Hi mvlcek,
YEAH!!! This works great. Awesome.
Really thanks for solving this. i was afraid it doesn't work, but you do magic!!!!
Okay, good to know about the php8 support.
Change my code now to, what you advice.
Code: $result = return_i18n_search_results(tags: $citySlug, max: 9999);
Posts: 1
Threads: 0
Joined: Jul 2023
2023-08-07, 20:04:55
(This post was last modified: 2023-08-11, 04:10:39 by VeNick.)
Hi mvlvek,
I'm testing GS CE 3.3.19 with your plugins and found that I18N Search pluging v2.13.4 is not working with russian words.
English is OK but when I type russian word for search then I receive "No results found".
Also Russian tags are visible in the tag cloud but russian tags link give "No results found" also.
What can be the reason of that?
Posts: 26
Threads: 1
Joined: Nov 2020
(2013-10-11, 05:21:19)Kolyok Wrote: Hello guys.
I've been working on a website/template and i noticed that the plugin uses the jQuery Autocomplete that is deprecated so it causes some problems if you use latest jquery without jQuery migrate.
I would like to suggest the author to change to jQuery UI or update the jQuery Autocomplete with a more up-to-date version.
You can find a working and "maintained" version at https://github.com/dyve/jquery-autocomplete (suggested by the bassistance guy)
Edit: I thought i would share the file im using right now (works with any jquery version) so here it is (extract it into "plugins/i18n_search/js/"):
Hello
I can't use the plugin without getting these errors:
jquery.autocomplete.min.js:1 Uncaught ReferenceError: jQuery is not defined
Which obviously leads to errors in the search form with the $(function()
Uncaught ReferenceError: $ is not defined
But Kolyok's version does not solve the problem
I use jquery-1.10.2.min.js
Help
Posts: 26
Threads: 1
Joined: Nov 2020
Hello
I found the answer to the problem
I moved the jquery-1.10.2.min.js script from footer.inc.php to header.inc.php, i.e. before the jquery.autocomplete.min.js script
great everything is fine
|