Zalbard - Ok, Here are instrutions to turn this hack into a portal. It will require a little work, but if you read carefully and follow these instructions you shouldn't have any problems.
First make a copy of the mYvBindex file and rename it "include.php" (of course you can call it whatever you'd like, that's just what I called mine). Then you should remove the parts of the script that are not used on those pages such as news, polls, weather, and calendar in my case. You don't really
have to delete those parts, but it makes for a little faster loading time and less queries, so it really is best if you do. If you just start wherever the code for a specific function begins and remove all code up to where the next function begins it should work fine, and there are notes in the script telling where each part starts. Then you would want to create a new template in your Admin CP (I called mine "include"). You would put the same content in your include template that is in your index template, but you would cut out the $newsbits and everything below that. Then in your include.php file the last couple of lines looks like this:
PHP Code:
$getbgrow=getrowcolor();
eval("dooutput(\"".gettemplate('index')."\");");
Change the template there to "include" (or whatever you named your new template). Then near the top of the file you will see a list of every template the scipt uses. Be sure to change the very first place it says index to the name of your include file. You can also delete any templates in that section that won't be used with this file. It's not that big of a deal if you don't, but again it would be better to do so and will result in faster page loading times.
Now you will pretty much have your header file made. Next you would want to edit your html pages that you would like this header to appear on. There are a couple of ways to do this, so here are the best/easiest two.
One way is with the php include function. You will need to remove everything above the top of your files so that the only thing before any content is something like this:
PHP Code:
<?php
include('/home/path/to/your/include.php');
?>
Remember that should be the only code before any content of your pages. You will also have to rename any html files you change to have a php extension for that method to work. You do not need to have any <head> or <body > tags at the beginning as these will be pulled from the include template, but be sure to close them at the end of the files. Also be sure that the starting <hmtl> tag is not also in your include template. Then just upload the files to your server and it should work fine.
An alternative to using the PHP include function would be to use server side includes. You would do everything exactly the same except when editing your files to add the header, you would put some code like this at the very top of your file instead of the PHP tag:
Code:
<html><!--#include virtual="/include.php" -->
You will also not have to rename your html files to have php extensions if you use that method. One note though... You will have to be sure you can include php files on your server. This is something that is usually controlled by your host, so if you're not sure if you can do this or how to change it so that you can, you should contact your host and ask them to change it for you.
That should be everything you need to do. If you have any problems let me know and I'll do my best to help you out.