Jump to content

dandi8

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Posts posted by dandi8

  1. Oh, so there's a time limit for modifying posts o.O

    Whatever, fixed it!

     

    Thanks, TheFilmGod, you helped me get on the right track to solving the problem :) Turns out I only had to delete 2 lines and change one. Here's my working script:

    function makesubcontent($width,$height, $title, $content) {
    $width1=$width-18;
    $width2=$width-2;
    $height1=$height-46;
    echo "
    <table width=\"".$width."\" height=\"".$height."\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
    <tr>
    	<td colspan=\"2\" background=\"images/subc_left.png\" width=\"9\" height=\"36\"></td>
    	<td background=\"images/subc_head.png\" width=\"".$width1."\" height=\"36\" align=\"center\">
    	<div class=\"contentheader\">".$title."</div>
    	</td>
    	<td colspan=\"2\" background=\"images/subc_right.png\" width=\"9\" height=\"36\"></td>
    </tr>
    <tr>
    	<td class=\"border\" colspan=\"5\" background=\"images/content.gif\" width=\"".$width1."\" height=\"".$height1."\" valign=\"top\"><div class=\"subcontent\">
    ".$content."
    	</div></td>
    </tr>
    <tr>
    	<td colspan=\"2\" background=\"images/subc_bottomleft.png\" width=\"9\" height=\"10\"></td>
    	<td background=\"images/subc_bottom.png\" width=\"".$width1."\" height=\"10\"></td>
    	<td colspan=\"2\" background=\"images/subc_bottomright.png\" width=\"9\" height=\"10\"></td>
    </tr>
    </table>
    ";
    return true;
    }

     

    I changed that:

    <tr>
    	<td background=\"images/outline.gif\" width=\"1\" height=\"".$height1."\"></td>
    	<td colspan=\"3\" background=\"images/content.gif\" width=\"".$width2."\" height=\"".$height1."\" valign=\"top\"><div class=\"subcontent\">
    ".$content."
    	</div></td>
    	<td background=\"images/outline.gif\" width=\"1px\" height=\"".$height1."\"></td>
    </tr>

     

    Into that:

    <tr>
    	<td class=\"border\" colspan=\"5\" background=\"images/content.gif\" width=\"".$width1."\" height=\"".$height1."\" valign=\"top\"><div class=\"subcontent\">
    ".$content."
    	</div></td>
    </tr>

     

    And ofc added the td.border code into my CSS :)

     

    Thanks again and I hope it won't crash on me now XD

     

  2. Failed to find the freaking modify button XD

     

    I just took a look at the code you posted and I don't see how this could work. You missed some the lower part it seems. Lots of unnecesary stuff I think. Anyhow, this gave me an idea which I think might work (and what I think was your first intention). Be back later to say if it worked or not. Also - how do I only make the sides of my table <tr> have a visible border?

  3. *Confused*

    o.O

    I'll try to understand your code later today (it's 03:40AM here for some weird reason XD) :)

     

    Also - we're making a whole new Halo game (perfectly legal, too) so feel free to delete "hsolitude_newest" from the URL and check out our forum. Just stay silent about the fact I'm making us a new website, please ;)

  4. K...

     

    Here's the HTML code for the box:

    <table width="200" height="200" border="0" cellpadding="0" cellspacing="0"> 
    <tr> 
    	<td colspan="2" background="images/subc_left.png" width="9" height="36"></td> 
    	<td background="images/subc_head.png" width="182" height="36" align="center"> 
    	<div class="contentheader">Latest Posts</div> 
    	</td> 
    	<td colspan="2" background="images/subc_right.png" width="9" height="36"></td> 
    </tr> 
    <tr> 
    	<td background="images/outline.gif" width="1" height="154"></td> 
    	<td colspan="3" background="images/content.gif" width="198" height="154" valign="top"><div class="subcontent"> 
    
    This will be full of content<br> 
    This will be full of content<br> 
    This will be full of content<br> 
    
    	</div></td> 
    	<td background="images/outline.gif" width="1px" height="154"></td> 
    </tr> 
    <tr> 
    	<td colspan="2" background="images/subc_bottomleft.png" width="9" height="10"></td> 
    	<td background="images/subc_bottom.png" width="182" height="10"></td> 
    	<td colspan="2" background="images/subc_bottomright.png" width="9" height="10"></td> 
    </tr> 
    </table> 

  5. Hi!

    I've been lately working on a new site and (being the fool that I am) I've used my favourite Google Chrome for the whole designing process. Once the site layout was complete and working I tested it in other browsers... and epically failed. Here's how my content box looks like in different browsers:

    wndproblem.jpg

     

    Obviously there must be a problem with my code that Chrome ignores and other browsers don't, though I don't know which part of it. So here's my code:

    function makesubcontent($width,$height, $title, $content) {
    $width1=$width-18;
    $width2=$width-2;
    $height1=$height-46;
    echo "
    <table width=\"".$width."\" height=\"".$height."\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
    <tr>
    	<td colspan=\"2\" background=\"images/subc_left.png\" width=\"9\" height=\"36\"></td>
    	<td background=\"images/subc_head.png\" width=\"".$width1."\" height=\"36\" align=\"center\">
    	<div class=\"contentheader\">".$title."</div>
    	</td>
    	<td colspan=\"2\" background=\"images/subc_right.png\" width=\"9\" height=\"36\"></td>
    </tr>
    <tr>
    	<td background=\"images/outline.gif\" width=\"1\" height=\"".$height1."\"></td>
    	<td colspan=\"3\" background=\"images/content.gif\" width=\"".$width2."\" height=\"".$height1."\" valign=\"top\"><div class=\"subcontent\">
    ".$content."
    	</div></td>
    	<td background=\"images/outline.gif\" width=\"1px\" height=\"".$height1."\"></td>
    </tr>
    <tr>
    	<td colspan=\"2\" background=\"images/subc_bottomleft.png\" width=\"9\" height=\"10\"></td>
    	<td background=\"images/subc_bottom.png\" width=\"".$width1."\" height=\"10\"></td>
    	<td colspan=\"2\" background=\"images/subc_bottomright.png\" width=\"9\" height=\"10\"></td>
    </tr>
    </table>
    ";
    return true;
    }

     

    Can anyone help me? I'm stuck! :(

     

  6. Sorry for the double post but... I Couldn't find the "Edit" button XD

     

    Anyways, the e-book is awesome! But I have yet another question - is SQL's case-sensitivity also host-dependent? I would assume no, because that would make the whole database thing very difficult. But if it is, is there a way to enforce case-insensitivity in SQL?

  7. Ok then, let me ask you another question that's a little off-topic:

    Do you know any good MySQL tutorials (that you know yourself) that a noob like me could use to learn? All I find are some tuts explaining theory, or when it's practice it's all mysql console. I wanna integrate my SQL with PHP to be able to make a good website (I also want to use phpmyadmin to edit the tables) and I can't seem to find any good tutorials around :-( Right now I *think* I set up a sample table and I got to some sample PHP code for pulling up stuff from an SQL db, but it wants a login and a password? What the hell, I didn't set up any passwords for my mysql (I use XAMPP btw.) o.O

  8. I think you don't understand, it's:

    $plik=fopen("nicklist/".$nickname."/info.txt", 'r');

    that poses the problem. Or am I interpreting the code wrong?

     

    Edit:

    Oh, wait. I AM interpreting it wrong right? Although you forgot to change $nickname to strtolower($nickname) and that would mean they'd still get lowercase nicknames, just they could log in using whatever they wanted. Or am I STILL thinking wrong?

  9. Why don't you just keep all your folder names in lower case and avoid the issue?

     

    Because I want to allow users to have their nicknames written with mixed-case letters. I guess I'll just have to stick the nick to my info.txt file... Although I'm SURE there is a way for case-insensitive fopen, there's always a way...

  10. Hi! I hope this hasn't been answered before, I know I couldn't find it anywhere. But if it has been, sorry.

     

    The problem is I'm making a primitive login system based on txt files. It works perfectly on my xampp server but when I try to log in on a 100webspace server, I get this:

    Warning: fopen(nicklist/Dandi8/info.txt) [function.fopen]: failed to open stream: No such file or directory in /home/www/haloportable.100webspace.net/new/editblog.php on line 47
    
    Warning: fgets(): supplied argument is not a valid stream resource in /home/www/haloportable.100webspace.net/new/editblog.php on line 48

    It can't find nicklist/Dandi8/info.txt even though nicklist/dandi8/info.txt exists.

     

    I figured the fopen function on the server is somehow case-sensitive, as when I use a lower-case login while registering and then logging in, it works OK. But I want to be able to have a mixed-case nick (like Dandi8 or The_Maw or anything for that matter) and still be able to log in while typing in a lower-case version of it.

     

    Here's the part of my code where there are problems, starting from line 46:

    if (strtoupper($folder) == strtoupper($nick)){
    $plik=fopen("nicklist/".$nick."/info.txt", 'r');
    $passreal=fgets($plik,40960);

     

    So is there a way to make the fopen function case-insensitive?

×
×
  • 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.