Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 03-30-2009, 01:23 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 96,160
Tequila is on a distinguished road
Default [Lock Please] Integrate script with php safe includes?

I am working on a design that uses Safe Dynamic Includes to navigate and display the site.

Is there any way to integrate the script into the coding I am doing for the site?

Here is a snippet of the code I'm working with if that helps.
Code:
<HTML>
<HEAD>
<TITLE>The World of Earith | Familiar Elements</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<link rel="stylesheet" href="style.css" type="text/css" />
<link rel="shortcut icon" href="images/favicon.ico" />
</HEAD>

<body><table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td class="clear">&nbsp;</td><td class="clear" width="25"></td><td class="content" width="400"><img src="images/mapblank.jpg" border="0" /></td></tr>
<tr><td colspan="3" class="clear"></td></tr>
<tr><td class="header">World Map</td><td class="clear" width="25"></td><td class="header">Welcome to Earith</td></tr>
<tr><td class="content" rowspan="4" valign="top">

<ul>
<li><a href="?x=tower">The Wizard's Tower</a></li>
<li><a href="?x=marketplace">The Marketplace</a><li>
<li><a href="?x=glenn">The Fairy Glenn</a></li>
<li><a href="?x=ruins">The Ruins</a></li>
</ul>
<h2>Apprentice Panel</h2>
<ul><li><a href="login.php">Return</a>
<li><a href="?x=dormitory">Your Dormitory</a></li>





</td><td class="clear" rowspan="4">&nbsp;</td><td class="content"><p>Welcome young apprentice. Here you can adopt a Familiar to help you grow in your magic abilities. Please join our <a href="http://forum.familiarelements.info" target="_blank">forum</a> after registering for the site to keep up to date.</p>
<p>Here you will find the animals that we have carefully bred from enhanced parents that will become wonderful familiars with magickal abilities.</p>
<p>Each familiar has it's own nuances and abilities, you'll have to wait until our Grimore is finished before you can figure out what your familiar can do.</p>

<p>A magickal world not unlike others, mystical and full of wonder.</p>

<p>Visit the Wizard's Tower to adopt a familiar to raise and train.  Take care of your familiar when you rest in the dormitory.</p>
<p>Learn more about Earith and the familiars you have access to through the Grimoire.  Spend some time at the Conclave with your peers and other fully trained wizards and witches.</p>

<p>Fund the efforts of the Tower Master and see who has helped and contributed to our world.</p>

</td></tr>
<tr><td class="clear">&nbsp;</td></tr>
<tr><td class="header">Updates</td></tr>
<tr><td class="content">
<p><!-- Twitter Please --->
<div id="twitter_div">
<h2 style="display: none;" >Twitter Updates</h2>

<ul id="twitter_update_list"></ul>
<a href="http://twitter.com/familiarelement" id="twitter-link" style="display:block;text-align:right;">follow me on Twitter</a>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/familiarelement.json?callback=twitterCallback2&amp;count=5"></script>
</p>





</td></tr>
<tr><td class="clear" colspan="3">&nbsp;</td></tr>
<tr><td class="header" colspan="3">Affiliates</td></tr>

<tr><td class="content" colspan="3"><center><a href="http://starduskstudios.net" target="_blank"><img src="http://i221.photobucket.com/albums/dd159/tlcportfolio/linkus/sds-button.jpg" border="0" alt="Stardusk Studios" title="Stardusk Studios" /></a> <a href="http://www.arvyre.com/" target="_blank"><img src="images/arvyre.png" border="0" alt="Arvyre" title="Arvyre" /></a> <a href="http://www.petsgalorespa.net" target="_blank"><img src="http://i44.tinypic.com/jufozk.gif" border="0" alt="Pets Galore Spa"></a><br />
<a href="http://www.kqzyfj.com/click-3414594-10653867" target="_blank">
<img src="images/image-3414594-10653867.htm" width="88" height="31" alt="DAZ 3D" title="Daz 3D" border="0"/></a> <a href="http://www.renderosity.com/index.php?AID=164" target="_blank"><img src="images/rosity.gif" border="0" alt="Renderosity" title="Renderosity" /></a><br /><a href="http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=enddayne-fepets" target="_blank"><img src="images/hostgator_green80x15.gif" border="0" alt="HostGator" title="HostGator"  /></a>
</center></td></tr>
<tr><td class="clear" colspan="3">&nbsp;</td></tr>
</table></div>
</BODY>
</HTML>
  #2  
Old 03-31-2009, 09:05 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 96,160
Tequila is on a distinguished road
Default RE: Integrate script with php safe includes?

I just had a thought Brandon. If I kill the template information for the script and insert the PHP codes for the script into the header of the site would that work? If so, what would I need to delete and where?
  #3  
Old 03-31-2009, 04:18 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,556
BMR777 is on a distinguished road
Default RE: Integrate script with php safe includes?

To kill the template system, in each file you would need to find and comment out / delete:

PHP Code:
echo $template
Then you would just echo the $article_content and $article_title variables out. These contain all of the text that is generated by the script for the most part. :)

You can also echo the other variables for the script out such as the one that controls if a user is logged in or not, or you can integrate that all some other way.
  #4  
Old 04-01-2009, 07:34 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 96,160
Tequila is on a distinguished road
Default RE: Integrate script with php safe includes?

All right. Now that I know what to get rid of I'll be able to get the new layout up for users soon. They'll be happy about that.
  #5  
Old 04-01-2009, 08:52 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 96,160
Tequila is on a distinguished road
Default RE: Integrate script with php safe includes?

I'm doing this in a beta subdomain, and I'm getting this error now:
Code:
Parse error: syntax error, unexpected $end in /home/enddayne/public_html/beta/header.php on line 248
Line 248 is the end of the header.php file which tells the includes to end the header and input the default page.
PHP Code:
</td><td class="clear" rowspan="4">&nbsp;</td><td class="content"
So do I have to change the way I have the site setup? Put the header and footer in the index file and leave the
PHP Code:
<?php if (isset($_GET['x'])) {
   if (
strpos($_GET['x'], "/")) {
      
$dir substr(str_replace('..'''$_GET['x']), 0strpos($_GET['x'], "/")) . "/";
      
$file substr(strrchr($_GET['x'], "/"), 1);
      if (
file_exists($dir.$file.".php")) {
         include(
$dir.$file.".php");
      } else {
         include(
"world.php");
      }
   } else {
      if (
file_exists(basename($_GET['x']).".php")) {
         include(
basename($_GET['x']).".php");
      } else {
         include(
"world.php");
      }
   }
} else {
   include(
"world.php");
?>
between?
  #6  
Old 04-01-2009, 04:25 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,556
BMR777 is on a distinguished road
Default RE: Integrate script with php safe includes?

Is that the whole code of header.php? What is the link to this so I can take a look.
  #7  
Old 04-01-2009, 04:56 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 96,160
Tequila is on a distinguished road
Default RE: Integrate script with php safe includes?

I've got some sections of it sorted out, but there are still errors popping up (register2, can't display login box in sidebar).

The link is http://beta.familiarelements.info, I've been adding
PHP Code:
?x=pageid 
at the end of the address to display the page I want.
  #8  
Old 04-02-2009, 10:39 AM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 96,160
Tequila is on a distinguished road
Default RE: Integrate script with php safe includes?

New development, working on editing register2.php
Code:
Parse error: syntax error, unexpected T_IF, expecting ',' or ';' in /home/enddayne/public_html/beta/register2.php on line 19
PHP Code:
<?
//Protect the database
$username preg_replace("/[^a-zA-Z0-9\\040.]/"""$username);
$pass1 preg_replace("/[^a-zA-Z0-9s]/"""$pass1);
$pass2 preg_replace("/[^a-zA-Z0-9s]/"""$pass2);
$email preg_replace("/[^a-zA-Z0-9@._-]/"""$email);
$tos preg_replace("/[^a-zA-Z0-9s]/"""$tos);

// Connect to our database

$conn mysql_connect($dbhost$dbuser$dbpass) or die ('Error connecting to mysql database!');
mysql_select_db($dbname);

//Check for errors...
if($username == "" or $pass1 == "" or $pass2 == "" or $email == ""){

echo(
"A required form element was left blank.  Please <a href='register.php'>go back</a> and fill out all the form elements and try again.")

if(
$tos != 'tosyes'){
echo 
"You did not agree to the Terms of Service.  You must agree to the TOS to use this site."

}

if(
$pass1 != $pass2){
echo 
"Your passwords do not match.  Please <a href="register.php">go back</a> and correct this issue."

die();
}

//Check that username does not already exist

$query "SELECT * FROM users WHERE username = '$username'";
$result = @mysql_query($query);
$num = @mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$luser=@mysql_result($result,$i,"username");


$i++;
}

$luser strtolower($luser);
$u2 $str strtolower($username);

if(
$luser == $u2){
echo 
"Your username has been taken.  Please <a href="register.php">go back</a> and select a different username."

die();
}

//All checks pass, create the user
$pass1 md5($pass1); //MD5 the password
mysql_query("INSERT INTO users VALUES ('', '$username', '$pass1','$email','free','0')"); 

echo 
"Your account has been created with the username '.$username.'.  <a href="login.php">Click here to log in to your account.</a>"


?>
  #9  
Old 04-02-2009, 02:36 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,556
BMR777 is on a distinguished road
Default RE: Integrate script with php safe includes?

This line is incorrect:

PHP Code:
echo("A required form element was left blank.  Please <a href='register.php'>go back</a> and fill out all the form elements and try again."
Should be:

PHP Code:
echo "A required form element was left blank.  Please <a href='register.php'>go back</a> and fill out all the form elements and try again."
BMR777
  #10  
Old 04-03-2009, 01:47 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 96,160
Tequila is on a distinguished road
Default RE: [Lock Please] Integrate script with php safe includes?

I'm just going to scrap this. Did some editing and now the site works fine. Going to have to do a new template though...
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forum Integrate Not Working AlexC Questions and Supports 11 11-26-2013 06:29 AM
How would I integrate Adoptables to a user system? wilfred888 Questions and Supports 5 10-19-2010 04:49 AM
[Lock Please] Account changes Tequila Questions and Supports 6 08-01-2009 02:27 PM


All times are GMT -5. The time now is 04:01 AM.

Currently Active Users: 678 (0 members and 678 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636