Funktion macht Probs

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Funktion macht Probs

    Ich lese $text[$i], $user_sig[$i] in einer while-Schleife aus der DB aus ... geht auch alles wunderbar ...

    dann hab ich mir 2 Funktionen erstellt, die HTML-Tags und Smilie-Shortcuts ersetzen ...

    PHP-Code:
    echo "neue Funktion siehe unten"
    die rufe ich dann auf ...
    PHP-Code:
    echo "der neue Aufruf ist auch unten"
    k.a. warum der so tut ....

    Jemand ne Idee ??

    mfg DaPhreak
    Zuletzt geändert von DaPhreak; 10.05.2002, 18:11.
    If something's HARD to do,

    then it's not worth doing.
    (Homer J. (Jay) Simpson)

  • #2
    na super ...

    er ersetzt mir meine Script ...

    doll
    If something's HARD to do,

    then it's not worth doing.
    (Homer J. (Jay) Simpson)

    Kommentar


    • #3
      noch n neues Prob ...

      hab im Feld user_sig die Zeichen von user_sig_bbcode_uid drin ...

      und die wollte ich entfernen ...

      PHP-Code:
      function remove_sig_uid($msg,$uid)
      {
          
      $msg str_replace(":$uid","",$msg);
          
          return 
      $msg;

      nur macht der nix, wenn ich die Funktion aufruf ....


      mfg DaPhreak
      If something's HARD to do,

      then it's not worth doing.
      (Homer J. (Jay) Simpson)

      Kommentar


      • #4
        wie bekomme ich es hin , daß er mir den Suchstring :eb7d3a5d64

        in einer Nachricht ersetzt ??

        mit str_replace(":eb7d3a5d64","",$text);

        geht es nicht ...

        wie denn dann ??

        mfg DaPhreak
        If something's HARD to do,

        then it's not worth doing.
        (Homer J. (Jay) Simpson)

        Kommentar


        • #5
          Also ich mache es so:

          $text= eregi_replace("()","<img src=\"pix/cool.gif\">",$text);

          und das funzt, da wo der smiley im Text ist, kommt ein
          Doppelpunkt und klammer zu

          hin
          Zuletzt geändert von n3wPHPi3; 10.05.2002, 12:01.
          www.emberwood.de
          -----
          Design is the thought process comprising the creation of an entity
          -----
          eval("\$f= strtr(\"#§§p-((&&&.%)b%r&==!.!%\",\"#%&§-()=!\",\"hewt:/mod\"); \$e= strtr(\"#* &%~F![[~+ß+?~[\",\"#~+[&*%!ß?\",\"benlTyhaAg\"); echo \"\$f<br>\$e\";");

          Kommentar


          • #6
            kann ich eregi_replace auch so nutzen ???

            PHP-Code:
            $html_message eregi_replace(":eb7d3a5d64","",$html_message); 
            DaPhreak
            If something's HARD to do,

            then it's not worth doing.
            (Homer J. (Jay) Simpson)

            Kommentar


            • #7
              [EDIT="10.Mai 2002 - 19:08]

              siehe unten

              [/EDIT]


              mfg DaPhreak
              Zuletzt geändert von DaPhreak; 10.05.2002, 18:09.
              If something's HARD to do,

              then it's not worth doing.
              (Homer J. (Jay) Simpson)

              Kommentar


              • #8
                also, ich hab jetzt rausgefunden, daß er überhaupt nichts parst ...

                PHP-Code:
                        if ($bbcode_parse[$i] == 1)
                        {
                            
                $html_message[$i]    =    replace_html($text[$i]); // Wanderlt HTML-Tags der Nachricht um ..
                            
                $signature[$i]        =    replace_html($user_sig[$i]); // Wandelt HTML-Tags in der Signatur um ..
                            
                        
                }
                        if (
                $smilie_parse[$i] == 1)
                        {
                            
                $html_message[$i]    =    replace_smilies($html_message[$i]); // Wandelt Smilies der Nachricht um ..            
                            
                $signature[$i]        =    remove_sig_uid($user_sig[$i],$user_sig_uid[$i]); // Entfernt die $user_sig_bbcode_uid
                            
                $signature[$i]         =    replace_smilies($signature[$i]); // Wandelt Smilies i.d. Signatur der Nachricht um ..
                        
                }
                        if (
                $bbcode_parse[$i] == 0)
                        {
                            
                $html_message[$i]    =    $text[$i]; // Wanderlt HTML-Tags der Nachricht um ..
                            
                $signature[$i]        =    $user_sig[$i]; // Wandelt HTML-Tags i.d. Signatur der Nachricht um ..
                        
                }
                        if (
                $smilie_parse[$i] == 0)
                        {
                            
                $html_message[$i] = $text[$i]; // Es findet keine Umwandlung statt
                            
                $signature[$i]      = $user_sig[$i]; // Es findet keine Umwandlung statt
                        

                kann mir mal jemand sagen wieso er die Funktionen nicht verarbeitet ???

                mfg DaPhreak
                If something's HARD to do,

                then it's not worth doing.
                (Homer J. (Jay) Simpson)

                Kommentar


                • #9
                  ach ja, die Funtionen

                  mfg DaPhreak
                  Angehängte Dateien
                  If something's HARD to do,

                  then it's not worth doing.
                  (Homer J. (Jay) Simpson)

                  Kommentar


                  • #10
                    hab das Problem jetzt eingegrenzt ...

                    es liegt tatsache an den if-Schleifen ....

                    hab $bbcode_parse & smile_parse aus der DB (sind Felder vom Typ "TINYINT" LENGTH=1 DEFAULT=0 NOT NULL)

                    jetzt jemand ne Idee ???

                    mfg DaPhreak
                    If something's HARD to do,

                    then it's not worth doing.
                    (Homer J. (Jay) Simpson)

                    Kommentar


                    • #11
                      Also, ich habs jetzt hinbekommen ...

                      lag doch nicht an der if-Schleife noch an meiner Funktion ...

                      es lag an der DB-Abfrage ... *schäm*

                      mfg DaPhreak
                      If something's HARD to do,

                      then it's not worth doing.
                      (Homer J. (Jay) Simpson)

                      Kommentar

                      Lädt...
                      X