Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

 
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-25-2001 Last Update: Never Installs: 0
 
No support by the author.

Hi all!

I use vBulletin as regional forum in Czech language. Because many users are lazy and write without diacritic marks I'll have to modify search engine, so that it would not use diacritics for searching. Because I don't know how to explain it here is example:

string in post#1: Digitální váha
string in post#2: digitalni vaha

I would like to both posts show when I write to search field: "digitalni" or "digitální".

Please help me! Thank you for any ideas on how to do it.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-25-2001, 05:44 PM
Guest
 
Posts: n/a
Default

use regular expressions to replace them with their generic letter.
Reply With Quote
  #3  
Old 01-25-2001, 06:27 PM
Guest
 
Posts: n/a
Default

I must admit that I don't understand you. I thought that I need to hack search.php. You recommend replacement vars in admin control panel?

Sorry, but I misunderstood you.
Reply With Quote
  #4  
Old 01-25-2001, 06:57 PM
Guest
 
Posts: n/a
Default

Tohle uz me taky napadlo. Ale jak na to...
Reply With Quote
  #5  
Old 01-25-2001, 10:10 PM
Guest
 
Posts: n/a
Default

I meant PHP's regular expressions not vBulletin's replacement variables.

Look at: http://vbulletin.com/forum/showthread.php?threadid=7205
Reply With Quote
  #6  
Old 01-26-2001, 01:14 PM
Guest
 
Posts: n/a
Default

OK. I understand what reg. exp. are.
I checked search.php and found string "combinedwords". So what I have to do is check this string for reg. exp. But the search is processed by MySQL, not vB php script.
database is combined from posts with diacritics and without diacritics. I don't want to leave diacritics out forever.
Reply With Quote
  #7  
Old 01-27-2001, 04:40 PM
Guest
 
Posts: n/a
Default

Any help from Development team? I really need this feature.
Reply With Quote
  #8  
Old 02-18-2001, 03:40 PM
Guest
 
Posts: n/a
Default

Because nobody wants to help I've just researched vB 1.x php code and find my own way to do it.
I want to ask any expert or vB developer if I'm on the right track. I haven't tried it but I think it should work:

I will be replacing letters with:
Code:
str_replace("?","a",$string);
str_replace("?","i",$string);
...and so on
in $subject, $pagetext and $combinedwords string from following files:


misc.php [Building index part]
Code:
--------
    $subject=wordsonly($subject);
    $pagetext=$subject." ".wordsonly($pagetext);
    $usernames=wordsonly($usernames);
--------
HERE
global.php [function indexthread($threadid) part]
Code:
--------
    $subject=wordsonly($subject);
    $pagetext=$subject." ".wordsonly($pagetext);
    $usernames=wordsonly($usernames);
--------
HERE
search.php [MySQL Search SELECT]
Code:
HERE
--------
  $searchresults=$DB_site->query("SELECT DISTINCT
    threadid,
    lastpost
    FROM thread
    WHERE visible=1 $checkforum $subjectonly $checkuser $checkdate $combinedwords
    ORDER BY lastpost DESC");
--------
What do you think, will it work?
Reply With Quote
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03910 seconds
  • Memory Usage 2,241KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete