SitePoint Sponsor |
|
User Tag List
Results 1 to 13 of 13
Thread: PHP and SSI Problems
-
Jan 15, 2001, 09:13 #1
- Join Date
- Aug 2000
- Location
- Manchester, UK
- Posts
- 1,046
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Guys, I've a real niggly problem and I don't know what to do.
I'm currently working on version 3 of Poplicious.Com. I want to include a community in it, and have bought and set up vBulletin for that purpose, but not opened it yet while I finalise the new site design and the forum templates.
Now on my new design, I'm using a very clever ad management system called AdCycle that uses a mySQL database to track and deliver ads. The ads are put into the pages by calling the script in an SSI call. All the pages of my site have the .shtml extension, as my the SSI calls won't work without this extension.
The thing is, I want to run some small ads on my forums, but of course because all the vBulletin pages have the .php extension they're not recognising the server side includes.
Is there another way to deliver the ads? I've heard of iframes but i'm a little dubious cos i'd heard they're not fully cross browser compatible. If a browser doesn't support them, does it just ignore the tag or go horribly wrong? Is changing vBulletin's default file extension possible? I don't know PHP so if it's complicated i'll not try it.
Any help here would be greatly appreciated.
Adyv-technologies - Freelance Goodness.
-
Jan 15, 2001, 09:22 #2
- Join Date
- Oct 1999
- Location
- Dublin, Ireland
- Posts
- 1,125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
PHP has it's own include which i'm sure you can call your ads with.
Edit the vBulletin templates and add
include("path/to/ssipage.shtml")
and it should work.
If you want more help you can email me and i'll try to help you get it setup.
-
Jan 15, 2001, 09:32 #3
- Join Date
- Aug 2000
- Location
- Manchester, UK
- Posts
- 1,046
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks very much for the prompt reply Keith. I'll give that a go when I get home from work tonight and keep you posted.
One quick query. The included file is actually a .cgi script. Will the php include handle that ok?
Adyv-technologies - Freelance Goodness.
-
Jan 15, 2001, 09:33 #4
- Join Date
- Oct 1999
- Location
- Dublin, Ireland
- Posts
- 1,125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, it is able to include a cgi script also.
-
Jan 15, 2001, 09:35 #5
- Join Date
- Aug 2000
- Location
- Manchester, UK
- Posts
- 1,046
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Excellent. Thanks again!
Adyv-technologies - Freelance Goodness.
-
Jan 15, 2001, 10:18 #6
- Join Date
- Aug 1999
- Location
- Lancaster, Ca. USA
- Posts
- 12,305
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
You need to read the vBulletin manual on how to include SSI in your vbulletin pages. As of right now you can only parse the header and footer templates and it is kind of tricky. You can't just include code in the templates or the system can break.
From the online Manual (http://vbulletin.com/manual)
You can, optionally, set the header and/or footer to be parsed as PHP code. Doing this will allow you to put support for webadverts or other adservers into the header. For calling perl scripts, you will want to use this function:
http://www.php.net/manual/function.passthru.html
-
Jan 15, 2001, 10:30 #7
- Join Date
- Oct 1999
- Location
- Dublin, Ireland
- Posts
- 1,125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for clearing that up Wayne.
Adrian, it might be a better idea using a service like CJ.com or similar, that only requires a link to a javascript file (kinda like the way SPs tipfeed works).
That's the way I have my forums ( http://www.webdevforums.com ) setup.
-
Jan 15, 2001, 11:36 #8
- Join Date
- Aug 2000
- Location
- Manchester, UK
- Posts
- 1,046
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'd considered that Keith. The ads i'm running currently are cj.com ads but the reason I want to use adcycle for my ad management is that it's far superior in terms of delivery and tracking. Also, later on if I get chance to sell or trade advertising on my forums, I'll need it's ability to track impressions and click-thru ratios. Something you can't do with cj.com. I think for now i'll leave the ads off, or run them directly from cj.com, at least until I get it working with the script.
Thanks for your help.
Adyv-technologies - Freelance Goodness.
-
Jan 15, 2001, 20:04 #9
God i cant believe nobody knows this anyways. To include a file when you are using adcycle, dont even try include()
virtual() is the function that works
-
Jan 19, 2001, 08:21 #10
- Join Date
- Aug 2000
- Location
- Manchester, UK
- Posts
- 1,046
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Guys,
I've just now found out AdCycle can handle standard HTML output to run ads so went ahead and pasted this HTML into my vBulletin header template:
Code:<!-- START ADCYCLE.COM MEDIA CODE --> <a href="http://www.poplicious.com/cgi-bin/adcycle/adclick.cgi?manager=adcycle.com&id=1" target="_top"> <img src="http://www.poplicious.com/cgi-bin/adcycle/adcycle.cgi?group=1&media=1&id=1" width=468 height=60 border=0 ALT="Click to Visit"></a> <!-- END ADCYCLE.COM MEDIA CODE -->
Have a look at http://www.popliciousforums.com to see what I mean.
Help!
Adyv-technologies - Freelance Goodness.
-
Jan 19, 2001, 16:30 #11
- Join Date
- Jan 2001
- Location
- Chapel Hill, NC
- Posts
- 160
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Isn't virtual() supposed be used, not include()? I thought include() was for php files, while virtual() was to execute SSI and cgi scripts?
-
Jan 19, 2001, 16:31 #12
- Join Date
- Jan 2001
- Location
- Chapel Hill, NC
- Posts
- 160
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Oops, ignore that last post. I saw the answer above :-D
-
Jan 21, 2001, 15:32 #13
- Join Date
- Apr 2000
- Posts
- 1,483
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm not sure this will work at all, but its worth a try
Set your Header to parse php code (in general options), then put this in the header template:
Code:$header = implode('', file(http://mydomain.com/includes/whatever.cgi'));
Code:$header = "<b>this is the header</b>" . implode('', file('http://www.mydomain.com/includes/whatever.cgi')) . "more of the header";
I know implode works with PHP files but have no idea for CGI files.
<Edited by James on 01-21-2001 at 03:35 PM>
Bookmarks