Integration with Trellis Desk

2 posts by 2 authors in: Forums > CMS Builder
Last Post: March 27, 2009   (RSS)

By everbatim - March 27, 2009 - edited: March 27, 2009

I'm using a free support desk system called Trellis Desk in my site. On the Trellis desk pages, I'm still using CMS builder to control the main menu at the top of the screen as well as an information block in my header, so I have to keep the CMS Builder code in those pages. My problem is that no matter where I place the CMS code on the index.php page, it does not allow CMS Builder to display the content. Trellis works fine, but it's like CMS is just being ignored.

Here is the code for my entire Trellis Desk index.php page. Perhaps someone is familiar with this?

----------------------------------------------------------
<?php

require_once "/hsphere/local/home/c163167/eclipsewebinars.com/cms/lib/viewer_functions.php";

list($latest_newsRecords, $latest_newsMetaData) = getRecords(array(
'tableName' => 'latest_news',
'where' => whereRecordNumberInUrl(1),
'loadUploads' => '0',
'limit' => '1',
));
$latest_newsRecord = @$latest_newsRecords[0]; // get first record

list($main_menuRecords, $main_menuMetaData) = getRecords(array(
'tableName' => 'main_menu',
'where' => whereRecordNumberInUrl(1),
'loadUploads' => '0',
'limit' => '1',
));
$main_menuRecord = @$main_menuRecords[0]; // get first record

list($text_barRecords, $text_barMetaData) = getRecords(array(
'tableName' => 'text_bar',
'where' => whereRecordNumberInUrl(1),
'loadUploads' => '0',
'limit' => '1',
));
$text_barRecord = @$text_barRecords[0]; // get first record

list($website_themeRecords, $website_themeMetaData) = getRecords(array(
'tableName' => 'website_theme',
'where' => whereRecordNumberInUrl(1),
'loadUploads' => '0',
'limit' => '1',
));
$website_themeRecord = @$website_themeRecords[0]; // get first record


#=============================
# Safe and Secure
#=============================

ini_set( 'register_globals', 0 );

if ( function_exists('date_default_timezone_get') )
{
date_default_timezone_set( date_default_timezone_get() );
}

if ( @ini_get( 'register_globals' ) )
{
while ( list( $key, $value ) = each( $_REQUEST ) )
{
unset( $$key );
}
}

#=============================
# Itsy Bitsy Stuff
#=============================

define( 'IN_HD' , 1 );

#ini_set( 'display_errors', 1 );
error_reporting( E_ERROR | E_WARNING | E_PARSE );

#=============================
# Define Our Paths
#=============================

define( "HD_PATH", "./" );
define( 'HD_INC', HD_PATH ."includes/" );
define( 'HD_SRC', HD_PATH ."sources/" );
define( 'HD_SKIN', HD_PATH ."skin/" );

define( 'HD_DEBUG', false );

#=============================
# Main Class
#=============================

require_once HD_INC . "ifthd.php";
$ifthd = new ifthd();

#=============================
# Are We Banned?
#=============================

$banned_users = explode( "\r\n", strtolower( $ifthd->core->cache['config']['ban_names'] ) );
$banned_emails = explode( "\r\n", strtolower( $ifthd->core->cache['config']['ban_emails'] ) );
$banned_ips = explode( "\r\n", strtolower( $ifthd->core->cache['config']['ban_ips'] ) );

if ( in_array( strtolower( $ifthd->member['name'] ), $banned_users ) || ( $ifthd->member['email'] && in_array( strtolower( $ifthd->member['email'] ), $banned_emails ) ) || in_array( strtolower( $ifthd->input['ip_address'] ), $banned_ips ) )
{
$ifthd->skin->error('no_perm_banned');
}

#=============================
# Other Junk
#=============================

$choice = array(
'article' => 'article',
'kb' => 'article',
'myaccount' => 'account',
'feed' => 'feed',
'portal' => 'portal',
'pages' => 'pages',
'news' => 'news',
'register' => 'register',
'tickets' => 'tickets',
);

#=============================
# Require & Run
#=============================

$required = $choice[ $ifthd->input['act'] ];

if ( ! isset( $required ) )
{
$required = 'portal';
}

require_once HD_SRC . $required .".php";

$run = new $required();
$run->ifthd =& $ifthd;

$run->auto_run();

?>