View Full Version : Adding New Pages
Sinfullilblonde
12-03-2005, 03:56 PM
Hi,
We'd like to add a couple of our own pages to the script so they only way they can be access is by the members that are logged onto our site. Everything I have tired I keep getting an error message that the page can't be found or is not on the server. Is there a code that I need to put on the top of the page or something?
Thanks!
natio :: phpFox
12-04-2005, 03:13 AM
You just want to add a new php page to your site that only members can get to right?
if so a basic start page for the script is like so:
Content visible to registered users only.
Just note thet include() function, this page should be added in your root directory. So if you want to add a page in a folder like "/browse/" then the include should be:
Content visible to registered users only.
The protect(); function is what is used to protect that page for only members to view it.
The html_main() function is to display the html for that page.
Sinfullilblonde
12-04-2005, 04:01 AM
Thanks so much....
Sinfullilblonde
12-12-2005, 04:23 PM
I have added new pages as instructed above. Everyone seems to access the pages fine unless they are using safari and firefox. Is there someting I have to add for this to work on their browser? Below is what they told me happens when they try to access the pages we've added;
I've clicked on the link. I've been to the fun section and clicked on daily predictions. I never get anywhere. It always sends me to: my personal homepage. I do have a mac. I've tried it using two browsers safari and firefox.
Thanks :)
natio :: phpFox
12-12-2005, 04:50 PM
hhmm, yeah that should be working with that setup. Cause it how every page on the site is setup. hehe. By any chance did you add anything before the
Content visible to registered users only.
Cause anything added before that will not get buffered and browsers will have problems running the html. Also when a user views this new page, Do they see a page or just get directed to another page?
If you want you can send me the actual page to save time and i can have a quick look over it. You can pm it to me so it wont be added in the forums here.
tf@datatanks.com
12-22-2005, 04:50 PM
Hi I get this error when attempting this:
Parse error: parse error, unexpected T_SL in /web/sites/home/dragon/gothopia.com/public_html/tool.php on line 6
As you can see its in my root.
Here is what my page looks like:
<?php
include("inc/config/connect.inc");
protect();
$DATA =<<<HTML
HOW TO MAKE AN MP3 PLAYER FOR YOUR PAGE!
Right Click, Select All, Right Click again.
Paste where you want it to appear in your page!</a>
<textarea class="codecontainer" rows="8" name="S1" cols="45" wrap="virtual">
<object width="300" height="42">
<param name="src" value="http://www.yoursite/test.mp3">
<param name="autoplay" value="true">
<param name="controller" value="true">
<param name="bgcolor" value="#FF9900">
<embed src="gtr.mp3" autostart="true" loop="false" width="300" height="42" controller="true" bgcolor="#FF9900"></embed>
</object>
</textarea></p>
HTML;
html_main($DATA,"","");
?>
tf@datatanks.com
12-22-2005, 05:07 PM
Hi I get this error when attempting this:
Parse error: parse error, unexpected T_SL in /web/sites/home/dragon/gothopia.com/public_html/tool.php on line 6
As you can see its in my root.
Here is what my page looks like:
<?php
include("inc/config/connect.inc");
protect();
$DATA =<<<HTML
HOW TO MAKE AN MP3 PLAYER FOR YOUR PAGE!
Right Click, Select All, Right Click again.
Paste where you want it to appear in your page!</a>
<textarea class="codecontainer" rows="8" name="S1" cols="45" wrap="virtual">
<object width="300" height="42">
<param name="src" value="http://www.yoursite/test.mp3">
<param name="autoplay" value="true">
<param name="controller" value="true">
<param name="bgcolor" value="#FF9900">
<embed src="http://www.yoursite/test.mp3/gtr.mp3" autostart="true" loop="false" width="300" height="42" controller="true" bgcolor="#FF9900"></embed>
</object>
</textarea></p>
HTML;
html_main($DATA,"","");
?>
natio :: phpFox
12-23-2005, 08:58 PM
Content visible to registered users only.
did you get this to work? i just tested your script now and it seems to be working fine on the test server. If not the error your getting is a PHP error stated there is some char. after the <<<HTML
so look over the code you have and make sure there isnt a any char. after that field. If you still cant get it to work can you send over the actual script you have so i can look if over.
tf@datatanks.com
12-23-2005, 09:23 PM
Hi Mike,
where do i mail it to?
here is the exact code anyway:
<?php
include("inc/config/connect.inc");
protect();
$DATA =<<<HTML
<body bgcolor=#000000>
<center>
Content visible to registered users only. (http://revenuegateway.directtrack.com/z/628/CD1/)
<applet
codebase="http://client0.sigmachat.com/current/"
code="Client.class" archive="scclient_en.zip"
width=550 height=450 MAYSCRIPT>
<param name="room" value="101141">
<param name="cabbase" value="scclient_en.cab">
</applet>
HTML;
html_main($DATA,"","");
?>
natio :: phpFox
12-23-2005, 10:12 PM
hhmm, there seems to be a whitespace problem that isnt showing up on here cause the script works for me. what you can do instead is to do the script like this:
Content visible to registered users only.
if this way doenst work either just email your script to: support@phpfox.com
and add "Mike" in the Subject line.
coco3271
03-08-2006, 11:45 PM
Hi, how can I include a .php page and get the output?
I couldn't figure out to make it works
Content visible to registered users only.
natio :: phpFox
03-09-2006, 09:42 AM
Content visible to registered users only.
Hi coco3271,
When calling something and then having it output in the phpfox script it has to be called with the $DATA variable.
So say you have something like this:
Content visible to registered users only.
then the script will output test. Now since your including a php file how is it being outputed in that file. Is it using echo or print? or just variables that need to be echoed?
slotvent
08-08-2006, 03:11 PM
Content visible to registered users only.
What am i doin wrong im also trying to include a php page
wwobn
09-02-2006, 05:00 PM
Content visible to registered users only.
vBulletin® v3.6.10, Copyright ©2000-2009, Jelsoft Enterprises Ltd.