Results 1 to 22 of 22

Thread: Tag Board script

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    9

    Unhappy Tag Board script

    I decided to write a tag board script for the fun of it and I stumbled into a bit of trouble.
    I am using an iframe to display the taggers messages.
    When i make the iframe there is a gap around the inside before the text starts. and it takes away lots of room 5 pixels from top 5 pixels from left and I dont want that wasted. I know i can use the
    Div Position or whatever but whenever the new comments are inserted the Div position is pushed back to the very end or to the text it was with and if I add another DIV then there are two messages ontop of each other.

    Any help would be great!
    Tom-E - www.skateboard-city.com

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    I think I understand you, just add style to the page in the iframe. SOmething like this in the <head>:

    Code:
    <style type="text/css"><!--
      body {
        margin: 0px;
        padding: 0px
      }
    --></style>
    I can't remember whether yuo need margin or padding (think it's margin), so you may not need one of those.

  3. #3
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Code:
    body {
        margin: 0px 0px 0px 0px;
    }
    My evil laugh has a squeak in it.

    kristopherwilson.com

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    9
    Thanks so much!!!
    I used the by "rick bull" and it worked so there wasn't need to try the second one.
    Thank you!
    Tom-E - www.skateboard-city.com

  5. #5
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Tom-E
    Thanks so much!!!
    I used the by "rick bull" and it worked so there wasn't need to try the second one.
    Thank you!
    I've experienced problems in some browsers using just one value. So I always specify a value for each side. Both are valid CSS.
    Last edited by The Hobo; Jan 23rd, 2003 at 12:44 PM.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  6. #6
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Can you remember which browsers you've have problems in?

  7. #7

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    9
    yah i am using both values
    Tom-E
    Tom-E - www.skateboard-city.com

  8. #8
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by Rick Bull
    Can you remember which browsers you've have problems in?
    No, I don't. It was back in the day when I actually checked my pages in various browsers. So it may have even been fixed already in whatever browser it was.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  9. #9

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    9
    Damn, im having another problem, im running a new p4 windows xp pro computer and I have the newest (from what im aware of) version of php triad. And the $_REQUEST doesnt work at all. So I thought, not a big deal, ill just upload my script to my server for this part. But then it wouldn't write to the tagtext.html file. I changed the permissions and everything seemed to be right but when I submitted my info ($_REQUEST was all working an everything.. then ?page=sent kinda thing) and I went back and refreshed the tag board. All the info in tagtext.html... place where i store the posts it was empty. I tried it with a .txt file to but it didn't seem to work.

    Anyone know anything?
    Tom-E - www.skateboard-city.com

  10. #10
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Have you done a CHMOD on the text file to 777 (or whatever it should be )?

  11. #11
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    don't use REQUEST, use POST. also make sure register_globals is off.

    also the margin thing doesn't work in Opera and NS4

  12. #12
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by phpman
    don't use REQUEST, use POST.
    Why?

    Originally posted by phpman
    also the margin thing doesn't work in Opera and NS4
    It's standard CSS. I'd have to say that's their problem.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  13. #13
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    REQUEST is not very secure as someone can enter the info in the url and bypass everything you try to stop.

  14. #14
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by phpman
    REQUEST is not very secure as someone can enter the info in the url and bypass everything you try to stop.
    What do I try to stop?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  15. #15
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    come on Hobo I know you are smarter than that.

    if you were expecting a post from a form then use POST, if you use REQUEST a person can bypass your form and get right in. or if they knew the variable name they could also upload a file from a textbox. all they have to do is load it from there site and your form will process it because you used REQUEST instead of POST

    it is almost endless considering the REQUEST can handle GET, POST, FILES.

  16. #16
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    I think the margin thing has been fixed in Opera 7 by the way. I'm not sure that it was always broken in eariler versions of opera, but just certain situations. Could be wrong though. And NS 4 is just rubbish for CSS

  17. #17
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    it doesn't work in Opera6.01, you have to use the NS4 workaround. and I know that NS4 is rubbish but someone wanted browsers where margins didn't work.

  18. #18
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    The good thing about Opera though is that most people that use it are probably pretty good with PCs (otherwise they would have stuck with IE) and will probably upgrade soon. So hopefully it shouldn't take too long for Opera 6 to die out once Opera 7 has come out. At least that's my opinion

  19. #19
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by phpman
    come on Hobo I know you are smarter than that.

    if you were expecting a post from a form then use POST, if you use REQUEST a person can bypass your form and get right in. or if they knew the variable name they could also upload a file from a textbox. all they have to do is load it from there site and your form will process it because you used REQUEST instead of POST

    it is almost endless considering the REQUEST can handle GET, POST, FILES.
    I hardly think someone's going to want to have a script on their site to post things on his tagboard.

    Maybe they will to spam him, but if he doesn't have any kind of checking in his script, they might as well just do it from his site.

    But I see your point.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  20. #20

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    9
    Hobo's pretty clever...
    Although my problem is solved.

    1. The program works perfectly except when I make it on one page instead of two by using the filename.php?var=value
    - On my php traid local host.
    2. The filename.php?var=value works on my www.skateboard-city.com server but it doesn't write properly.

    So basically on two different servers if the worked together then I would have no problem but they dont.
    I have already CHMOD-ed my text file but all it does is earase all the data in it. It would not be able to do that if it was no CHMOD-ed correctly... am i correct?
    Thanks!
    Tom-E - www.skateboard-city.com

  21. #21
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Do you have MySQL available to you?

    MySQL is far better than flat-file.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  22. #22

    Thread Starter
    New Member
    Join Date
    Jan 2003
    Posts
    9
    Yes I do have Mysql but I have already made 5 different scripts involving mysql and those are the only php scripts I made. I started PHP only because I couldnt find someone to do it for me.
    I wanted to try flat file just to learn it so i know it if i need it.
    Tom-E - www.skateboard-city.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width