• Welcome to Minr.org

    Server IP: zero.minr.org 

    Java Version: 1.20.2

    Who are we?

    Welcome to one of the oldest Minecraft servers and communities in the world! Zero.minr.org dates back over 13 years and has been consistently providing endless hours of fun and excitement for players from all over the globe. With an uptime of 99%, you can count on us to be here for you whenever you're in the mood for some challenging minecraft parkour, puzzles and mazes.

    Our server is home to over 600+ challenges, each designed to keep you engaged and entertained for months on end. These challenges have been created, tested and curated by our green membership community, who are true experts in all things challenges! Our community is made up of some of the most dedicated and skilled players, who have completed our Hardcore set of challenges and continue to create new and innovative experiences for our server.

    At our core, we are strongly committed to fair play and against any form of pay-to-win features. We have been privately funded since our inception, which has allowed us to provide a level playing field for all our players, free of any hidden advantages. This dedication to fair play has resulted in a thriving community where everyone has a chance to excel and showcase their skills.

    So why not join us and become a part of something truly special? Who knows, you may even have what it takes to create a challenge that will remain on our server for years to come. Whether you're a seasoned Minecraft veteran or a newcomer to the game, we look forward to welcoming you to our server.

    For more information about zero.minr.org click here.


To anyone who does web coding

Srentiln

minr op since Nov 2011
Op
Oct 28, 2013
1,988
1,052
Hoping that someone can point to why something is going funky in my formatting.

I'm trying to create a small collection of webpages for my role playing games group (things like D&D) and for some reason my calender page code is adding spaces to the page that are not in the coding.

If you think you can figure it out, please tell me because I'm at a loss:

http://ck9.outpost2.net/RolePlayGroup/index.php?p=3
 

skyerzz

Awesome
Greenie
Nov 2, 2013
552
257
Where exactely is it putting in spaces? i might be completely blind or it is normal for me?
 

jagman77

Killer of Very Large Horses
Greenie
Oct 27, 2013
338
157
Again, I cant see any obvious spaces. Ive had a similar issue before, but the coding was a bit more complex then this, so Im not sure about it.

could you add a screenshot just highlighting where the issues are?
 

Srentiln

minr op since Nov 2011
Op
Oct 28, 2013
1,988
1,052
I have tried it in both Chrome and IE, both insert that space in there, but it is only select-able in Chrome.
 

Attachments

Srentiln

minr op since Nov 2011
Op
Oct 28, 2013
1,988
1,052
Zath didn't see anything that would cause it either, so here's the full code with the php (since I haven't worked on any of the security stuff for it yet)

Edit: added explanations

main index.php code
PHP:
<?php
$p = $_GET['p'];
if($_GET['p'] == '')
{
  $p = "1";
}
function pagechange($p)
{
  include("header.html");
  echo "<table cols='2' border='0' cellpadding='0' cellspacing='0' align='center'>";

/*space for a logo*/
  echo "<tr><td width='15%'></td>";

  echo "<td width='14%'>";
  include('nav.html');

 /*creates a separation line between navigation and content */
  echo "</td></tr><tr><td height='1' bgcolor='#000000'></td><td height='1' bgcolor='#00AAFF'></td><td height='1' bgcolor='#00AAFF'></td><td height='1' bgcolor='#00AAFF'></td><td height='1' bgcolor='#00AAFF'></td><td height='1' bgcolor='#00AAFF'></td><td height='1' bgcolor='#00AAFF'></td></tr></table>";

/*I just like switches better than a long list of if elseif's*/
  switch ($p)
  {
    case '1':
    include('about.html');
    break;
    case '2':
    include('mems.html');
    break;
    case '3':
    include('cal.html');
    break;
    case '4':
    include('files.html');
    break;
    case '5':
    include('login.html');
    break;
  }
  include('footer.html');
}
pagechange($p);
?>
and the code for the calender page:
Code:
<?php

$time = time();
$numDay = date('d', $time);
$numMonth = date('m', $time);
$strMonth = date('F', $time);
$numYear = date('Y', $time);
$firstDay = mktime(0,0,0,$numMonth,1,$numYear);
$daysInMonth = cal_days_in_month(0, $numMonth, $numYear);
$dayOfWeek = date('w', $firstDay);
?>

<center>
<table border='1' width='90%'>
<caption><b><? echo $strMonth; ?></b></caption>
<thead>
  <tr>
  <th abbr="Sunday" scope="col" title="Sunday">S</th>
  <th abbr="Monday" scope="col" title="Monday">M</th>
  <th abbr="Tuesday" scope="col" title="Tuesday">T</th>
  <th abbr="Wednesday" scope="col" title="Wednesday">W</th>
  <th abbr="Thursday" scope="col" title="Thursday">T</th>
  <th abbr="Friday" scope="col" title="Friday">F</th>
  <th abbr="Saturday" scope="col" title="Saturday">S</th>
  </tr>
</thead>
<tbody>
  <tr>
<?

if(0 != $dayOfWeek)
  {
  echo "<td colspan='".$dayOfWeek."'> </td>";
  }

for($i=1;$i<=$daysInMonth;$i++)
  {
  if($i == $numDay)
    {
    echo "<td valign='top' style='background: #00CC00;height: 200px'><b>";
    }
  else
    {
    echo "<td valign='top' style='height: 200px'><b>";
    }
  echo $i."</td>";
  if(date('w', mktime(0,0,0,$numMonth, $i, $numYear)) == 6)
    {
    echo "</b>\n<br>\n<br>";
    //future check for events in the database
    echo "</tr><tr>";
    }
  }
?>

  </tr>
</tbody>
</table>
</center>
 
Last edited:

skyerzz

Awesome
Greenie
Nov 2, 2013
552
257
in chrome, html, it gets displayed as
HTML:
<center>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<table border="1" width="90%">
<caption>
<b>November</b>
</caption>
<thead>
All brakes would explain why it gets to there, yet i dont know why it puts the brakes in.

It puts the brakes between these:
Code:
<center>
<table border='1' width='90%'>
Dont know if anyone needs this info, but there are 10 brakes total.
 

TheForgottenUser

Honorary green
Greenie
Whitey
Nov 3, 2013
602
329
I'll take a look at this when I get home and try to help.

EDIT: Why aren't you just using something like Bootstrap instead? Also, why do it in PHP? I lied. I'll look at this after I finish my spawn. Blie and I are furiously attempting to finish it within the next nine hours and one minute.
 
Last edited:

Srentiln

minr op since Nov 2011
Op
Oct 28, 2013
1,988
1,052
in chrome, html, it gets displayed as
HTML:
<center>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<table border="1" width="90%">
<caption>
<b>November</b>
</caption>
<thead>
All brakes would explain why it gets to there, yet i dont know why it puts the brakes in.

It puts the brakes between these:
Code:
<center>
<table border='1' width='90%'>
Dont know if anyone needs this info, but there are 10 brakes total.

That's so strange...I don't have any of those in the base code

And forgot: I am using php because it is what I know. I plan on tying in to a database of events and a lot of what I need for that is PHP based
 

jagman77

Killer of Very Large Horses
Greenie
Oct 27, 2013
338
157
Had a quick talk with dad, here is his suggestions

remove all <center> tags to begin with since they are not html5 compliant.
<html> doctype at the top is HTML5, so try this to begin with

http://www.w3schools.com/tags/tag_center.asp

also remove the carriage return after the <?php tags in the loop inside the table and the carriage return before the ?> inside the loop
 

Srentiln

minr op since Nov 2011
Op
Oct 28, 2013
1,988
1,052
So many changes since I've done anything, heh

I don't have a carriage return...I have newlines embedded in the echos so the html is properly separated in the page code, but no /r

Edit: decided to look at just the calender page on its own
Edit 2: changed the file to be php base instead of html base, fixed the breaking issue http://ck9.outpost2.net/RolePlayGroup/pages/cal.php

For some reason, the page itself is adding the breaks...
 
Last edited:
Top