Thread: New Page errors
View Single Post
  #1  
Old 11-28-2010, 05:39 PM
PTGigi's Avatar
PTGigi PTGigi is offline
Crazily Friendly~HoF
 
Join Date: Jul 2009
Location: Somewhere >.>
Posts: 370
Gender: Female
Credits: 26,461
PTGigi
Default New Page errors

Okay so I took the Blank.php, copied it and renamed it to 'explore.php'. Since it is my explore page. I then added in an image map within the "output page to the user" section. But for some reason I am getting a giant list of errors that I cannot figure out. :S I tried to look around for why it was messing up but couldn't find anything.

The strange part is it is not messing up on my coding but at lines 17 and 18 which are a part of the blank.php file. O.o I also typed in blank.php and that worked perfectly fine. D:

So this is my code:
Code:
<?php

// **********************************************************************
// Rusnak PHP Adoptables Script
// Copyright 2009 Brandon Rusnak
// For help and support: http://www.rusnakweb.com/forum/
//
// Redistribution prohibited without written permission
// **********************************************************************

// Wake the sleeping giant

// **********************************************************************
// Basic Configuration Info
// **********************************************************************

include("inc/functions.php");
include("inc/config.php");

$themeurl = grabanysetting("themeurl");

// **********************************************************************
// Define our top links by calling getlinks()
// **********************************************************************

$links = getlinks();

// **********************************************************************
// Define our ads by calling getads()
// **********************************************************************

$ads = getads("any");

// **********************************************************************
// Grab any dynamic article content from the content table
// **********************************************************************

$pagecontent = getsitecontent("index");
$article_title = $pagecontent[title];
$article_content = $pagecontent[content];
$article_content = nl2br($article_content);

// **********************************************************************
// Grab any settings that we will need for the current page from the DB
// **********************************************************************

$browsertitle = grabanysetting("browsertitle");
$sitename = grabanysetting("sitename");
$slogan = grabanysetting("slogan");

// **********************************************************************
// Check and see if the user is logged in to the site
// **********************************************************************

$loginstatus = logincheck();
$isloggedin = $loginstatus[loginstatus];
$loggedinname = $loginstatus[username];

// **********************************************************************
// End Prepwork - Output the page to the user
// **********************************************************************

$article_title = "Explore";
$article_content = "<html>
<head>
<script type=\"text/javascript\">
function writeText(txt)
{
document.getElementById(\"desc\").innerHTML=txt;
}

//Map is 600,500
</script>
</head>

<body>
<p id=\"desc\"></p>

<img src=\"http://i52.tinypic.com/2ugjh1h.png\" alt=\"If image does not show after a few minutes contact the admin\" usemap=\"#map\" border=0/>

<map name=\"map\">

  <area shape=\"circle\" coords=\"0,0,0\" alt=\"Name\" href=\"Url\" />

  <area shape=\"circle\" coords=\"149,180,5\" alt=\"Town\" href=\"http://www.mm2.weebly.com/town.html\" onMouseOver=\"writeText('The main Town of the Valley, has a Pokemon Center, PokeMart, Contests, the Lab, and a DayCare.')\"/>

  <area shape=\"circle\" coords=\"411,140,5\" alt=\"Arcane Ruins\" href=\"http://www.mm2.weebly.com/arcaneruins.html\" onMouseOver=\"writeText('The mysterious Arcane Ruins, many dark Pokemon live here')\"/>
  <area shape=\"circle\" coords=\"378,185,0\" alt=\"Arig Plains\" href=\"http://www.mm2.weebly.com/arigplains.html\" onMouseOver=\"writeText('The vast Arig Plains, many real colored Pokemon live here.')\"/>
  <area shape=\"circle\" coords=\"378,240,5\" alt=\"Ark Fields\" href=\"http://www.mm2.weebly.com/ark.html\" onMouseOver=\"writeText('The role-playing Ark Fields, Pokemon here pretend to be various characters from the Halo series (by Bungie).')\"/>
  <area shape=\"circle\" coords=\"371,117,0\" alt=\"Burned Forest\" href=\"http://www.mm2.weebly.com/burnedforest.html\" onMouseOver=\"writeText('A Burned Forest, the scent of charcoal is strong and fiery Pokemon live here.')\"/>
  <area shape=\"circle\" coords=\"265,324,0\" alt=\"Granite Square\" href=\"http://www.mm2.weebly.com/granitesquare.html\" onMouseOver=\"writeText('Granite Square lies on top of a mountain, the top has an odd puzzle for you to solve...')\"/>
  <area shape=\"circle\" coords=\"252,47,0\" alt=\"Misty Hills\" href=\"http://www.mm2.weebly.com/mistyhills.html\" onMouseOver=\"writeText('Misty Hills are covered in a dense fog that only gets deeper the farther you get in...many icey Pokemon hide in the mist.')\"/>
  <area shape=\"circle\" coords=\"97,167,5\" alt=\"Okai Rock Formation\" href=\"http://www.mm2.weebly.com/okairockformation.html\" onMouseOver=\"writeText('The Okai Rock Formation is a well known natural stone structure that has a mystery behind it.')\"/>
  <area shape=\"circle\" coords=\"329,246,5\" alt=\"Seasonal Split\" href=\"http://www.mm2.weebly.com/seasonal.html\" onMouseOver=\"writeText('A forest that is ever changing, depending on the season certain Pokemon appear.')\"/>
  <area shape=\"circle\" coords=\"318,315,5\" alt=\"Stardust Sundial\" href=\"http://www.mm2.weebly.com/stardust.html\" onMouseOver=\"writeText('An ancient Sundial that displays time even in the darkest of nights, celestial Pokemon live here.')\"/>
  <area shape=\"circle\" coords=\"157,165,5\" alt=\"Town Outskirts\" href=\"http://www.mm2.weebly.com/townoutskrits.html\" onMouseOver=\"writeText('On the Outskirts of the Town Pokemon have adapted similar to the likings on certain humans.')\"/>
  <area shape=\"circle\" coords=\"0,0,0\" alt=\"Yew-Mang Island\" href=\"http://www.mm2.weebly.com/yinyang.html\" onMouseOver=\"writeText('An island surrounded in mystery, the forces of dark and light live in peace on this island.')\"/>
</map>

</body>
</html>";

// **********************************************************************
// Begin Template Definition
// **********************************************************************

//Define our current theme
$file = $themeurl;

// Do the template changes and echo the ready template
$template = file_get_contents($file);

$template = replace(':ARTICLETITLE:',$article_title,$template);
$template = replace(':ARTICLECONTENT:',$article_content,$template);
$template = replace(':ARTICLEDATE:',$article_date,$template);

$template = replace(':BROWSERTITLE:',$browsertitle,$template);
$template = replace(':SITENAME:',$sitename,$template);

//Define our links
$template = replace(':LINKSBAR:',$links,$template);

//Get the content for the side bar...

$sidebar = getsidebar();
$template = replace(':SIDEFEED:',$sidebar,$template);

//Get the ad content...
$template = replace(':ADS:',$ads,$template);

//Get the slogan info
$template = replace(':SLOGAN:',$slogan,$template);


echo $template;

// **********************************************************************
// End Template Definition
// **********************************************************************



?>
And this is the error:
Quote:
Warning: include(../inc/functions.php) [function.include]: failed to open stream: No such file or directory in /home/content/80/7054280/html/explore.php on line 17

Warning: include() [function.include]: Failed opening '../inc/functions.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/80/7054280/html/explore.php on line 17

Warning: include(../inc/config.php) [function.include]: failed to open stream: No such file or directory in /home/content/80/7054280/html/explore.php on line 18

Warning: include() [function.include]: Failed opening '../inc/config.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/80/7054280/html/explore.php on line 18

Fatal error: Call to undefined function grabanysetting() in /home/content/80/7054280/html/explore.php on line 20
And all of the "function.include" texts links to here: http://mm2plus.com/function.include

Can I get some help? D: I am also getting the same errors on my "outskirts.php" and think it may be a problem with me making new pages D: (not through pages.php but by editing the blank.php one)

EDIT: Okay just tested some other pages I made and my battle page works (well there is no text but I haven't gotten that far yet X3)

EDIT2: Even weirder. If I put my 'explore.php' file into it's own folder 'explore' and change 'explore' to 'index.php' the error count is lower O.o
Code:
Warning: file_get_contents(templates/default/template.html) [function.file-get-contents]: failed to open stream: No such file or directory in /home/content/80/7054280/html/explore/index.php on line 111
Now it just seems to mess up around the theme part D:
__________________


"I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are."~Mewtwo
My Adoptables|Nuzlocke Webcomic
Reply With Quote