Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 25, 2012, 10:50:56 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155529
Posts in
21713
Topics by
7738
Members
Latest Member:
Pattieardathfe
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
Problem with search_convert.php and Members module
Pages: [
1
]
Go Down
Author
Topic: Problem with search_convert.php and Members module (Read 2005 times)
crnogorac081
AddOn Development
Offline
Posts: 1706
Problem with search_convert.php and Members module
«
on:
December 06, 2009, 01:16:04 AM »
Hi,
as the topic says, I have this problem.. How can enable search function to search in members module ? I tried to add:
Module-order for searching: faqbaker,manual,wysiwyg,
members
in advanced search settings but no result..
«
Last Edit: December 06, 2009, 11:58:07 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: Content from Members module not included in search ??
«
Reply #1 on:
December 06, 2009, 08:38:00 AM »
I cant see anything wrong.
The search in Members works a bit different (to speed it up)
When you change something in the backend, the databasefield mod_members_groups:group_search is cleared.
When you see the page in the frontend (still logged in) the cleared field gets renewed.
So it can happen: You change something in de Backend and then logout without seeing the page in the frontend. In this case, the group_search is still empty and will be refreshed if you see the page next time (when you are logged in again)
Logged
*weg*
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Content from Members module not included in search ??
«
Reply #2 on:
December 06, 2009, 12:14:39 PM »
I didnt knew that, and I was s***ed up as I entered over 200 records and none of them was displayed in search results
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Content from Members module not included in search ??
«
Reply #3 on:
December 06, 2009, 02:52:22 PM »
It seems that members module doesnt work right with search_convert.php. For example if I have name Đoni, and I type doni, it will find it in wysiwyg page, but not in page where I use members module.. How can I fix this ?
- Update: There are no earch results at all from members module on search result page.. bt there are from wysiwyg module.. wierd..
cheers
«
Last Edit: December 06, 2009, 03:30:29 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: Content from Members module not included in search ??
«
Reply #4 on:
December 06, 2009, 03:37:44 PM »
You mean:
There are Search results from WYSIWYG-Fields in Members, but not from other fields?
Logged
*weg*
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Content from Members module not included in search ??
«
Reply #5 on:
December 06, 2009, 03:40:30 PM »
No, I ment that there are search results from pages with only WYSIWYG module, and I have one page with members module where I need to list over 200 members and when I type some name from these names, it is not found by search.. As soon as I finish all names I will upload site so you can take a look..
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Content from Members module not included in search ??
«
Reply #6 on:
December 06, 2009, 11:56:50 PM »
Ok here is
DEMO
If you type " durovic " in search, it will find durovic and Đurović on pages where I have WYSIWYG module section, but it will not find text on this page --- clanovi.php where is members module. If you type text without š đ č ć ž it will find it in search..
I dont understand why search_convert.php dosesnt work with members module...
This is piece of code in search_convert.php
Code:
if($search_lang=='ME') {
$string_ul_umlaut_add = array(
"š", //
"s", //
"đ", //
"d", //
"č", //
"c", //
"ć", //
"c", //
"ž", //
"z", //
);
$string_ul_regex_add = array(
"(š|s)", //
"(š|s)", //
"(đ|d)", //
"(đ|d)", //
"(č|c)", //
"(č|c)", //
"(ć|c)", //
"(ć|c)", //
"(ž|z)", //
"(ž|z)", //
);
$string_ul_umlaut = array_merge($string_ul_umlaut_add, $string_ul_umlaut);
$string_ul_regex = array_merge($string_ul_regex_add, $string_ul_regex);
}
Any advice is most appreciated
«
Last Edit: February 04, 2010, 06:16:31 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: Problem with search_convert.php and Members module
«
Reply #7 on:
December 07, 2009, 03:53:09 PM »
This is a problem with the charset..
I have to ask someone who knows more about the WebsiteBaker search funktions + charsets
Logged
*weg*
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Problem with search_convert.php and Members module
«
Reply #8 on:
December 07, 2009, 04:01:29 PM »
In the instalation file I dont see that anywhere charset is being changed.. Thats why I cant figure out whre the problem is ?
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Problem with search_convert.php and Members module
«
Reply #9 on:
December 08, 2009, 03:42:04 PM »
Also, next to this issue, I am experiencing design break issue when using FF.
The site is on this
link
These are Module settigns:
Code:
Group Header:
<div>
<h2>[GROUPNAME]</h2>
</div>
<div class="pmenu">
Members loop:
<a href="[MEMBERPAGE]">
<table>
<tr valign="top"><td>
<img src="[PICTURE]" alt="" /></td>
<td align="left">
<b>[NAME]</b><br />{LONG1}</td></tr></table>
</a>
Group Footer:
</div>
CSS:
.pmenu {width:100%;}
.pmenu a {display:block; float:left; width:48%; height:170px; text-decoration:none ! important; border:2px solid #dddddd; margin:2px;}
.pmenu a:hover {background-color:#dddddd; border-color:#cc0000}
.pmenu .member-long1 { }
The wierd thing happens when you open page Clanovi few times, one member jumpes out the design, and the tables below mess up their design.. I posted few screenshoots, and also you can check that in the link I posted above. I saw this is happening only with FF.
I tried on several computers, and I have no idea why is this happening ??
Any tips please ?
All best,
I
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: Problem with search_convert.php and Members module
«
Reply #10 on:
December 08, 2009, 04:26:32 PM »
It not a good idea to have a <table> wrapped by a <a>...
This could cause the problem..
Logged
*weg*
Ruud
WebsiteBaker Org e.V.
Offline
Posts: 2295
Re: Problem with search_convert.php and Members module
«
Reply #11 on:
December 08, 2009, 05:23:50 PM »
Also styling the width of an <a> tag is not good. Doing that in percentages of something unknown is even worse. (still.css -> .pmenu a)
My Firefox shows completely different than your screenshots anyway.
Finally, if you want images to line-out nicely, I would use images of all the same width.
If not, it will always look like spaghetti.
Logged
Professional WebsiteBaker Solutions
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Problem with search_convert.php and Members module
«
Reply #12 on:
December 08, 2009, 05:51:03 PM »
Ok, it seems that the design is ok now. Tnx for tips mates. Now the only issue is why search convert is not working with members module like it does with wysiwyg..
For example, if you type a last name like "Strugar" on search result page you will see that searched word appears both on page with wysiwyg (Page dedicated to that person) and page with members module (Clanovi.php), where all members are listed.
Now there is an issue with words containing š đ č ć ž letters, if you search for brkic or belegovic , Brkić (or Belegović) will appear on search result both on pages with wysiwyg page and members, but that is not the case if you type any other last name containing these letters above...
So I dont understand why some names works and some not..
Any assistance is appreciated
thanks
I
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: Problem with search_convert.php and Members module
«
Reply #13 on:
December 08, 2009, 08:42:58 PM »
Jo - the search has a problem with the special chars. A change in members/view.php is needed - but I dont know what change. If you ar not a coder, you can only wait for a solution.
Logged
*weg*
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Problem with search_convert.php and Members module
«
Reply #14 on:
December 09, 2009, 12:12:25 AM »
Maybe I can dissable your search plugin
Quote from: chio on December 06, 2009, 08:38:00 AM
The search in Members works a bit different (to speed it up)
When you change something in the backend, the databasefield mod_members_groups:group_search is cleared.
When you see the page in the frontend (still logged in) the cleared field gets renewed.
HI,
how can I dissable this ? Maybe this is working wrong
cherrs
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: Problem with search_convert.php and Members module
«
Reply #15 on:
December 09, 2009, 08:39:27 AM »
You can open members/view.php and look for the line, where group_search ist written to database.
There one more line of code is needed to convert the chars.
Logged
*weg*
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Problem with search_convert.php and Members module
«
Reply #16 on:
December 09, 2009, 09:42:46 AM »
Hi,
Here is the code from view.php
Code:
//So this will be the best way.
if ( $use_caching == 1 OR $wb->is_authenticated() ) {
$database->query("UPDATE ".TABLE_PREFIX."mod_members_groups SET group_cache= '".addslashes($output)."' WHERE group_id = '$group_id' ");
//Prepare for search:
$text = str_replace($vars, $values, $output);
$text = strip_tags($text);
$text = preg_replace('/\s+/', ' ', $text);
$text = addslashes($text);
$database->query("UPDATE ".TABLE_PREFIX."mod_members_groups SET group_search= '".$text."' WHERE group_id = '$group_id' ");
echo '<!-- Cache rebuilt -->';
}
Could somebody please help me with this code, to find out which line is transforming chars and to dissable it..
thanks
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
chio
WebsiteBaker Org e.V.
Offline
Posts: 2264
Re: Problem with search_convert.php and Members module
«
Reply #17 on:
February 04, 2010, 06:02:10 PM »
This seems to be a weird problem...
I have made a test page:
..websitebaker.at/wb/module/members/searchtest.html
and here is the search: ..websitebaker.at/search/
search for these litte words.
With most of the 3 char words the search works. but _not_ with some of the 4 char words. There seem to be combinations of chars that dont work. eg "éšox" works, "áđox" and "àčox" not.
"đox" works, "áix" works...
Seems the problem is NOT in the members-module, but something else. You found it in members, because there you have some special combinations of chars.
«
Last Edit: February 04, 2010, 06:04:33 PM by chio
»
Logged
*weg*
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Problem with search_convert.php and Members module
«
Reply #18 on:
February 04, 2010, 06:19:42 PM »
you are right. That could be the problem.
I apologize for assigning this issue to the members module.
You are right, I spoted it in members module and thought that it is a module issue.
All best,
Ivan
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
thorn
Offline
Posts: 980
Re: Problem with search_convert.php and Members module
«
Reply #19 on:
February 04, 2010, 07:35:49 PM »
Hello,
maybe you want to try
this patch
(for WB2.8 ) ?
- usage of SQL LIKE-operator to find matching rows. The actual search-function fetches
all
rows and performs the search with PHP.
- a utf8_unicode_ci-like regex for text-excerpts to simulate mySQL's behaviour: all ascended characters are treated equally (c=C=ć=ĉ=Ć=Ĉ=...)
thorn.
Logged
Projekte
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Problem with search_convert.php and Members module
«
Reply #20 on:
February 04, 2010, 08:27:13 PM »
Hi thorn,
I am going to test your patch> search_experimental
_06
I am wondering do I have to add in search_convert file arrays:
Code:
"(š|s)", //
"(š|s)", //
"(đ|d)", //
"(đ|d)", //
"(č|c)", //
"(č|c)", //
.... and so on..
or they are allready included in the lot of code I see in file ?
Also, is there some tutorial how to conect this improved search with other modules than wysiwyg/news/guestbook/manual ?
--------------------------------
UPDATE:
Just checked: no characters are replaced. I looked in DB it seems that colation for all tables is: utf8_unicode_ci
«
Last Edit: February 04, 2010, 09:38:49 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...