Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Adding A Simple Php Page 
 
Spoiler: [ Show ]


I tryed to add this simple php coded page and it shows exactlly what i wrote. Is there a way to put php into a block.
Im trying to add alot more complex php but i figured i would start with this to see if it even works.. Sorry i am new to icy pheonix but use phpbb3 and my own php web site. Im just getting ready to migrate to icy pheonix but there is alot of things i need to do that is php based.. Thanks for your help

Here is an example page from my current site.. this is a little more complex than hello world LOL

My donation page

Here is the code for that page

Spoiler: [ Show ]

 



 
Edited by Chaotic, Sat 10 Jan, 2009 18:11: Added spoiler BBCode and code BBCode to first set of code.
redrumm101Send private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Adding A Simple Php Page 
 
You can do just about anything with Icy Phoenix.

To add a new page to your site, try going to your CMS (cms.php) and click Add Site Page at the very bottom.  You can also add it manually by making a copy of index_empty.php, editing it, and renaming it.

About adding more php into a block, try looking through the files in ip_root/blocks and ip_root/templates/mg_themes/blocks.  Use their setup as an example of the basics needed to create a new block.
 




____________
| Icy Phoenix ColorizeIt! |
Bipolar Disorder - Not good for you and definitely not good for everyone else.
 
ChaoticSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Adding A Simple Php Page 
 
Ok i was able to get this to work somewhat with my server info page

http://www.getcis.com/~redrum/server.php#22

But of course i doesnt look right.. I used the rules page to copy most of the code and put my code inbetween.. Its just a standard echo iframe. Any help would be greatly appreciated.. Here is the code i used like i said most of it is rules.php because thats the only way i can seem to get it to work.

If there is a much simpler way to do this and have the correct borders around it and top and bottom title bar.

Code: [Download] [Hide] [Select]
<?php
/***************************************************************************
 *                              rules.php
 *                            -------------------
 *   begin                : 26.10.2003, 19:29
 *   copyright            : (C) 2003 Dimitri Seitz
 *   email                : dwing@weingarten-net.de
 *
 *   $Id: admin_rules.php,v 2.0,
 *
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.' . $phpEx);
require "/home/redrum/bin/CON-Config.php";

// Start session management
$userdata = session_pagestart($user_ip);
init_userprefs($userdata);
// End session management

$cms_page_id = '22';
$cms_page_name = 'server info';
$auth_level_req = $board_config['auth_view_rules'];
if ($auth_level_req > AUTH_ALL)
{
    if ( ($auth_level_req == AUTH_REG) && (!$userdata['session_logged_in']) )
    {
        message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
    }
    if ($userdata['user_level'] != ADMIN)
    {
        if ( $auth_level_req == AUTH_ADMIN )
        {
            message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
        }
        if ( ($auth_level_req == AUTH_MOD) && ($userdata['user_level'] != MOD) )
        {
            message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
        }
    }
}
$cms_wide_blocks = ($board_config['wide_blocks_rules'] == 1) ? true : false;

// Load the appropriate Rules file
$lang_file = 'lang_rules';
$l_title = $lang['BoardRules'];

// Include the rules settings
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);


// Lets build a page ...
$page_title = $lang['BoardRules'];
$meta_description = '';
$meta_keywords = '';
include($phpbb_root_path . 'includes/page_header.' . $phpEx);

$template->set_filenames(array('body' => 'rules_body.tpl'));
make_jumpbox(VIEWFORUM_MG, $forum_id);

$template->assign_vars(array(
    'L_RULES_TITLE' => $l_title,
    'L_BACK_TO_TOP' => $lang['Back_to_top'])
);

for($i = 0; $i < count($rules_block); $i++)
{
    if( count($rules_block[$i]) )
    {
        $template->assign_block_vars('rules_block', array(
            'BLOCK_TITLE' => $rules_block_titles[$i])
        );
        $template->assign_block_vars('rules_block_link', array(
            'BLOCK_TITLE' => $rules_block_titles[$i])
        );

        for($j = 0; $j < count($rules_block[$i]); $j++)
        {
            $row_color = ( !($j % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
            $row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

            $template->assign_block_vars('rules_block.rules_row', array(
                'ROW_COLOR' => '#' . $row_color,
                'ROW_CLASS' => $row_class,
                'RULES_QUESTION' => $rules_block[$i][$j]['question'],
                'RULES_ANSWER' => $rules_block[$i][$j]['answer'],

                'U_RULES_ID' => $rules_block[$i][$j]['id'])
            );

            $template->assign_block_vars('rules_block_link.rules_row_link', array(
                'ROW_COLOR' => '#' . $row_color,
                'ROW_CLASS' => $row_class,
                'RULES_LINK' => $rules_block[$i][$j]['question'],

                'U_RULES_LINK' => '#f' . $rules_block[$i][$j]['id'])
            );
        }
    }
}
echo "<iframe name="remote" width="700" height="800" src ="http://www.cisclan.com/server/lgsl/lgsl_server.php?ip=$cssserverip&port=$cssserverport&type=halflife2" frameborder="0">
          </iframe>
    ";
$template->pparse('body');


include($phpbb_root_path . 'includes/page_tail.' . $phpEx);

?>

 



 
redrumm101Send private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron