. .
pragmaMx Support Forum 26 Mai 2012, 02:51:57 *
Willkommen Gast. Bitte einloggen oder registrieren.


Einloggen mit Benutzername und Passwort
News:
Brauchen Sie Hilfe? Bitte nutzen Sie unsere Suchfunktion bevor Sie Beiträge oder Fragen ins Board schreiben! Viele Fragen wurden bereits gestellt und beantwortet. Danke!
 
Übersicht Hilfe Forenregeln / Boardrules
 
Suche
Seiten: 1 [2]  Alle   Nach unten
Drucken
Autor Thema: Neues Modul: Suche  (Gelesen 6437 mal)
0 Mitglieder und 2 Gäste betrachten dieses Thema.
trulla
Spezialist
*****
Offline Offline

Geschlecht: Weiblich
Beiträge: 500

trulla


WWW
« Antworten #20 am: 29 Oktober 2011, 11:52:14 »

 Smiley
Gut, also dann funktioniert alles.
Gespeichert

ß
Webfan
Spezialist
*****
Offline Offline

Geschlecht: Männlich
Beiträge: 552


WWW
« Antworten #21 am: 04 November 2011, 10:52:12 »

Moin,
@Pragma Team: Habt Ihr schon das Modul angeschaut? *...mal vorsichtig nachfrag..*
Wenn es Kritikpunkte gibt, bitte ich um eine Mitteilung.

Außerdem bitte ich darum, sollte der DL freigeschaltet werden, folgenden Hinweis von oben in der Beschreibung zu ergänzen:
Zitat
"Hinweis: Je nach Suchanfragen können in der cache Tabelle erhebliche Datenvolumen entstehen, es sollte also noch Datenbankspeicher in bis zu etwa 50-100% der Größe der bisherigen PMX Tabellen zur Verfügung stehen (oder mehr)."
Danke für Eure Mühen  bye

...Bitte nicht gedrängelt fühlen, ich bin halt ein neugieriger Mensch  Wink

 bye
Gespeichert

Webfan
Spezialist
*****
Offline Offline

Geschlecht: Männlich
Beiträge: 552


WWW
« Antworten #22 am: 29 November 2011, 07:08:45 »

Moin,
hallo, hallo  bye

Die did you mean Funktion von algebre funktioniert nicht mehr, da Google wohl was geändert hat.
Die neue Lösung ist noch nicht so weit das ich sie veröffentlichen kann.

Ansonsten hab ich bisher nix zu verbessern gefunden...?

 bye
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #23 am: 14 Dezember 2011, 03:15:43 »

 hello  smile

 Thanks for your job  thumbup
But it's not work for me, i've the same error :
Specified key was too long; max key length is 1000 bytes
and i don't know how do for add good tables config

This what my dumper tool tell me
Code: [Select]  
Table `mxtradz_suche_cache`

 
Fields of table `mxtradz_suche_cache`
créer nouveau champs

  Field Type Size NULL Key Attribute Default Extra Tri Commentaire
edit field  delete field  1. query text non utf8_general_ci
edit field  delete field  2. url text non utf8_general_ci
edit field  delete field  3. preview text non utf8_general_ci
edit field  delete field  4. module varchar 255 non utf8_general_ci
edit field  delete field  5. ranking decimal 20,2 non 0.00
edit field  delete field  6. time text non utf8_general_ci

Indices de la table `mxtradz_suche_cache`
  Nom colonnes Taille Type Permettre la duplication Cardinalité Commentaire
La table ne contient aucun indice

Thanks you for your support
Regards
Gespeichert

Webfan
Spezialist
*****
Offline Offline

Geschlecht: Männlich
Beiträge: 552


WWW
« Antworten #24 am: 14 Dezember 2011, 06:48:48 »

Hello shorty,
if you use utf8 collation the max keysize for url and query would be 166.
So try to install the tables and then create a primary key url and query with size 166.

 bye
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #25 am: 15 Dezember 2011, 03:21:55 »

 Ok, thanks, it's working for me now  thumbup
But it's not work with smf forums  gruebel
i've tried to modify this
Code: [Select]  
'SMF' => array( 0,1, 'funcSucheMod_SMF' ),
to
Code: [Select]  
'SMF' => array( 1,1, 'funcSucheMod_SMF' ),

and i don't see smf lines into Suche.functions.php
 
This mod will be perfect if it's integrate SMF & Coppermine/Sirius & more mods

I've also tried :

Code: [Select]  
function funcSucheMod_Forum($cq, $q, $rankingDEF)
{
global $prefix;
global $SucheSettingsDefault;

  $sqlq="SELECT * FROM my_forum_prefix_smf_topics
                                   WHERE
                                    titel LIKE '%".mxAddSlashesForSQL(strip_tags($q))."%'
                                   OR
                                    beschreibung LIKE '%".mxAddSlashesForSQL(strip_tags($q))."%'
                                   OR
                                    keywords LIKE '%".mxAddSlashesForSQL(strip_tags($q))."%'
                                   ";
   $result = sql_query($sqlq);
   while($row = sql_fetch_array($result) )
     {
         $ranking = $rankingDEF;
         
         if($cq == $q)$ranking = $ranking + _SUCHE_RANKING_COMPLETE_QUERY_;

         $countwords= substr_count($row['titel'],  strip_tags($q));
         $ranking = $ranking + ($countwords * _SUCHE_RANKING_TITLE_MATCH_);
 
         $countwords= substr_count($row['beschreibung'],  strip_tags($q));
         $ranking = $ranking + ($countwords * _SUCHE_RANKING_TEXT_MATCH_);

         
 $contentpreview = substr(strip_tags($row['beschreibung']), 0, strlen($q) ).'... .... '
                  .substr(strip_tags($row['beschreibung']), strnpos(strip_tags($row['beschreibung']), strip_tags($q), 1), 580).'...';


         $contentpreview =  str_ireplace("".strip_tags($q)."",
                         '<font style="'._SUCHE_HIGHLIGHT_FONTSTYLE_.'">'
                         .strip_tags($q).
                         '</font>',
                          strip_tags($contentpreview)  );
                         
         $link = 'modules.php?action=search2&name=Forum&search='.$row['id'];     
         
         $sqlq2="INSERT INTO ".$prefix._SUCHE_TABLENAME_CACHE_."
                                               SET
                                                query='".mxAddSlashesForSQL(strip_tags($cq))."',
                                                url='".mxAddSlashesForSQL(strip_tags($link))."',
                                                preview='".mxAddSlashesForSQL($contentpreview)."',
                                                module='Forum',
                                                ranking='".mxAddSlashesForSQL(strip_tags($ranking))."',
                                                time='".intval(_SUCHE_JETZT_SEKUNDEN_)."',
                                                title='".mxAddSlashesForSQL(strip_tags($row['titel']))."'
                                                ";
         sql_query($sqlq2);                                       
     }                                   


}

 But it's not work

note :  the prefix of this smf forum is different than prefix of the website
« Letzte Änderung: 15 Dezember 2011, 03:49:57 von shorty » Gespeichert

Webfan
Spezialist
*****
Offline Offline

Geschlecht: Männlich
Beiträge: 552


WWW
« Antworten #26 am: 15 Dezember 2011, 03:50:57 »

Sorry, maybe I will add it later but for now you have to add mods for your own in Suche.functions.php, like the existing examples.
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #27 am: 15 Dezember 2011, 06:12:14 »

ok i understand  smile,
i hope you will have the time to do this.
the mod will be complete after smf integration.
Algebre do it into this topic http://www.pragmamx.fr/Forum-topic-1484.html
but the different search are separate. I don't know how adapt this part of mods into you script to have one request and all results of differents modules in one page
Gespeichert

Webfan
Spezialist
*****
Offline Offline

Geschlecht: Männlich
Beiträge: 552


WWW
« Antworten #28 am: 20 Dezember 2011, 16:31:47 »

Version 1.0.2.0: http://www.webfan.de/Downloads-lid-Suche-Suchemodul-fuer-das-PragmaMx-58.html
changes:
- did you mean disabled by default
- rezepte modul search
- smf modul search (I did not tested it so far, unsure about $link?)

Code: [Select]  
#####################################################################################
function funcSucheMod_SMF($cq, $q, $rankingDEF)
{
global $prefix;
global $SucheSettingsDefault;


  $sqlq="SELECT * FROM ".$prefix."_smf_messages
                                 WHERE
                                  subject LIKE '%".mxAddSlashesForSQL(strip_tags($q))."%'
                                 OR
                                  body LIKE '%".mxAddSlashesForSQL(strip_tags($q))."%'
                                 ";
                                 

   $result = sql_query($sqlq);
   while($row = sql_fetch_array($result) )
     {
         $ranking = $rankingDEF;

         if($cq == $q)$ranking = $ranking + _SUCHE_RANKING_COMPLETE_QUERY_;

         $countwords= substr_count($row['subject'],  strip_tags($q));
         $ranking = $ranking + ($countwords * _SUCHE_RANKING_TITLE_MATCH_);

         $countwords= substr_count($row['body'],  strip_tags($q));
         $ranking = $ranking + ($countwords * _SUCHE_RANKING_TEXT_MATCH_);


 $contentpreview = substr(strip_tags($row['body']), 0, strlen($q) ).'... .... '
                  .substr(strip_tags($row['body']), strnpos(strip_tags($row['body']), strip_tags($q), 1), 580).'...';


         $contentpreview =  str_ireplace("".strip_tags($q)."",
                         '<font style="'._SUCHE_HIGHLIGHT_FONTSTYLE_.'">'
                         .strip_tags($q).
                         '</font>',
                          strip_tags($contentpreview)  );


$link='modules.php?name=Forum&amp;topic='.$row['ID_TOPIC'].'&amp;start=msg'.$row['ID_MSG'].'#msg'.$row['ID_MSG'].'';

         $sqlq2="INSERT INTO ".$prefix._SUCHE_TABLENAME_CACHE_."
                                               SET
                                                query='".mxAddSlashesForSQL(strip_tags($cq))."',
                                                url='".mxAddSlashesForSQL(strip_tags($link))."',
                                                preview='".mxAddSlashesForSQL($contentpreview)."',
                                                module='SMF',
                                                ranking='".mxAddSlashesForSQL(strip_tags($ranking))."',
                                                time='".intval(_SUCHE_JETZT_SEKUNDEN_)."',
                                                title='".mxAddSlashesForSQL(strip_tags($row['subject']))."'
                                                ";
         sql_query($sqlq2);
     }


}
#####################################################################################

 bye
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #29 am: 21 Dezember 2011, 03:44:44 »

 Thans you thumbup i will try it !
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #30 am: 21 Dezember 2011, 07:04:21 »

 it's works perfectly, thanks very much for you works !!   drinks

so i've few ideas for this mod.
i think if it's include by default search into other pragmaMx addons (with autorization)
-mx-shop support
 -Coppermine support
 -Sirus Gallery Support
 -Contest-Mx Support

 Best regards
Gespeichert

shorty
weiss was
***
Offline Offline

Beiträge: 103


WWW
« Antworten #31 am: 25 Februar 2012, 12:10:44 »

 Hello and thanks for your great work on PragmaMx
I ve found a minor error in the version i have.

in suche.functions.php

found :

Code: [Select]  
         $link = 'modules.php?name=Web_Links&amp;lid='.$row['lid'];     

replace by

Code: [Select]  
          $link = 'modules.php?name=Web_Links&op=view&lid='.$row['lid'];

 smile
Gespeichert

Webfan
Spezialist
*****
Offline Offline

Geschlecht: Männlich
Beiträge: 552


WWW
« Antworten #32 am: 25 Februar 2012, 12:30:50 »

Thank you shorty  thumbup

New Version:  http://www.webfan.de/Downloads-lid-Suche-Suchemodul-fuer-das-PragmaMx-58.html
Gespeichert

Seiten: 1 [2]  Alle   Nach oben
Drucken
 
Gehe zu:  

Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
design by hENNE, layout based on YAML