http://www.icyphoenix.com/viewtopic.php?f=4&t=8610&p=56152#p56152
-----------------------------------
Mighty Gorgon
Thu 02 Aug, 2012 22:49

CUSTOMIZATION - Create A Custom Page In Icy Phoenix 2.0
-----------------------------------
Since many users already asked how to create an empty page into Icy Phoenix 2.0 to insert custom content, I have decided to create this small tutorial.

There several ways to create custom pages, here are 2 different approaches:

[list=1][*]Create a CMS page (with the "central_block") and add the content into a custom block, so you can output whatever you like by creating a proper function. Just duplicate a block, and add in the function your content, something like this:
[codeblock filename="block_myblock.php" syntax="php"]<?php
/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

if (!defined('IN_ICYPHOENIX'))
{
	die('Hacking attempt');
}

if(!function_exists('cms_block_myblock'))
{
	function cms_block_myblock()
	{
		global $db, $cache, $config, $template, $theme, $images, $user, $lang, $table_prefix, $block_id, $cms_config_vars, $cms_config_layouts, $cms_page;

		$mycontent = '<b>My Fantastic Page</b>';
		$template->assign_vars(array(
			'MYCONTENT' => $mycontent,
			)
		);

	}
}

cms_block_myblock();

?>[/codeblock]
Then you just need to create a tpl called [b]myblock_block.tpl[/b] in [i][u]templates/default/blocks/[/u][/i] with this content:
[codeblock filename="myblock_block.tpl"]{MYCONTENT}[/codeblock]

Then just add the block to the page and you are done.
[*]As a second option you can create an empty PHP page like this:
[codeblock filename="mypage.php" syntax="php"] <?php
/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(IP_ROOT_PATH . 'common.' . PHP_EXT);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management

$mycontent = '<b>My Fantastic Page</b>';

$template->assign_vars(array(
    'MYCONTENT' => $mycontent
    )
);

full_page_generation('mycontent_body.tpl', $lang['MYCONTENT'], '', '');

?> [/codeblock]
Then you just need to create a tpl called [b]mycontent_body.tpl[/b] in [i][u]templates/default/[/u][/i] with this content:
[codeblock filename="mycontent_body.tpl"]<!-- INCLUDE overall_header.tpl -->
{MYCONTENT}
<!-- INCLUDE overall_footer.tpl -->[/codeblock][/list]

Enjoy your newly created pages! :mri:


