Welcome, Guest
  • Author Topic: add field for website in v.2  (Read 3598 times)

    the_idle

    • Server what's that
    • *
    • Posts: 7
      • View Profile
      • Email
    add field for website in v.2
    « on: 04/06/05, 02:24 »
    First i would like to give thanks to the people that created this site. Itīs been very useful  ;D

    Now to the question:
    I would like to make a field where you can add a website when you sign the guestbook.
    Also when you submit the message you should be able to open the submitted website by clicking on it.

    Is this possible an if so could anyone help me with this?

    the_idle

    • Server what's that
    • *
    • Posts: 7
      • View Profile
      • Email
    Re: add field for website in v.2
    « Reply #1 on: 04/06/05, 13:45 »
    Well after spending a few hours in front of the screen I have managed to add a website field and make the information show when loaded but I still havenīt figured out how to make the website clickable.
    I have tried to edit my guestbook.php but without success
    Code: [Select]
    print '<font face="Palatino Linotype" color="#0000FF" size="15"><b>Name: </b></font>' . $name . '<br><b>Email: </b>' . $email . '<br><b>Website: </b>' . $website .'<br><b>Comments: </b>' . $comments . '<br><i>Date: ' . $time . '</i><br><br>';
    $i++;

    I guess that I have to edit this part but Iīm not sure how and do I have to change anything in flash to make the website clickable? Please help anyone ???

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: add field for website in v.2
    « Reply #2 on: 04/06/05, 15:04 »
    use:

    <a href="'.$url.'" target="_blank">'.$site.'</a>'

    Match variables you're using.

    Jorge

    the_idle

    • Server what's that
    • *
    • Posts: 7
      • View Profile
      • Email
    Re: add field for website in v.2
    « Reply #3 on: 04/06/05, 16:05 »
    Thank you for the quick answer.
    I actually made it on my own ;D before reading your post but now I have run in to another problem.
    Is there a way to make my website input field have "http://" as default when the guestbook loads?

    So far I can only make it show up after i have submitted a message by altering this code:

    newEntry.onLoad = function(success){
             if(success){
                _parent._parent.write.gb_status.text = this.gb_status;
                _parent._parent.read.loadEntries("Default", 10);
                // Clear fields
                _parent._parent.write.yourname.text = "";
                _parent._parent.write.youremail.text = "";
                _parent._parent.write.yourwebsite.text = "http://";
                _parent._parent.write.yourcomments.text = "";
             
          }
       }
    }

    the_idle

    • Server what's that
    • *
    • Posts: 7
      • View Profile
      • Email
    Re: add field for website in v.2
    « Reply #4 on: 04/06/05, 16:27 »
    Nevermind. I figured it out ;D