[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.369,1.370
blaine at iowaoutdoors.org
blaine at iowaoutdoors.org
Sat Aug 28 23:44:06 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv31381/public_html
Modified Files:
lib-common.php
Log Message:
Added logic to support COM_showTopic, COM_userMenu and COM_adminMenu to use custom templates for the option.thtml and option_off.thtml using the theme's functions.php.
Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.369
retrieving revision 1.370
diff -C2 -d -r1.369 -r1.370
*** lib-common.php 28 Aug 2004 12:00:12 -0000 1.369
--- lib-common.php 29 Aug 2004 03:44:03 -0000 1.370
***************
*** 1842,1846 ****
{
global $_CONF, $_TABLES, $_USER, $_GROUPS, $LANG01, $HTTP_SERVER_VARS,
! $_THEME_URL, $page, $newstories;
$sql = "SELECT tid,topic,imageurl FROM {$_TABLES['topics']}";
--- 1842,1846 ----
{
global $_CONF, $_TABLES, $_USER, $_GROUPS, $LANG01, $HTTP_SERVER_VARS,
! $_THEME_URL, $_BLOCK_TEMPLATE, $page, $newstories;
$sql = "SELECT tid,topic,imageurl FROM {$_TABLES['topics']}";
***************
*** 1873,1878 ****
$retval = '';
$sections = new Template( $_CONF['path_layout'] );
! $sections->set_file( array( 'option' => 'topicoption.thtml',
! 'inactive' => 'topicoption_off.thtml' ));
$sections->set_var( 'site_url', $_CONF['site_url'] );
$sections->set_var( 'layout_url', $_CONF['layout_url'] );
--- 1873,1884 ----
$retval = '';
$sections = new Template( $_CONF['path_layout'] );
! if (isset($_BLOCK_TEMPLATE['topicoption'])) {
! $templates = explode( ',', $_BLOCK_TEMPLATE['topicoption'] );
! $sections->set_file( array( 'option' => $templates[0],
! 'current' => $templates[1] ));
! } else {
! $sections->set_file( array( 'option' => 'topicoption.thtml',
! 'inactive' => 'topicoption_off.thtml' ));
! }
$sections->set_var( 'site_url', $_CONF['site_url'] );
$sections->set_var( 'layout_url', $_CONF['layout_url'] );
***************
*** 2005,2009 ****
function COM_userMenu( $help='', $title='' )
{
! global $_TABLES, $_USER, $_CONF, $LANG01, $HTTP_SERVER_VARS;
$retval = '';
--- 2011,2015 ----
function COM_userMenu( $help='', $title='' )
{
! global $_TABLES, $_USER, $_CONF, $LANG01, $_BLOCK_TEMPLATE, $HTTP_SERVER_VARS;
$retval = '';
***************
*** 2012,2017 ****
{
$usermenu = new Template( $_CONF['path_layout'] );
! $usermenu->set_file( array( 'option' => 'useroption.thtml',
! 'current' => 'useroption_off.thtml' ));
$usermenu->set_var( 'site_url', $_CONF['site_url'] );
$usermenu->set_var( 'layout_url', $_CONF['layout_url'] );
--- 2018,2029 ----
{
$usermenu = new Template( $_CONF['path_layout'] );
! if (isset($_BLOCK_TEMPLATE['useroption'])) {
! $templates = explode( ',', $_BLOCK_TEMPLATE['useroption'] );
! $usermenu->set_file( array( 'option' => $templates[0],
! 'current' => $templates[1] ));
! } else {
! $usermenu->set_file( array( 'option' => 'useroption.thtml',
! 'current' => 'useroption_off.thtml' ));
! }
$usermenu->set_var( 'site_url', $_CONF['site_url'] );
$usermenu->set_var( 'layout_url', $_CONF['layout_url'] );
***************
*** 2146,2150 ****
function COM_adminMenu( $help = '', $title = '' )
{
! global $_TABLES, $_USER, $_CONF, $LANG01, $LANG_PDF, $HTTP_SERVER_VARS;
$retval = '';
--- 2158,2162 ----
function COM_adminMenu( $help = '', $title = '' )
{
! global $_TABLES, $_USER, $_CONF, $LANG01, $_BLOCK_TEMPLATE, $LANG_PDF, $HTTP_SERVER_VARS;
$retval = '';
***************
*** 2164,2169 ****
$adminmenu = new Template( $_CONF['path_layout'] );
! $adminmenu->set_file( array( 'option' => 'adminoption.thtml',
! 'current' => 'adminoption_off.thtml' ));
$adminmenu->set_var( 'site_url', $_CONF['site_url'] );
$adminmenu->set_var( 'layout_url', $_CONF['layout_url'] );
--- 2176,2187 ----
$adminmenu = new Template( $_CONF['path_layout'] );
! if (isset($_BLOCK_TEMPLATE['adminoption'])) {
! $templates = explode( ',', $_BLOCK_TEMPLATE['adminoption'] );
! $adminmenu->set_file( array( 'option' => $templates[0],
! 'current' => $templates[1] ));
! } else {
! $adminmenu->set_file( array( 'option' => 'adminoption.thtml',
! 'current' => 'adminoption_off.thtml' ));
! }
$adminmenu->set_var( 'site_url', $_CONF['site_url'] );
$adminmenu->set_var( 'layout_url', $_CONF['layout_url'] );
More information about the geeklog-cvs
mailing list