Welcome, Guest
  • Author Topic: Problem with tags  (Read 5153 times)

    StalKer

    • Server what's that
    • *
    • Posts: 5
      • View Profile
    Problem with tags
    « on: 06/16/08, 14:49 »
    Hey!
    I searched thru all pages on forum, but cant find someone having similar problem.

    Im using v2 and if someone post something with <3 (heart) for example, everything posted before that dissapears because the open tag "<". So... how to make the tags be read like normal text, and not html code in the comment?

    Appreciate an answer  8)
    Tnx!

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Problem with tags
    « Reply #1 on: 06/17/08, 03:09 »
    disable html format (textfield.html=false;)
    happy flashing
    8)
    Ronald

    StalKer

    • Server what's that
    • *
    • Posts: 5
      • View Profile
    Re: Problem with tags
    « Reply #2 on: 06/17/08, 07:15 »
    Yes, thanks i tried that. But it causes all <br> and stuff to show. And name, email, comment, cant be bold.
    No other solution?

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Problem with tags
    « Reply #3 on: 06/18/08, 03:13 »
    This is right - either use html formating - then use the html tags in the right way - or dont use them.

    If this is suposed to be replaced by an image, because it is a emoticon, you have to do the replace before you display it.

    Serarch for all "<3" and replace it with "<img src='heart.jpg'>"
    happy flashing
    8)
    Ronald

    StalKer

    • Server what's that
    • *
    • Posts: 5
      • View Profile
    Re: Problem with tags
    « Reply #4 on: 06/18/08, 06:40 »
    Yea good idea...
    Ive searched for a script how to make it, but dont know how really.
    I tried
    $comments = ereg_replace("<3", "<IMG SRC='heart.png'>", $_POST['yourcomments']);
    but it makes comments dissapear...

    nooby

    • Server what's that
    • *
    • Posts: 16
      • View Profile
    Re: Problem with tags
    « Reply #5 on: 06/20/08, 06:28 »
    hi guys

    i downloaded the guestbook V2, in phpmy admin i did make the table and when i open in localhost the swf file i get this code in the view guestbook.

    ";   



           if($numallComments == 0) {

              print "Nog geen berichten..";

           } else {

              while ($array = mysql_fetch_array($fewComments)) {

                $name = mysql_result($fewComments, $i, 'name');

                $email = mysql_result($fewComments, $i, 'email');

                $comments = mysql_result($fewComments, $i, 'comments');

                $time = mysql_result($fewComments, $i, 'time');



                print 'Name: ' . $name . '
    Email: ' . $email . '
    Comments: ' . $comments . '
    Date: ' . $time . '

    ';

                $i  ;

              }

          }

          // Print this only when there aren't any more entries..

          if($_GET['NumLow'] > $numallComments) {

             print 'Geen berichten meer!

    __
    I dont know what i did wrong but it wont show the comments only this code
    do you guys know how i get the comments back.

    thnks nooby

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Problem with tags
    « Reply #6 on: 06/20/08, 07:42 »
    your server does not support php  ;D
    happy flashing
    8)
    Ronald

    nooby

    • Server what's that
    • *
    • Posts: 16
      • View Profile
    Re: Problem with tags
    « Reply #7 on: 06/20/08, 09:20 »
     ??? how...
     cause i got wampserver

    they support php
     :o or not

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Problem with tags
    « Reply #8 on: 06/20/08, 10:17 »
    the you dont access it via the server - you never can access a script via the local file system ;)

    happy flashing
    8)
    Ronald

    nooby

    • Server what's that
    • *
    • Posts: 16
      • View Profile
    Re: Problem with tags
    « Reply #9 on: 06/20/08, 10:32 »
    (i open the swf file not the script file)
    hm dont get it :-\ can you explain me more  :-[ cause i tested if you could run php with this script:
    <?php
    phpinfo();
    ?>
    and it works i get all the info..

    I did everything to make it work, but still get that piece off code in the view :(
     >:(dont now why it wont work..

    do you know how to fix this??
    « Last Edit: 06/20/08, 18:10 by nooby »

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Problem with tags
    « Reply #10 on: 06/21/08, 03:05 »
    give me the line of code in your flash clip, where you try to access the file.
    happy flashing
    8)
    Ronald

    nooby

    • Server what's that
    • *
    • Posts: 16
      • View Profile
    Re: Problem with tags
    « Reply #11 on: 06/21/08, 05:21 »
    i downloaded this..

    http://www.flash-db.com/Tutorials/guestbook/index.php

    __
    in flash: line 1- this action code:

    // Default NumLow Variable
    NumLow = 0;
    // Stop the movie from looping..
    stop();

    _And in the movieclip: line 1 - this action code:

    function loadEntries(act, increment) {
       // Define NumLow as a Number
       num = new Number(_parent.NumLow);
       // Act accordingly
       if(act == "Next") {
          // Add increment
          _parent.NumLow = num + increment;
       } else if(act == "Previous") {
          _parent.NumLow = num - increment;
       } else {
          // Load default - i.e. 0
          _parent.NumLow = 0;
       }
       // Update Statistics
          _parent.read.low.text = _parent.NumLow;
          _parent.read.high.text = Number(_parent.NumLow) + 10;
       // Show Please wait text
       _parent.read.entries.text = "Loading entries... Please wait...";
       // Begin Loading
       myEntries = new LoadVars()
       myEntries.ref = this
       myEntries.load("GuestBook.php?action=read&r="+random(999)+"&NumLow="+_parent.NumLow)
       myEntries.onLoad = function(success){
          if(success){
             // Assign output to components and objects
             entries.text = this.entries;
             totalEntries.text = this.totalEntries;
             //Update values to calculate prev/next button visibility
             num = Number(_parent.NumLow)
             var totalEntries = Number(this.totalEntries);
             var total = num+increment
             //Hide/show next button
             if(total<totalEntries) this.ref.next_button._visible = true;
             else this.ref.next_button._visible = false
             //Hide/show previous button
             if(num==0) prev_button._visible = false; else prev_button._visible = true
          }
       }
    }
    // Load Default
    _parent.read.loadEntries("Default", 10);
    stop();

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Problem with tags
    « Reply #12 on: 06/21/08, 05:30 »
    do you start your swf file from localhost, or rather from your filesystem?
    happy flashing
    8)
    Ronald

    nooby

    • Server what's that
    • *
    • Posts: 16
      • View Profile
    Re: Problem with tags
    « Reply #13 on: 06/21/08, 10:51 »
    from localhost

    Ronald Wernecke

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 6203
      • View Profile
      • Professional Support
      • Email
    Re: Problem with tags
    « Reply #14 on: 06/21/08, 13:14 »
    waht happens if you enter the "http://localhost/guestbook/GuestBook.php?action=read&numLow=0" into your browser?
    happy flashing
    8)
    Ronald