Case sensitive - disable | wie ?

Forum_Lexicon_Desc

Case sensitive - disable | wie ?

Beitragvon Hostmaster » 31. Okt 2005 11:25

Hallo Amiga!

Wie ist das möglich zu "disable case sensitive" Keyword im Lexicon.

Beispiel im Lexicon:

Keyword: Vogelgrippe
Explanation:: bla, bla, bla....


Beispiel im forum:

bla, bla, wie wie alle wissen, sind vogelgrippe bla, bla bla


Als Däne schreiben wir nur Gross nach . (punkt), wörter im mitte ein textzeile wird bei uns nie Gross geschrieben, auserhalb Ortsnahmen.

Ich brauche daher beide möglichkeiten ins forum ohne zwei mal en Keyword zu erstellen auf des selbe tema.

Ich habe versuch mit "Vogelgrippe vogelgrippe" und "Vogelgrippe, vogelgrippe" leider ohne erfolg.

Grüß
Host
Hostmaster
 
Beiträge: 22
Registriert: 25. Okt 2005 05:55

Beitragvon AmigaLink » 31. Okt 2005 14:04

Code: Alles auswählen
#
#----------[ OPEN ]-------------------------------------
#

viewtopic.php

#
#----------[ FIND ]-------------------------------------
#

      $message = str_replace('\"', '"', substr(preg_replace('#(\µ(((?>([^µ§]+|(?R)))*)\§))#se', "preg_replace(\$crosslink_word, \$crosslink_url, '\\0')", 'µ' . $message . '§'), 1, -1));

#
#----------[ REPLACE WITH ]-----------------------------
#

      $message = str_replace('\"', '"', substr(preg_replace('#(\µ(((?>([^µ§]+|(?R)))*)\§))#si', "preg_replace(\$crosslink_word, \$crosslink_url, '\\0')", 'µ' . $message . '§'), 1, -1));

#
#----------[ OPEN ]-------------------------------------
#

includes/functions_lexicon.php

#
#----------[ FIND ]-------------------------------------
#

      $message = str_replace('\"', '"', substr(preg_replace('#(\µ(((?>([^µ§]+|(?R)))*)\§))#se', "preg_replace(\$crosslink_word, \$crosslink_url, '\\0')", 'µ' . $message . '§'), 1, -1));

#
#----------[ REPLACE WITH ]-----------------------------
#

      $message = str_replace('\"', '"', substr(preg_replace('#(\µ(((?>([^µ§]+|(?R)))*)\§))#si', "preg_replace(\$crosslink_word, \$crosslink_url, '\\0')", 'µ' . $message . '§'), 1, -1));

#
#----------[ SAVE AND CLOSE ALL FILES ]-----------------
#
# EoM

Die viewtopic.php ist fürs Forum und die functions_lexicon.php für das Lexikon. :)
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon Hostmaster » 31. Okt 2005 20:57

1' Klasse support !

Vielen Dank ;)

Grüß
Host

Zugefügt nach 2 Stunde(n) 34 Minute(n):

Oups !

Ich fahre "Powered by phpBB2 Plus 1.52 and Hostinginfo based on phpBB 2.0.11" und in meine "viewtopic.php" finde ich nicht


Code: Alles auswählen
$message = str_replace('\"', '"', substr(preg_replace('#(\µ(((?>([^µ§]+|(?R)))*)\§))#se', "preg_replace(\$crosslink_word, \$crosslink_url, '\\0')", 'µ' . $message . '§'), 1, -1));


Was tun ?
Hostmaster
 
Beiträge: 22
Registriert: 25. Okt 2005 05:55

Beitragvon AmigaLink » 31. Okt 2005 21:15

Ist nicht wichtig!
Die Zeile exestiert nur wenn du das Quicklinks to Lexicon addon installiert hast. ;)
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon Hostmaster » 31. Okt 2005 22:27

AmigaLink hat geschrieben:Ist nicht wichtig!
Die Zeile exestiert nur wenn du das Quicklinks to Lexicon addon installiert hast. ;)


Das habe ich
Hostmaster
 
Beiträge: 22
Registriert: 25. Okt 2005 05:55

Beitragvon AmigaLink » 1. Nov 2005 15:23

Dann nutzt du die Version mit Cache. :)
(Bei ausgefüllten Support-Daten hätte ich das gewusst. :roll: )
Code: Alles auswählen
#
#----------[ FIND ]-------------------------------------
#

      $message = str_replace('\"', '"', substr(preg_replace('#(\µ(((?>([^µ§]+|(?R)))*)\§))#se', "preg_replace(\$crosslink_word, \$crosslink_url, '\\0')", 'µ' . $message . '§'), 1, -1));

#
#----------[ REPLACE WITH ]-----------------------------
#

      $message = str_replace('\"', '"', substr(preg_replace('#(\µ(((?>([^µ§]+|(?R)))*)\§))#si', "preg_replace(\$crosslink_word, \$crosslink_url, '\\0')", 'µ' . $message . '§'), 1, -1));
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon wicher » 12. Mär 2006 17:59

When i do this change to includes/functions_lexicon.php i get this strange output in the discriptions of the lexicon words:

Code: Alles auswählen
reg_replace($crosslink_word, $crosslink_url, 'µBeheerder van een forum.§

When i change the i back to e it works again, but then i dont have case unsensitivety

what can be wrong here?

This change does not work for me, i dont know what is different at my forum.
Any idea's?
Benutzeravatar
wicher
User
 
Beiträge: 32
Registriert: 9. Feb 2006 01:11
Wohnort: Netherlands

Beitragvon AmigaLink » 12. Mär 2006 18:48

@ wicher
Take the original MOD files and your problem (you tell at http://www.amigalink.de/viewtopic.php?t=528 ) will never exists!!! :roll:

At this time there is no reason to disable the case sensitive without problems, if the lexicon contains keywords like HTML tags!
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon Paradise » 3. Aug 2006 08:49

ich bekomme auch
Code: Alles auswählen
reg_replace($crosslink_word, $crosslink_url,

als fehler

ich hab allerdings in der
functions_lexicon.php
Code: Alles auswählen
/*function Crosslinks($message)
{
   global $phpEx, $db;

   $sql = 'SELECT keyword FROM ' . LEXICON_ENTRY_TABLE . ' ORDER BY keyword';
   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Error getting lexicon entrys', '', __LINE__, __FILE__, $sql);
   }

   if ( $row = $db->sql_fetchrow($result) )
   {
      do
      {
         $crosslink_word[] = '#\b(' . $row['keyword'] . ')\s#i';
         $crosslink_url[] = '<a href="lexicon.' . $phpEx . '?letter=' . $row['keyword'] . '" class="crosslink">' . $row['keyword'] . '</a> ';
         $crosslink_word[] = '#\s(' . $row['keyword'] . ')\b#i';
         $crosslink_url[] = ' <a href="lexicon.' . $phpEx . '?letter=' . $row['keyword'] . '" class="crosslink">' . $row['keyword'] . '</a>';
      }
      while ( $row = $db->sql_fetchrow($result) );
   }
   if (count($crosslink_word)) {
      $message = str_replace('\"', '"', substr(preg_replace('#(\µ(((?>([^µ§]+|(?R)))*)\§))#si', "preg_replace(\$crosslink_word, \$crosslink_url, '\\0')", 'µ' . $message . '§'), 1, -1));
   }
   return $message;
}*/

function parse_crosslinks($message)
{
   global $crosslink_word, $crosslink_url;

   if ($i < count($crosslink_word)) {
      $message = str_replace('\"', '"', substr(preg_replace('#(\µ(((?>([^µ§]+|(?R)))*)\§))#se', "preg_replace(\$crosslink_word, \$crosslink_url, '\\0')", 'µ' . $message . '§'), 1, -1));
      $i++;
   }
   return $message;
}
Bild
Benutzeravatar
Paradise
User
 
Beiträge: 26
Registriert: 30. Jan 2006 19:53

Beitragvon AmigaLink » 3. Aug 2006 19:58

Du nutzt das Cache_Crosslinks_addon, was aber nichts an der, oben geposteten, Änderung ändert.

Was bekommst du für einen Fehler?
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Nächste

Zurück zu Lexicon v2



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 12 Gäste

cron