Version: 1.00, by c-pr0mpt
Developer Last Online: Apr 2004
Version: 2.2.x
Rating:
Released: 03-26-2002
Last Update: Never
Installs: 42
No support by the author.
This is a really simple hack. This is for adding other pages to your site all driven by the forums templates. This also has instructions for adding it to whos online!
This page is driven via the normal forum templates.
Sshot of admin area for this page:
Sshot of whos online if the person is on the page:
The instructions are for installing a page for a privacy statement. But just replace all instances of privacy, and privacy.php with the page you are creating. Very easy.
Instructions attached. :classic:
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Originally posted by stuuu
[B]I think the code is a bit too much to put into the php include template, as that is loaded with each page right?
Yes, its loaded with each page, so make sure that its only in the phpinclude template if it is used on each page.
Quote:
I have put it in the main file that calls the templates, but how do I get the template to place my code between the vB header and footer? It just appears below the footer at the moment
Not knowing what the code is, or what it outputs its hard for me to say.
The easiest was is to assign the output to a variable and place that variable in the template where your content goes.
Yes, its loaded with each page, so make sure that its only in the phpinclude template if it is used on each page.
Not knowing what the code is, or what it outputs its hard for me to say.
The easiest was is to assign the output to a variable and place that variable in the template where your content goes.
Yeah, its too much for phpincludes.
I have attached the output from when I was using PHPBB2, its basically a top 10 played audio clips, and the archive itself. They are output in a table format.
Any ideas? How do I put the whole file inside a variable that will use the style sheets of vB?
Originally posted by NTLDR If the output is just a sperate section of HTML just with PHP variables in and not any PHP code itself then just place that into the template instead.
Even though the code output is HTML, you cant put PHP inside the templates can you.
Originally posted by obiwan8472 Hi, great hack.
But I want to put this in
<? include ("vbforums/newstransfer.php"); ?>
It calls a news script I am using, however when I put it in the Templates it ignores it. Any ideas?
Tar.
The only template you can put PHP code in is the phpinclude template, it will not parse PHP in any other one. Add the include statment to the PHP file after it requires global.php.
The only template you can put PHP code in is the phpinclude template, it will not parse PHP in any other one. Add the include statment to the PHP file after it requires global.php.
This works, BUT if you place the include statment in the PHP file under the require global.php the file that you want to include will appear in the very top of the page!
To be more specific, if you want a page with your site's header (on the top) and footer (on the bottom) and you want to include another (external) page right in the middle then your solution doesn't work. At least not for me! :|
Same happens if you place the include statment in the phpinclude template. The only differense is that the included page gets displayed to EVERY VB file.
What would really be helpful in this is to define something like $newpage = include("http://the_included_page");
And then everywhere (in the templates) you place $newpage the included page should appear. Is this possible?