INCLUDING CGI OUTPUT IN PHP PAGE

Streder posted 9th of April 2008 in Community Voice. 4 comments.
Here is one hell of a brain teaser.

I have a calendar that I have been using for years.  The fans are all well connected to it, and they want to be able to maintain the continuity.  I would use the events section of Dolphin, but its way to geared to a dating script.  I cant have female and male attendees and/or ticket prices.  I just need THIS calendar to display in one of my pages.

http://www.ederfan.com/cal/calendar.pl

Now, it is possible to include it in the new template as you see here:

__include _header.html__
<!--#exec cgi="../../cal/calendar.cgi"-->                       
<!-- to display the dynamic content from my_page.php you need to input: -->
        __page_main_code__
__include _footer.html__

Giving us this result:

http://www.ederfan.com/templates/tmpl_uni/page_102.shtml


Now here's where it gets sticky.  To include a custom page in Dolphin, you need to reference the template in the corresponding PHP page - in this case http://www.ederfan.com/tour.php

BUT - the PHP page scripting only references the page number - not the fact that its an SHTML page:

require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );

$_page['name_index'] = 102; // this is the number of the html page linked with this php file; change it as you wish
$_page['css_name'] = 'disc.css'; // this is the name of the CSS file linked with the above mentioned HTML file; change it as you wish
check_logged();
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompMainCode();


So how the heck can I get the PHP to reference the template?

Is there a way to call the CGI script directly?

I really need this answer gang.

Thanks,

Streder
 
Comments
·Oldest
·Top
Please login to post a comment.
DavidP
I am totally new to Dolphin but it would appear to me that such inclusions would be best served by an I-Frame in the way Joomla does it. As it is now, Dolphin does not have the option to do this automatically.

If you could create an i-frame page and put the calendar in the frame, it would function as it has in the past and would run independent of your Dolphin install. Would that suffice?

D
Streder
I will give it a try!

Thanks for the idea

S
Streder
Worked wonderfully

C
goodguyndfw
Interesting but some browsers are set to ignore iframes. Have you tested it on a wide variety of browser brands and versions?

I need a different style event section than native to Boonex too. Open to suggestions.
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.048973083496094