Jump to content

Skatecrazy1

Members
  • Posts

    126
  • Joined

  • Last visited

Everything posted by Skatecrazy1

  1. um, I know what you mean, and let me explain if you make your html and css valid, most cross-browser compatibility is covered there are a couple things that take extra fixing. as for safari, I don't own a mac, so I really have no way to test it.
  2. I usually just upload it to my server, but you can get an IDE, although I've never tried it that way. a very easy server to use is xampp, which has a sourceforge at [url=http://www.sourceforge.net/projects/xampp]http://www.sourceforge.net/projects/xampp[/url] that has an installer and everything, so it's really easy to use. doesn't have much system load. I used to use it.
  3. I'm not exactly sure, but could you show me which version uses what so I can try both?
  4. Hey i'm kind of new to the whole XML/PHP thing, and I was trying some code out of a book that surprisingly didn't work. Here is the short XML File: [code] <?xml version = "1.0" encoding = "iso-8859-1" ?> <books> <title>   <topic>JavaScript</topic>   <series>in easy steps</series> </title> <title>   <topic>C++Programming</topic>   <series>in easy steps</series> </title> </books> [/code] and here is the PHP [code] <html><head><title>Reading DOM</title></head><body> <?php //load xml document into the DOM $dom = new DomDocument; $dom->load( "books.xml" ); //print out the root element name echo("Root element name is: "); echo( $dom -> documentElement -> nodeName ); echo("of the people in the XML file."); echo( "<hr>" ); //print a list of names echo("Topics include:<ul>"); $topics = $dom -> getElementsByTagName( "topic" ); foreach($topics as $node) {   echo("<li>" . $node -> textContent . "</li>"); } echo( "</ul>" ); ?> </body> </html> [/code] and when i try to use that code to parse the XML, i get this error [quote] Warning: domdocument() expects at least 1 parameter, 0 given in /home/content/s/n/a/snapskate/html/v2/pg/xmltest.php on line 5 Fatal error: Call to undefined function: load() in /home/content/s/n/a/snapskate/html/v2/pg/xmltest.php on line 6 [/quote] does anyone know what's up?
  5. Well as far as the invalid CSS, it's not my CSS, it's due to the validator not being up to standard: read this article and you'll understand: [url=http://www.elementary-group-standards.com/css/css-validatorinduced-errors.html]http://www.elementary-group-standards.com/css/css-validatorinduced-errors.html[/url] I hear you on the safari problems, I go on the macs at my school and see that and I can't seem to fix it... I'll have to deal with that later the IE6 thing isnt that big of a deal to me, i've tried to fix it but keep getting weird results, thanks for the input, any more is appreciated. p.s. hopefully people will start getting IE7 when the final release comes out (the new version has CSS fixes that make the output very similar to FF)
  6. oh well that's depressing... is that something they know about and are trying to fix? (at w3c)
  7. Hi, please give opinions, this is the new layout for my website, just finished it, looks alot cleaner than the old version.  Took me awhile, was having problems with HTML, and XHTML validation. [url=http://www.snapskate.com/v2]http://www.snapskate.com/v2[/url] if you're wondering why I have only one box in each column, I just use images as backgrounds for my td's, in other words I'll add more later, this is just a sample.
  8. Alright, well first, look at this layout [url=http://www.snapskate.com/v2/]http://www.snapskate.com/v2/[/url] well when I try to make my XHTML and CSS validity images appear at 50% opacity until they are hovered over, by using something like this: [code] img.xhtml { opacity:.50; filter: alpha(opacity=50); -moz-opacity: 0.5; } img.xhtml:hover { opacity:.100; filter: alpha(opacity=100); -moz-opacity: 1.0; } [/code] now, before I added this CSS, the css validated perfectly. Now i get errors from the validator saying that the properties don't exist.  however, the hover opacity for the image, as you can see, works fine. has anyone here done it a different way that is valid in CSS?
  9. Okay, I seemed to get it to work, all i did was put a <div align="right"> tag around the rborder.png image, then fill in what was empty with the background by changing the td to class="boxheaderbg".  Thanks for your guys' help though, but I guess this was just one of those problems that works itself out  ;)
  10. Hm... did what you said and it doesn't make any difference.  What I can see when I go to view it in internet explorer is that the rborder.png image is like centered in a table cell that is too wide, but my code doesn't reflect anything of the sort... it's strange. well.... see this entire layout was from a tutorial, and I was trying to just type the code out  myself, so that I would understand it for later, and so it would be xhtml valid (the original author uses the background attribute, which isn't valid in xhtml) (I'm not big on html and css, just php, and i was trying to fix that.) This code somehow seems to work (it replaces the <!--main content area begin--> to <!--main content area end-->) I've examined the code a number of times and can't find a difference except for the fact that I use CSS to make the td backgrounds. if you can find what this code has that mine doesn't then the problem should be solved the only problem is I can't find any differences between my code and the code in the tutorial that would make this kind of weird change but whatever you can make of it, please do. below is the code from the tutorial you can view my code above in the first post [code]   <!--MAIN CENTER CONTENT AREA START-->             <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">               <tr>                 <td><img src="images/lborder.gif" width="34" height="24"></td>                 <td width="100%" background="images/bgborder.gif"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Main                     Content Area</font></div></td>                 <td><img src="images/rborder.gif" width="2" height="24"></td>               </tr>               <tr>                 <td colspan="3"><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000" style="border-collapse: collapse">                     <tr>                       <td> <div align="center"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">Your Content! </font>                         </div></td>                     </tr>                     <tr>                       <td bgcolor="#E8E8E8"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright                           2005 - Your Site - All Rights Reserved </font></div></td>                     </tr>                   </table></td>               </tr>             </table>             <!--MAIN CENTER CONTENT AREA END--> [/code]
  11. Um.. you're seeing that on the layout at [url=http://www.snapskate.com/v2/]http://www.snapskate.com/v2/[/url] that the main content box like hangs over on the bottom, and the rest of them don't, it's weird. It's all valid xhtml which is more weird. and i gave the stylesheet and the html so wha?
  12. I've double and triple checked it, it doesn't seem to be, but if you want to check yourself, then here's my stylesheet: [code] body,html { background-color: #FFFFFF; margin: 0px; font-family: verdana, arial, sans-serif; font-size: 12px; color: black; } td { font-family: verdana, arial, sans-serif; font-size: 12px; color: black; } td.logo { background-image: url("images/header_tile.png"); height: 112px; } td.header { background-image: url("images/header_tile.png"); height: 112px; } td.headerbar { background-image: url("images/header_bar_tile.png"); height: 42px; } td.boxheaderbg { background-image: url("images/bgborder.png"); width: 90%; } td.rborder { background-image: url("images/rborder.png"); background-repeat: no-repeat; height: 24px; width: 2px; } td.box { border: black 1px solid; border-collapse: collapse; } [/code]
  13. Hi, I'm having some problems with the center content box in a layout at [url=http://www.snapskate.com/v2/]http://www.snapskate.com/v2/[/url].  I can't get the bottom row of the table for the center box to stay the same size as the top bar for it.  It all validates as XHTML [url=http://validator.w3.org/check?uri=http%3A%2F%2Fwww.snapskate.com%2Fv2%2F&charset=%28detect+automatically%29&doctype=Inline]Here[/url] Here's the HTML code I'd greatly appreciate any help. [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Snap</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> </head> <body> <table width="100%" cellspacing="0" cellpadding="0">       <tr>       <!--start of blue header-->       <td class="logo"><img src="images/logo.png" alt="" /></td>       <td class="header"></td>       </tr>       <!--end of blue header-->             <!--start of grey link bar-->       <tr>       <td colspan="2" class="headerbar"></td>       </tr>       </table>       <!--end of grey link bar-->       <!--start of main content area-->       <table width="100%" cellspacing="0" cellpadding="0">       <tr>       <!--beginning of left side content-->       <td class="leftside" valign="top" width="220">       <table cellspacing="0" cellpadding="0" width="200">       <tr>       <td width="4%"><img src="images/lborder.png" alt="" /></td>       <td class="boxheaderbg">Content Box</td>       <td width="6%" class="rborder"><img src="images/rborder.png" width="2" height="24" alt="" /></td>       </tr>       <tr>       <td colspan="3" class="box">       Navigation here!       </td>       </tr>       </table>       </td>       <!--end of left side content-->       <td width="100%" valign="top">       <!--start of main content box-->       <div align="center">       <table width="95%" cellspacing="0" cellpadding="0">       <tr>       <td width="4%"><img src="images/lborder.png" alt="" /></td>       <td class="boxheaderbg"><div align="center">Box Title</div></td>       <td><img src="images/rborder.png" width="2" height="24" alt="" /></td>       </tr>       <tr>       <td colspan="3">           <table cellspacing="0" cellpadding="0" width="100%">           <tr>           <td width="100%" class="box">           Main area content           </td>           </tr>           </table>       </td>       </tr>       </table>       </div>       <!--end of main content box-->       </td>       <td width="220" valign="top">       <!-- beginning of right side content-->       <!--BEGIN ONE CONTENT BOX -->       <table cellspacing="0" cellpadding="0" width="200">       <tr>       <td width="4%"><img src="images/lborder.png" alt="" /></td>       <td class="boxheaderbg"><div align="center">Rightside</div></td>       <td width="6%" class="rborder"><img src="images/rborder.png" width="2" height="24" alt="" /></td>       </tr>       <tr>       <td colspan="3" class="box">       Content and stuff!       </td>       </tr>       </table>       <!--END ONE CONTENT BOX-->       <!--end of right side content-->       </td>       </tr>       <!--end of main content area-->       </table> </body> </html>       [/code]
  14. Seems alright but just very disorganized, and like obsidian said validate validate validate
  15. Okay well thanks for all of your comments. You can see a coded version [url=http://www.snapskate.com/site/templates/konsolidated/]HERE[/url] as a note, I didn't use framesets I used the overflow:auto attribute to keep the design from chopping up this is one of my first actually good-looking templates so I didn't go into making it very practical, I was just seeing what I was capable of
  16. Skatecrazy1

    Margins

    Hey, I'm not like an expert with HTML or anything, I mean I know enough to use it in PHP, but anyways; I have a page, [url=http://www.snapskate.com/v2]http://www.snapskate.com/v2[/url] that I've been making a new layout with, but I'm having a slight problem.  as you can see, the header at the top doesn't go all the way to the sides of the browser window. I've tried the margin-left, margin-right, and margin-top properties in CSS, but it didn't do anything. i was wondering if any of you guys knew what was up funny thing about html, it doesn't give you an error, it just displays incorrectly, so really it's harder to fix problems. thanks for any help
  17. Yeah well I just made a website template and wondered if I was the only one who liked it  :D so if anyone could post your opinions about it that would be awesome [img]http://www.snapskate.com/uploads/template_prev_3.png[/img]
  18. Also, you could just use the $_REQUEST variable and do something like this: [code] $file = $_REQUEST['filename']; include($file); [/code] as long as the file you're working with is in the same directory as the referer.
  19. my god, why is there such a big problem on this just do it EXACTLY like this copy the variable code I give you this is how I did it on my news script [code] $timestamp = date('M j, Y  g:i A'); [/code] then just insert $timestamp into your date field it's very simple actually.
  20. what it sounds like you need to do is just to add a new field to the user table with the user's respective CSS and just have it echoed out on their page. when they register just have your query insert the default CSS
  21. so in my case $authenticate->variable? or is the $this thing like universal...?
  22. [code] <?php //name your file either through root path or whatever $filename = "your_php_file_name_here.php"; //open the file $file = fopen($file, "r"); //get the php file's size $filesize = filesize($filename); //read the file and put contents into a variable $code = fread($file, $filesize); fclose($file); //then you can take your code variable and put it into your mail form ?> <form method="post" action="mailer_script_filename.php"> Message:<textarea rows="20" cols="25" name="newmsg"> <?php echo $code; ?> </textarea> <br /> <input type="submit" value="send email"> </form> [/code] i'm not sure, but if your mailer script gets parse errors then just do [code] $code = addslashes($code); [/code] but it probably won't, so disregard that last little snippet unless you get errors
  23. Okay so I have this file set up with my log in function: [code] <?php class LogIn { var $username; var $password; var $referer;     function siteLogin()     {         // connect to the server         $conn = @mysql_connect("this", "is", "private")         or die('Could not connect to mySQL.');         if ((!$username) or (!$password)) {             header("location:$referer");             exit();         }         // select a database         $rs = mysql_select_db("snapskate", $conn);         // put up the mysql query         $sql = "select * from users where username=\"$username\" and password=\"$password\"";         // now put the query execution in a variable so we can use it later         $rs = @mysql_query($sql, $conn);         // now see how many rows come up with a match.         $num = mysql_num_rows($rs);         // if it came up as one or more, log the user in         if ($num != null) {             setcookie('loggedin', '1', time() + 36000);             setcookie('username', $username, time() + 36000);             $msg = "<table cellpadding=\"20\">";             $msg .= "<tr><td class=\"inout\" valign=\"middle\" align=\"center\">";             $msg .= "Thank You.  You are now logged in as $username. <br />You are now being transferred.<br /><br />";             $msg .= "<a href=\"http://www.snapskate.com/index.php\">Click here if you do not wish to wait</a>";             $msg .= "</tr></td></table>";             echo($msg);             echo("<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"2;URL=http://www.snapskate.com/\">");         } else {             sleep(2);             header("location:$referer");             exit();         }     } } ?> [/code] and this file (authenticate.php) that used to use all of that same code is here, with the updates: [code] <?php include('funcs.php'); $authenticate = &New LogIn; $authenticate->username = $_POST['username']; $authenticate->password = $_POST['password']; $authenticate->referer = $_SERVER['HTTP_REFERER']; $authenticate->siteLogin(); ?> <link rel="stylesheet" type="text/css" href=" <?php $style = $_COOKIE['style']; if(isset($style)){   echo $style; } else { echo("css/style.css"); } ?> " media="screen" /> [/code] now usually, as you can see, when the user gets logged in it says "you're now logged in, please wait while we transfer you," or some crap like that.  I just get a white screen on this, and I doublecheck my cookies as well to see if it worked or not and sure enough, no cookie from my login script.  just wondering if it's because i have some variables mixed up or if it simply isn't possible.  thanks in advance for any help.
  24. Hi, i was trying to make a sort of IPB thing where it waits for a couple seconds then headers you back to the index page, but down where it says [code] echo ($msg); sleep(3); header("location:http://www.snapskate.com/index.php"); [/code] i get this error [quote] Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/n/a/snapskate/html/site/authenticate.php:30) in /home/content/s/n/a/snapskate/html/site/authenticate.php on line 32 [/quote] i know this is kind of an easy error to fix, most likely, but I've been wading through all my code and I dont really know what's wrong, like I said it's probably just something I'm overlooking. Anyway, here's the complete code for my authenticate.php file [code] <?php $self = $_SERVER['PHP_SELF']; $username = $_POST['username']; $password = $_POST['password']; $referer = $_SERVER['HTTP_REFERER']; $conn = @mysql_connect("*****", "*****", "******") or die("Could not connect to the MySQL server."); if( ( !$username) or ( !$password) )   {     header("Location:$referer");  exit();   } $rs = @mysql_select_db("snapskate", $conn) or die("Could not select the MySQL database.  Please try again."); $sql = "select * from users where username=\"$username\" and password=\"$password\""; $rs = @mysql_query($sql, $conn) or die("Could not execute the log in query.  Please try again."); $num = mysql_num_rows($rs); if($num != 0)   { setcookie( "loggedin", "1", time()+36000); setcookie("username", $username, time()+36000); $msg = "Thank You.  You are now logged in as $username. <br />You are now being transferred.<br /><br />"; $msg .= "<a href=\"http://www.snapskate.com/index.php\">Click here if you do not wish to wait</a>"; echo ($msg); sleep(3); header("location:http://www.snapskate.com/index.php");   }  else { header("location:$referer"); exit();   } ?> [/code] thanks in advance for any help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.