PDA

View Full Version : Trying to add a new .php page.


Saphira
05-25-2009, 12:27 PM
I'm trying to add a new .php page to my site, with the template etc. I've tried adding it through the pages, but that seems to disable all HTML output, and I'm trying to put a HTML script on the page. I'm trying to add:

<script src="http://static.blitzed.org/cgiirc.js"></script>
<form name="cgiirclogin" method="post" onsubmit="return openCgiIrc(this)" action="[link to cgi.irc file]">
<input type="hidden" name="interface" value="nonjs" />
<input type="hidden" name="Channel" value="#lobby" />
<label>Nickname: </label><input type="text" name="Nickname" value="NK???" />
<input type="submit" value=" Chat! " />
</form>

This works fine on a blank page, but I can't figure out how to add it to the article content so it shows up in the main body of a page. Can anyone help me? :S

BMR777
05-25-2009, 05:13 PM
Take a look at the blank.php file included with the script. You could add the code into that file by adding a line like:

$article_title = "Your page title here";
$article_content = "YOUR CODE HERE";

When entering code such as the above into the article_content variable you need to take any regular quotes such as " and modify them so they will work inside the variable. You can either replace " with ' single quotes in your code or you can escape the quotes in your code such as \" with backslashes. :)

Hope it helps,
Brandon

Saphira
05-25-2009, 06:09 PM
Once again, Brandon saves the day! I can't believe I overlooked the blank.php file. ¬.¬ Thanks for the help!