Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 03:59 am EST
Geeklog Forums
Custom Pages & Scripts
Ok, my plan is to use full database applications within Geeklog. So I went to clean code and try and create a blank page that would be ready for my own code.. I've gotten it down fine untill the "center blocks".
My Echo, displays at the very top (left). As seen here..
http://runearchives.net/cms_test/blank_page.php
Here's the code I'm playing with. What am I doing wrong? Any ideas or suggestions?
<?php
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// | Geeklog 1.4 |
// +---------------------------------------------------------------------------+
// | blank.php |
// | |
// | Geeklog blank page page. |
// +---------------------------------------------------------------------------+
//
// $Id: blank.php,v 1.0 Exp $
require_once('lib-common.php');
require_once( $_CONF['path_system'] . 'lib-admin.php' );
if (empty ($_USER['username']) &&
(($_CONF['loginrequired'] == 1) || ($_CONF['statsloginrequired'] == 1))) {
$display = COM_siteHeader('');
$display .= COM_startBlock ($LANG_LOGIN[1], '',
COM_getBlockTemplate ('_msg_block', 'header'));
$login = new Template($_CONF['path_layout'] . 'submit');
$login->set_file (array ('login'=>'submitloginrequired.thtml'));
$login->set_var ('login_message', $LANG_LOGIN[2]);
$login->set_var ('site_url', $_CONF['site_url']);
$login->set_var ('lang_login', $LANG_LOGIN[3]);
$login->set_var ('lang_newuser', $LANG_LOGIN[4]);
$login->parse ('output', 'login');
$display .= $login->finish ($login->get_var('output'));
$display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
$display .= COM_siteFooter();
echo $display;
exit;
}
$display .= COM_siteHeader();
if (isset ($_GET['msg'])) {
$display .= COM_showMessage (COM_applyFilter ($_GET['msg'], true),COM_applyFilter ($_GET['plugin']));
}
// Show any Plugin formatted blocks
// Requires a plugin to have a function called plugin_centerblock_<plugin_name>
$displayBlock = PLG_showCenterblock (1, $page, $topic); // top blocks
if (!empty ($displayBlock)) {
$display .= $displayBlock;
// Check if theme has added the template which allows the centerblock
// to span the top over the rightblocks
if (file_exists($_CONF['path_layout'] . 'topcenterblock-span.thtml')) {
$topspan = new Template($_CONF['path_layout']);
$topspan->set_file (array ('topspan'=>'topcenterblock-span.thtml'));
$topspan->parse ('output', 'topspan');
$display .= $topspan->finish ($topspan->get_var('output'));
$GLOBALS['centerspan'] = true;
}
}
echo "Hello world<p>";
$display .= COM_siteFooter(true);
echo $display;
?>
(Coypwrites and credits removed to save space for the mean time.
My Echo, displays at the very top (left). As seen here..
http://runearchives.net/cms_test/blank_page.php
Here's the code I'm playing with. What am I doing wrong? Any ideas or suggestions?
Text Formatted Code
<?php
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// | Geeklog 1.4 |
// +---------------------------------------------------------------------------+
// | blank.php |
// | |
// | Geeklog blank page page. |
// +---------------------------------------------------------------------------+
//
// $Id: blank.php,v 1.0 Exp $
require_once('lib-common.php');
require_once( $_CONF['path_system'] . 'lib-admin.php' );
if (empty ($_USER['username']) &&
(($_CONF['loginrequired'] == 1) || ($_CONF['statsloginrequired'] == 1))) {
$display = COM_siteHeader('');
$display .= COM_startBlock ($LANG_LOGIN[1], '',
COM_getBlockTemplate ('_msg_block', 'header'));
$login = new Template($_CONF['path_layout'] . 'submit');
$login->set_file (array ('login'=>'submitloginrequired.thtml'));
$login->set_var ('login_message', $LANG_LOGIN[2]);
$login->set_var ('site_url', $_CONF['site_url']);
$login->set_var ('lang_login', $LANG_LOGIN[3]);
$login->set_var ('lang_newuser', $LANG_LOGIN[4]);
$login->parse ('output', 'login');
$display .= $login->finish ($login->get_var('output'));
$display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
$display .= COM_siteFooter();
echo $display;
exit;
}
$display .= COM_siteHeader();
if (isset ($_GET['msg'])) {
$display .= COM_showMessage (COM_applyFilter ($_GET['msg'], true),COM_applyFilter ($_GET['plugin']));
}
// Show any Plugin formatted blocks
// Requires a plugin to have a function called plugin_centerblock_<plugin_name>
$displayBlock = PLG_showCenterblock (1, $page, $topic); // top blocks
if (!empty ($displayBlock)) {
$display .= $displayBlock;
// Check if theme has added the template which allows the centerblock
// to span the top over the rightblocks
if (file_exists($_CONF['path_layout'] . 'topcenterblock-span.thtml')) {
$topspan = new Template($_CONF['path_layout']);
$topspan->set_file (array ('topspan'=>'topcenterblock-span.thtml'));
$topspan->parse ('output', 'topspan');
$display .= $topspan->finish ($topspan->get_var('output'));
$GLOBALS['centerspan'] = true;
}
}
echo "Hello world<p>";
$display .= COM_siteFooter(true);
echo $display;
?>
(Coypwrites and credits removed to save space for the mean time.
14
11
Quote
Status: offline
destr0yr
Forum User
Full Member
Registered: 07/06/02
Posts: 324
You want it more like this: http://www.destr0yr.com/blank.php
Change:
to
I also changed: echo $display; on line 32 to return $display;, but it seems not to matter.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
Change:
Text Formatted Code
echo = "Hello World<p>"; to
Text Formatted Code
$display .= "Hello world<p>";I also changed: echo $display; on line 32 to return $display;, but it seems not to matter.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams
10
16
Quote
All times are EST. The time is now 03:59 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content