PDA

View Full Version : converting .php to .phtml extensions


jonlevine
Sun 19th May '02, 7:44pm
I am using vBulletin 2.2.5 which is generating pages with the .php extension. The problem is that my host uses (and therefore, so do I) a banner serving program with scripts that only run on pages with .phtml extensions. Because of this, I am able to show ads on my whole site, EXCEPT my forum pages (which are the most important).

My host's tech support says that they are unable to make their ad program scripts run on anything but .phtml pages and therefore I need to change the vBulletin software to serve pages with that extension.

What is the best way to do this? Should I downgrade to the php3 version of vBulletin? Is there some kind of htaccess code I can write? Unfortunately, I'm pretty new to this whole php/MySQL thing and I'm somewhat lost.

Any and all help would be appreciated.

Dimava
Sun 19th May '02, 7:56pm
you can make a file on your server called ads.phtml where you can put the code for the ads, and then put this code in on the forum pages that people can goto, like index.php, showthread.php, etc. not files like global.php

here's the code you'd need to use:


<?php include("ads.phtml"); ?>


-Dimava

jonlevine
Sun 19th May '02, 11:08pm
Thank you very much for your response.

I'm guessing that if I need to place multiple ads on the same page I can just make multiple ads.phtml pages(ie: ads1, ads2, etc.) then the reflective code into the pages themselves.

I'm going to try this now.

Thanks again.

jonlevine
Sun 19th May '02, 11:22pm
I followed your instructions, but it's not working.

I placed the ads.phtml on my server, then put the code into the page, but it does not display.

I can navigate to the page from the browser by typing the address of the ads.phtml page, and it shows up, so the page works. But, I cannot integrate it into the forum page.

You didn't specify in your post, but I tried several techniques for navigating to ads.phtml. I placed the full URL between the quotes, the server path, and leaving it alone. None worked.

Please advise.

Dimava
Sun 19th May '02, 11:32pm
can you post the contents of the .phtml file

-Dimava

jonlevine
Sun 19th May '02, 11:39pm
here is the ads.phtml code:
__________________________________________
<?
require("$DOCUMENT_ROOT/adserver/config.inc.php3");
require("$DOCUMENT_ROOT/adserver/view.inc.php3");
?>
<html>
<head>
<title>demo</title>
</head>
<body>
<?
view("468x60","theatermania");
?>
</body>
</html>
_________________________________________

Thanks.