Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
4 registered (johnH, Pink Jazz, sbserves, 1 invisible), 14 Guests and 21 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 09/18/08
Posts: 16
Top Posters (30 Days)
Ruben Rocha 165
Rick 116
Gizmo 105
Thelockman 61
driv 52
AllenAyres 35
ScriptKeeper 34
Mark S 30
Ian 29
ntdoc 26
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Topic Options
Rate This Topic
#168596 - 11/19/06 05:53 PM Include cgi or pl in headers, incerts, or teplates
A.J. Drew Offline
stranger

Registered: 08/14/06
Posts: 15
I want to include .cgi programs (like banners) in UBB 7.x headers, footers, templates, or the likes. I have tried many attempts, am reasonably sure I can do it in PHP, but have not been successful.

Top
#168601 - 11/19/06 07:27 PM Re: Include cgi or pl in headers, incerts, or teplates [Re: A.J. Drew]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 11968
Loc: Portland, OR; USA
You should be able to do it with a simple php include:
Code:
<?php include("http://www.yoursite.tld/cgi-bin/scriptname.php"); ?>
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#168609 - 11/20/06 02:24 AM Re: CGI Include in templates [Re: Gizmo]
A.J. Drew Offline
stranger

Registered: 08/14/06
Posts: 15
Oh if it were that easy. PHP code does not seem work from within templates and my host dissallows html calls in php for security reasons.

What I have found works just fine in a php page is a system call

system( '/usr/bin/perl some_cgi.cgi' );

But this does not work in a template. My goal is to get the .cgi program to execute and diaplay in the body of the page.

Top
#168612 - 11/20/06 02:59 AM Re: CGI Include in templates [Re: A.J. Drew]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 11968
Loc: Portland, OR; USA
ahh yes, the dreaded lack of smarty knowledge on my part...
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#168700 - 11/21/06 09:09 AM Re: CGI Include in templates [Re: Gizmo]
A.J. Drew Offline
stranger

Registered: 08/14/06
Posts: 15
Got it:

Executing php inside smarty:

{php}
any statement
{/php}

Top
#168719 - 11/21/06 01:59 PM Re: CGI Include in templates [Re: A.J. Drew]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 11968
Loc: Portland, OR; USA
go figure it'd be something easy... I really need to find some ebooks on it when i get some time lol
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#168812 - 11/22/06 02:47 PM Re: CGI Include in templates [Re: Gizmo]
A.J. Drew Offline
stranger

Registered: 08/14/06
Posts: 15
Ye, now the problem is that it is php that is executing the .cgi and php does not seem able to pass variables. If you add ?whatever=whatever the thing dies.

Top


Shout Box

Today's Birthdays
daveylondon
Recent Topics
restricting a media tag to a single forum...
by bakerzdosen
Today at 12:52 PM
Recover topics??
by femistyle
Today at 12:22 PM
duplicate entries in viewmessage.php lang file (7.4.1)
by alnadabi
Today at 05:54 AM
Order of variables in language files should be permanent
by alnadabi
Today at 05:12 AM
How do I set Moderation Queue for an individual user?
by luket
Yesterday at 11:28 AM
Forum Stats
4249 Members
33 Forums
30488 Topics
154658 Posts

Max Online: 978 @ 06/24/07 08:19 PM