Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   New Page errors (http://www.mysidiaadoptables.com/forum/showthread.php?t=1615)

PTGigi 11-28-2010 05:39 PM

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:

Hall of Famer 11-28-2010 07:00 PM

RE: New Page errors
 
Looks like you are adding a map to your file? I actually added the html map tag above the PHP codes, it seems that integrating PHP with HTML, Javascript is not an easy task.

Also are you really creating a complicated pokemon battle system? Sounds ambitious, and I wish you good luck. You will have to need script and database files for pokemon stats, types, moves, status ailment and maybe even more before creating a battle system, I hope it works out for you.

HIddenPanda 11-28-2010 08:16 PM

RE: New Page errors
 
In the Headers of the file replace
PHP Code:

$themeurl grabanysetting("themeurl"); 

with
PHP Code:

$themeurl '..\\' grabanysetting("themeurl"); 

That should fix your problem

PTGigi 11-30-2010 03:05 PM

RE: New Page errors
 
Quote:

Originally Posted by Hall of Famer
Looks like you are adding a map to your file? I actually added the html map tag above the PHP codes, it seems that integrating PHP with HTML, Javascript is not an easy task.

Also are you really creating a complicated pokemon battle system? Sounds ambitious, and I wish you good luck. You will have to need script and database files for pokemon stats, types, moves, status ailment and maybe even more before creating a battle system, I hope it works out for you.

Hm, I'll try that out. I know the map and Javascript works because I tested it before.

Not necessarily Pokemon battle system but a battle script of sorts. Yeah I've been slowly coding all of this, I have stats added and a way to add the stats from the Admin CP when creating an adoptable but still working on a good plan for making the stats increase. I know how to do it I just don't know how much I want it to rise per level =3

Quote:

Originally Posted by HIddenPanda
In the Headers of the file replace
PHP Code:

$themeurl grabanysetting("themeurl"); 

with
PHP Code:

$themeurl '..\\' grabanysetting("themeurl"); 

That should fix your problem

I'll test this as well :D Thank you both for the suggestions =3

PTGigi 12-05-2010 04:55 PM

RE: New Page errors
 
Quote:

Originally Posted by HIddenPanda
In the Headers of the file replace
PHP Code:

$themeurl grabanysetting("themeurl"); 

with
PHP Code:

$themeurl '..\\' grabanysetting("themeurl"); 

That should fix your problem

Sorry for the double post >.< But I tried your solution and it didn't work, so I flipped the \\ to a // and I can get the page but not the theme D: I tried this on both pages and I get the same result.

Kaeliah 12-06-2010 12:41 AM

RE: New Page errors
 
The problem is with the directories. Does the folder that the file is in also include the 'inc' folder with the appropriate files? If not that's your problem.

One solution is to copy the 'inc' folder into any subfolders, such as your explore subfolder. Try that and see if it works. ;)

PTGigi 12-08-2010 08:57 PM

RE: New Page errors
 
Thanks Kaeliah :D That worked! ^-^ (sorry for teh slow response D: )

Kaeliah 12-09-2010 09:18 PM

RE: New Page errors
 
:D No problem!


making this post longer for that silly error. :3


All times are GMT -5. The time now is 02:19 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.