:shock:
If you are thinking about adding Custom Pages - Be strongly advised NOT to make any Typo's while you are doing it. :mrorange:
The Instructions for IP v....27c:
Spoiler: [ Show ]
Spoiler: [ Hide ]
Code: [Download] [Hide] [Select]
Code: [Download] [Show]
##############################################################
## How to create a .php Page the easy way.
##
## Description: An easy way to add a blank page to your forum that uses session management
##
## Instructions for Icy Phoenix v1.2.0.27b By Lopalong < h**p://icythemes.com. > 31st July 2008.
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: includes/page_header.php
## includes/constants.php
## includes/functions_mg_online.php
## language/lang_english/lang_main.php
##
## Included Files: root/template.php
## root/templates/mg_themes/template.tpl
##
## License: h**p://opensource.org/licenses/GPL-license.php GNU General Public License v2
##
##############################################################
## Author Notes:
##
## READ THIS!!! Wherever you see TEMPLATE or Template or template, replace with whatever you
## want to call your new page. Add a link to the page if you want to in your overall header.
##
## You can also use this example as the link you would use to call your "New" page if you add the VARS to
## page_header.php: <a href="{U_TEMPLATE}">{L_TEMPLATE}</a>
##
##############################################################
## Before Adding your OWN .php files To Your Forum, You Should Back Up All Related Files.
##############################################################
#
# Rename template.php and template.tpl to whatever your new page will be called.
#
# Edit the following lines in template.php to point to whatever you called templates/mg_themes/template.tpl:
# // assign template
# $template->set_filenames(array( 'body' => 'template.tpl') );
#
# edit templates/mg_themes/template.tpl to have whatever content you want to display.
#
#
copy root/template.php to template.php
copy root/templates/mg_themes/template.tpl to /templates/mg_themes/template.tpl
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
# This is useful if you want to use VARS for the URL and LANG_VARS of your own. You DON'T have to use it otherwise. ;-)
#
#
#-----[ FIND ]------------------------------------------
#
'U_DRAFTS' => append_sid('drafts.' . $phpEx),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_TEMPLATE' => $lang['Template'],
'U_TEMPLATE' => append_sid('template.' . $phpEx),
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_mg_online.php
#
# Indicates where the User is, when "Who's Online is Opened". :P
#
#
#-----[ FIND ]------------------------------------------
#
elseif (strpos($page_id, 'faq.' . $phpEx) !== false)
{
$location['lang'] = $lang['Viewing_FAQ'];
$location['url'] = 'faq.' . $phpEx;
return $location;
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
elseif (strpos($page_id, 'template.' . $phpEx) !== false)
{
$location['lang'] = $lang['template'];
$location['url'] = 'template.' . $phpEx;
return $location;
}
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Template'] = 'Template';
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
# MG: This is NOT used anymore... but left here for backward compatibility!
#
#
#-----[ FIND ]------------------------------------------
#
define('PAGE_GROUPCP', -11);
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('PAGE_TEMPLATE', -1045);
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
The Sample template.php File:
Spoiler: [ Show ]
Spoiler: [ Hide ]
Code: [Download] [Hide] [Select]
Code: [Download] [Show]
<?php
/***************************************************************************
* template.php
* -------------------
* Instructions for Icy Phoenix by Lopalong 3rd Aug 2008 < h**p://icythemes.com >.
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* READ THIS! Wherever you see TEMPLATE or Template or template, replace with whatever you
* want to call your new page.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
/***** If you create VARS (Custom) that do not already exist in Icy Phoenix, then you will also need to create the file "variables.php" for variable-transition to the .tpl file(s). So you will need to uncomment the line below.
*****/
// include($phpbb_root_path . 'variables.'.$phpEx);
// standard session management
$userdata = session_pagestart($user_ip, PAGE_TEMPLATE);
init_userprefs($userdata);
// set page title
$page_title = 'Template';
// standard page header
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
// assign template
$template->set_filenames(array('body' => 'template.tpl'));
// This is where you would add a new VARS Array if you intend to use your own custom VARS.
$template->pparse('body');
// standard page footer
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
/***************************************************************************
* template.php
* -------------------
* Instructions for Icy Phoenix by Lopalong 3rd Aug 2008 < h**p://icythemes.com >.
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* READ THIS! Wherever you see TEMPLATE or Template or template, replace with whatever you
* want to call your new page.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
/***** If you create VARS (Custom) that do not already exist in Icy Phoenix, then you will also need to create the file "variables.php" for variable-transition to the .tpl file(s). So you will need to uncomment the line below.
*****/
// include($phpbb_root_path . 'variables.'.$phpEx);
// standard session management
$userdata = session_pagestart($user_ip, PAGE_TEMPLATE);
init_userprefs($userdata);
// set page title
$page_title = 'Template';
// standard page header
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
// assign template
$template->set_filenames(array('body' => 'template.tpl'));
// This is where you would add a new VARS Array if you intend to use your own custom VARS.
$template->pparse('body');
// standard page footer
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Sample variables.php:
Spoiler: [ Show ]
Spoiler: [ Hide ]
Code: [Download] [Hide] [Select]
Code: [Download] [Show]
<?php
// Image handling
$MYV['ZURL'] = 'smilies/smiley';
$MYV['ZIMAGES'] = '<img src="smilies/images';
$MYV['ZTOPREF'] = '<a href="#top">';
$MYV['ZTOPB'] = '/gotop.gif" alt="';
$MYV['ZBOTREF'] = '<a href="#bottom">';
$MYV['ZBOTB'] = '/gobot.gif" alt="';
$MYV['ZENDA'] = '" /></a>';
$MYV['ZENDB'] = '" />';
$MYV['ZGIF'] = '.gif"';
$MYV['ZPNG'] = '.png"';
$MYV['ZJPG'] = '.jpg"';
## Etc, etc until you have all the custom VARS you need.
?>
// Image handling
$MYV['ZURL'] = 'smilies/smiley';
$MYV['ZIMAGES'] = '<img src="smilies/images';
$MYV['ZTOPREF'] = '<a href="#top">';
$MYV['ZTOPB'] = '/gotop.gif" alt="';
$MYV['ZBOTREF'] = '<a href="#bottom">';
$MYV['ZBOTB'] = '/gobot.gif" alt="';
$MYV['ZENDA'] = '" /></a>';
$MYV['ZENDB'] = '" />';
$MYV['ZGIF'] = '.gif"';
$MYV['ZPNG'] = '.png"';
$MYV['ZJPG'] = '.jpg"';
## Etc, etc until you have all the custom VARS you need.
?>
Sample Finished template.tpl:
You ARE of course allowed to use Normal Markup as well. :woot:
Spoiler: [ Show ]
Spoiler: [ Hide ]
Code: [Download] [Hide] [Select]
Code: [Download] [Show]
{ZDIV_GLOBAL}
{ZSHADTOP}
{ZCLA}
{ZBUTA} {ZBUTB} {ZBUTC} {ZBUTD} {ZBUTE} {ZBUTF} {ZBUTG} {ZBUTH} {ZBUTI} {ZBUTJ}
{ZCLB}
{ZDIVA}{L_ZIDXSM}{ZDIVZ}
<div class="forum-buttons2"><div class="gen"><strong><em>{L_ZWELCOME_ONE}</em></strong></div></div>
<div class="row1">{L_ZWELCOME_TWO}</div>
{ZDIVC}<div class="gensmall" style="padding: 6px 0 6px 0;">{L_ZWELCOME_THREE}</div>{ZDIVY}
{ZSHADBOT}
{ZDIV_END_GLOBAL}
{ZHTML} {ZCSS}
{ZSHADTOP}
{ZCLA}
{ZBUTA} {ZBUTB} {ZBUTC} {ZBUTD} {ZBUTE} {ZBUTF} {ZBUTG} {ZBUTH} {ZBUTI} {ZBUTJ}
{ZCLB}
{ZDIVA}{L_ZIDXSM}{ZDIVZ}
<div class="forum-buttons2"><div class="gen"><strong><em>{L_ZWELCOME_ONE}</em></strong></div></div>
<div class="row1">{L_ZWELCOME_TWO}</div>
{ZDIVC}<div class="gensmall" style="padding: 6px 0 6px 0;">{L_ZWELCOME_THREE}</div>{ZDIVY}
{ZSHADBOT}
{ZDIV_END_GLOBAL}
{ZHTML} {ZCSS}
What the Finished template.tpl Translates to:
Spoiler: [ Show ]
Spoiler: [ Hide ]
Code: [Download] [Hide] [Select]
Code: [Download] [Show]
<div align="center"><div style="width: 95%;padding-top:15px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="right" width="11px"><img src="smilies/images/tbl_top_l.png" width="11px" alt="" /></td>
<td class="ztbl_top_c" width="100%"></td>
<td width="11px" align="left"><img src="smilies/images/tbl_top_r.png" width="11px" alt="" /></td>
</tr>
<tr>
<td class="ztbl_l_s" width="11px"></td>
<td>
<div align="center" class="forum-buttons2" style="padding: 4px 0 6px 0;"> <a href="smilies_animated_page1.php"><img src="smilies/buttons/animated1a.gif" alt="Animated Smilies" /></a> <a href="smilies_assorted_page1.php"><img src="smilies/buttons/assorted1a.gif" alt="Assorted Smilies" /></a> <a href="smilies_banner_page1.php"><img src="smilies/buttons/banners1a.gif" alt="Banner Smilies" /></a> <a href="smilies_critter_page1.php"><img src="smilies/buttons/critters1a.gif" alt="Critter Smilies" /></a> <a href="smilies_large_page1.php"><img src="smilies/buttons/large1a.gif" alt="Large Smilies" /></a> <a href="smilies_msn_page1.php"><img src="smilies/buttons/msn1a.gif" alt="Msn Smilies" /></a> <a href="smilies_regular_page1.php"><img src="smilies/buttons/regular1a.gif" alt="Regular Smilies" /></a> <a href="smilies_druggy_page1.php"><img src="smilies/buttons/drugs1a.gif" alt="Druggy Smilies" /></a> <a href="smilies_xmas_page1.php"><img src="smilies/buttons/xmas1a.gif" alt="Xmas Smilies" /></a> </div>
<div class="cat"><div style="padding: 5px 0 0 0;"></div><strong>Smilies Index </strong></div>
<div class="forum-buttons2"><div class="gen"><strong><em>You Should Read This Before Proceeding</em></strong></div></div>
<div class="row1"><div style="padding:30px;"><p> Click on any of the above buttons and the pages will open in the same window. Right-Click the image and "Save Picture As" to "My Pictures" or the folder of your choice.
</p>
<br />
<p> Please <b><em>do not</em></b> link directly to these images, as <b><em>"Hot-Linking"</em></b> is disabled and all you will get will be a load of rubbish. You can however "Hot-Link" to them if you are using them within this forum.
</p>
<br />
<p> <b>Note:</b> Most Web-Browsers cannot handle opening all of the images at the same time and may "crash". If you experience this problem, then exit the browser, reload the Smilie Index, and don't try to load "all" of images at the same time.
</p>
<!--
<br /><p> <font color="red"><strong><em>Warning: Though not overly offensive; if you are easily offended, then I suggest that you skip the X-Rated Smilies.</em></strong></font color></p>
-->
</div></div>
<div class="row1g"><div class="gensmall" style="padding: 6px 0 6px 0;"><strong>Latest Statistics:</strong> <em>Total Smilies:</em> 1,284. <em>Volume:</em> 8.43MB -> <em>On Disk:</em> 11.3MB.</div></div>
</td>
<td class="ztbl_r_s" width="11"></td>
</tr>
<tr>
<td width="11"><img src="smilies/images/tbl_f_l.png" width="11" height="10" alt="" /></td>
<td class="ztbl_f_c"></td>
<td width="11"><img src="smilies/images/tbl_f_r.png" width="11" height="10" alt="" /></td>
</tr>
</table></div></div>
<div style="padding-top:4px;"></div><div align="center"><a href="h**p://validator.w3.org/check?uri=referer"><img src="h**p://***.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a> <a href="h**p://jigsaw.w3.org/css-validator/">
<img style="border:0;width:88px;height:31px" src="h**p://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="right" width="11px"><img src="smilies/images/tbl_top_l.png" width="11px" alt="" /></td>
<td class="ztbl_top_c" width="100%"></td>
<td width="11px" align="left"><img src="smilies/images/tbl_top_r.png" width="11px" alt="" /></td>
</tr>
<tr>
<td class="ztbl_l_s" width="11px"></td>
<td>
<div align="center" class="forum-buttons2" style="padding: 4px 0 6px 0;"> <a href="smilies_animated_page1.php"><img src="smilies/buttons/animated1a.gif" alt="Animated Smilies" /></a> <a href="smilies_assorted_page1.php"><img src="smilies/buttons/assorted1a.gif" alt="Assorted Smilies" /></a> <a href="smilies_banner_page1.php"><img src="smilies/buttons/banners1a.gif" alt="Banner Smilies" /></a> <a href="smilies_critter_page1.php"><img src="smilies/buttons/critters1a.gif" alt="Critter Smilies" /></a> <a href="smilies_large_page1.php"><img src="smilies/buttons/large1a.gif" alt="Large Smilies" /></a> <a href="smilies_msn_page1.php"><img src="smilies/buttons/msn1a.gif" alt="Msn Smilies" /></a> <a href="smilies_regular_page1.php"><img src="smilies/buttons/regular1a.gif" alt="Regular Smilies" /></a> <a href="smilies_druggy_page1.php"><img src="smilies/buttons/drugs1a.gif" alt="Druggy Smilies" /></a> <a href="smilies_xmas_page1.php"><img src="smilies/buttons/xmas1a.gif" alt="Xmas Smilies" /></a> </div>
<div class="cat"><div style="padding: 5px 0 0 0;"></div><strong>Smilies Index </strong></div>
<div class="forum-buttons2"><div class="gen"><strong><em>You Should Read This Before Proceeding</em></strong></div></div>
<div class="row1"><div style="padding:30px;"><p> Click on any of the above buttons and the pages will open in the same window. Right-Click the image and "Save Picture As" to "My Pictures" or the folder of your choice.
</p>
<br />
<p> Please <b><em>do not</em></b> link directly to these images, as <b><em>"Hot-Linking"</em></b> is disabled and all you will get will be a load of rubbish. You can however "Hot-Link" to them if you are using them within this forum.
</p>
<br />
<p> <b>Note:</b> Most Web-Browsers cannot handle opening all of the images at the same time and may "crash". If you experience this problem, then exit the browser, reload the Smilie Index, and don't try to load "all" of images at the same time.
</p>
<!--
<br /><p> <font color="red"><strong><em>Warning: Though not overly offensive; if you are easily offended, then I suggest that you skip the X-Rated Smilies.</em></strong></font color></p>
-->
</div></div>
<div class="row1g"><div class="gensmall" style="padding: 6px 0 6px 0;"><strong>Latest Statistics:</strong> <em>Total Smilies:</em> 1,284. <em>Volume:</em> 8.43MB -> <em>On Disk:</em> 11.3MB.</div></div>
</td>
<td class="ztbl_r_s" width="11"></td>
</tr>
<tr>
<td width="11"><img src="smilies/images/tbl_f_l.png" width="11" height="10" alt="" /></td>
<td class="ztbl_f_c"></td>
<td width="11"><img src="smilies/images/tbl_f_r.png" width="11" height="10" alt="" /></td>
</tr>
</table></div></div>
<div style="padding-top:4px;"></div><div align="center"><a href="h**p://validator.w3.org/check?uri=referer"><img src="h**p://***.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a> <a href="h**p://jigsaw.w3.org/css-validator/">
<img style="border:0;width:88px;height:31px" src="h**p://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a></div>
:shock: