Log in

View Full Version : vbulletin on an html???



lilfabbro
10-30-2009, 06:30 AM
im trying to throw my forums onto my home page to see what im talking about see My Site (http://www.dirtrif.com) i have my main page which is ajax on an html


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mmm... Ajax!</title>
<script type="text/javascript" src="jquery.js"></script>
<style type="text/css">
@import url(css.css);
</style>
<script type="text/javascript" src="js.js"></script>
</head>
<body>
<div id="wrapper">
<h1>ajax ... nettuts</h1>
<ul id="nav">
<li><a href="index.html">welcome</a></li>
<li><a href="about.html">about</a></li>
<li><a href="portfolio.html">portfolio</a></li>
<li><a href="contact.html">contact</a></li>
<li><a href="terms.html">terms</a></li>
</ul>
<div id="content">
Heres were i want the PHP
</div>
<div id="foot"> ........... </div>


</div>
</body>
</html>

the PHP code that i want there is the vbulletin index.php ill include that as attachment

NOTE: CHANGE CSS TO PHP ON THE INCLUDED FILE I DID THAT SO I WOULDNT HAVE TO ZIP IT


CAN SOME ONE PLEASE HELP ME

shirahug
10-30-2009, 10:03 AM
[Spam removed.]

lilfabbro
10-30-2009, 03:14 PM
what? dude you make no sence what are you talking about

djr33
10-30-2009, 03:47 PM
Including one page inside another is complex because of how the code will interact with the rest of the page once it is there.

However, it is very easy to just get the code there:
http://www.php.net/manual/en/function.include.php

<?php include('your/path/to/page.php'); ?>

And it will merge the two. Getting them to function properly is another thing entirely.

html and php are the same, except that php is first run through the php parser: if you want php on an html page, make it a php page as well. So change the first page to php and include the other php page into it, and see where you are, but be warned it won't be that simple in many cases, especially with something complex like a forum.

Nile
10-30-2009, 03:48 PM
Aww man!!! djr33 beat me! Hopefully mine can help a little bit more then his does.

It was spam. Irrelevant spam. A moderator fixed the message, and made it: [Spam removed.]

Now for some relevancy:
Change index.html in your root directory to index.php. Then where you want the php to show up, put this:


<?php
include('file.php');
?>

Replace file.php with then file you want..

Good luck!!

lilfabbro
11-12-2009, 06:34 AM
ill give both methods a try thx guys