Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post CMS - Standard Pages In CMS 
 
Standard pages in icy 1.3 works differently than before in icy1.2.. you no longer add new pages this way but instead use the cms pages option in your cms pages...

Standard pages works by allowing you to add blocks to new pages you create or mods you have added...

for example I have installed a mod to my site  called test mod... in that mod there is a page called test.php.. when i open that page in my site I see a normal page with no blocks...

I have global blocks activated on all my site pages and I want to add global blocks to this page...

Go to ACP and click on the cms link in the top right hand corner. cms_link




after clicking here you will see the main cms page it look like the example below.

 standard_pages_link




click on the standard Pages link and it will take you to the main stand links page as the example shows...

 standard_pages



here you can save changes quickly by ticking the boxes for global blocks or breadcrumbs the just click on the save changes button at the bottom of the page..


to add blocks to new pages click on the add Site Page box at the bottom of the page this takes you too a new page as shown below...

 new_page_1251370952_767000  

here you add the details of the page you wish to have blocks or breadcrumbs showing...

for example:

Name:  here write the name of the page so you remember it later... i will call mine Test Page

Page ID
This is the Page ID used by the auth system. Chars allowed: lower-case alpha, numbers, underscore, no spaces.


this does not have to be complicated but you need to remember it for later use... i am going to call it test_mod remember the underscore when there is a space between words...

Filename this is the name of the php file so our example here is test.php

show global blocks  click  on the radio button to add global blocks to this page so hit yes

Page Navigation Block (Breadcrumbs) if you wish to show standard icy breadcrumbs to you page then click on yes.. i do not for my example so i am leaving it as no..

View permissions this basically allows you set the page to who you wish to see it so for now I have left it to all meaning everyone..

Here is the finished result in the image below.

 saved_new_page

now click on the submit button at the bottom of the page to store the data in your database...

you will see the new page added as the example below.

 new_page_added

one thing left to do before adding blocks to this page and for it to work...

you need to open the php file you used in setting up the standard page  mine is test.php

please remember to back up this page first in case there is any mistakes...

look for this in that page

Code: [Download] [Hide] [Select]
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);
include_once(IP_ROOT_PATH . 'includes/functions_groups.' . PHP_EXT);


and directly afterwards add

Code: [Download] [Hide] [Select]
$cms_page_id = 'test_mod';
$cms_page_nav = (!empty($cms_config_layouts[$cms_page_id]['page_nav']) ? true : false);
$cms_global_blocks = (!empty($cms_config_layouts[$cms_page_id]['global_blocks']) ? true : false);
$cms_auth_level = (isset($cms_config_layouts[$cms_page_id]['view']) ? $cms_config_layouts[$cms_page_id]['view'] : AUTH_ALL);
check_page_auth($cms_page_id, $cms_auth_level);


now in that code you need to find...

Code: [Download] [Hide] [Select]
test_mod


and change it to the page id that you picked when you set up the new standard page...

save the file and upload it to your site...

now you can add blocks wherever you like on this page just as you would on a normal cms page.

 I hope this helps

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
Last edited by DWho on Thu 27 Aug, 2009 21:12; edited 2 times in total 
DWhoSend private messageVisit poster's website  
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: [DOC] Standard Pages In Icy 1.3 
 
Great doc DWho.

Thanks for sharing it.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [DOC] Standard Pages In Icy 1.3 
 
thank you

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: CMS - Standard Pages In CMS 
 
hello,
i try to find a way to include a unique product in category menu. To do that i need a code for calling the product id in cms bloc. any idea ?

thanks for your help
 



 
sealysSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: CMS - Standard Pages In CMS 
 
sealys wrote: [View Post]
hello,
i try to find a way to include a unique product in category menu. To do that i need a code for calling the product id in cms bloc. any idea ?

thanks for your help

You are providing very poor informations about what you need, and this forum is not the right place for such kind of requests.

Please use the General Support section by providing as many informations you can.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: CMS - Standard Pages In CMS 
 
Right Guys,

excuse the NOOOB !!

Right i have a webpage called alertz2.php

Code: [Download] [Hide] [Select]
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);
include_once(IP_ROOT_PATH . 'includes/functions_groups.' . PHP_EXT);
include(IP_ROOT_PATH . '/alerts/alertsconfig.'.PHP_EXT);
$cms_page_id = 'scotalertz';
$cms_page_nav = (!empty($cms_config_layouts[$cms_page_id]['page_nav']) ? true : false);
$cms_global_blocks = (!empty($cms_config_layouts[$cms_page_id]['global_blocks']) ? true : false);
$cms_auth_level = (isset($cms_config_layouts[$cms_page_id]['view']) ? $cms_config_layouts[$cms_page_id]['view'] : AUTH_ALL);
check_page_auth($cms_page_id, $cms_auth_level);

// standard session management
$userdata = session_pagestart($user_ip);

if ((!$userdata['session_logged_in']) )

   {
        redirect(append_sid(LOGIN_MG . '?redirect=alerts.' . PHP_EXT));
    
   }

else

   {
        init_userprefs($userdata);
        // set page title
        $page_title = "Scotbird alerts - Members only area !! ";

        // standard page header
        include(IP_ROOT_PATH . 'includes/page_header.'.PHP_EXT);
        
        // Connect to the database
        
        $start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0;
        $start = ($start < 0) ? 0 : $start;
        


        $db = new sql_db($alerts_mysql_host,$alerts_mysql_username,$alerts_mysql_password,$alerts_mysql_db,false);

        if(!$db)
        {
                die("Database Connection Failed:- Please Contact Site Admin" . mysql_error());
        }

        // assign template
        $template->set_filenames(array('body' => 'alertz.tpl'));    
        
            $tbl = $userdata[username];
            $sql = "SELECT COUNT(*) AS num FROM alerts";
            $result = $db->sql_query($sql);
            $row = $db->sql_fetchrow($result);
            $number = $row['num'];
    
            $lt = strlen(date("d"));    
            if ($lt != 2)
            {    
                if (date("d") == "1")
                {
                    $datestr1 = '0' .((date("d")+'30').'/'.date("m")-'1');
                    $datestr2 = date("d/m");
                }
                else
                {
                    $datestr1 = '0' .((date("d")- 1).'/'.(string)date("m"));
                    $datestr2 = (date("d/m"));
    
                }
            }
            else
            {
                $datestr1 =  ((date("d")- 1 ).'/'.(string)date("m"));
                $datestr2 = (date("d/m"));
            }
    
            $sql = "SELECT DISTINCT region FROM alerts ";
            $result = $db->sql_query($sql);
      
            if (!($result = $db->sql_query($sql)))
            {
              
                die("Database Query Failed" . mysql_error());
            }

        // This is where you would add a new VARS Array if you intend to use your own custom VARS.
        
        
        while ($row = $db->sql_fetchrow($result))
            {
                   $region_filter_options .= '<option value="' . $row['region'] . '">' . $row['region'] . '</option>';
            }
            
        $sql = "SELECT DISTINCT species FROM alerts ";
    
           $result = $db->sql_query($sql);
      
        if (!($result = $db->sql_query($sql)))
        {
            die("Database Query Failed" . mysql_error());
        }

        // This is where you would add a new VARS Array if you intend to use your own custom VARS.
        
        
        while ($row = $db->sql_fetchrow($result))
        {
                $species_filter_options .= '<option value="' . $row['species'] . '">' . $row['species'] . '</option>';
        }

        $sql2 = "SELECT * FROM alerts WHERE region = '".$MyFormListVariable."'" ;
    
           $result2 = $db->sql_query($sql2);
      
        if (!($result2 = $db->sql_query($sql2)))
        {
            die("Database Query Failed" . mysql_error());
        }

$i   = 1;

        while ( $row2 = $db->sql_fetchrow($result2) )
        
        {
            $template->assign_block_vars('alerts', array( 'POS' => $i ,
                       'REGION' => $row2['region'],
                    'SPECIES' => str_replace("%", "'",$row2['species']),
                    'DATE' => $row2['Date'],
                    'TIME' =>  $row2['time'],
                    'COMMENTS' => str_replace("'", "%",$row2['comments']),
                    )
                );
            $i++;
        }
        
        
        $template->assign_vars(array(
        'USERNAME' => htmlspecialchars($userdata[username]),
        'REGION_FILTER' => $region_filter_options,
        'SPECIES_FILTER' => $species_filter_options,
                )
            );


        // An attempt at pagenating the results    
        $sql = "SELECT count(*) AS total FROM alerts";
        if ( !($result = $db->sql_query($sql)) )
        {
            message_die(GENERAL_ERROR, 'Error geeting total list', '', __LINE__, __FILE__, $sql);
        }
        if ( $total = $db->sql_fetchrow($result) )
        {
            $total_species = $total['total'];
            $pagination = generate_pagination('alerts.' . PHP_EXT . '?mode=' . $mode . '&order=' . $sort_order, $total_species , 50, $start) . ' ';
        }
        $db->sql_freeresult($result);

        $template->assign_vars(array(
            'PAGINATION' => $pagination,
            'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / 50 ) + 1 ), ceil( $total_species  / 50 )),
            'L_GOTO_PAGE' => $lang['Goto_page']
                )
            );

            
        // Build the page
        $template->pparse('body');

        // standard page footer
        include(IP_ROOT_PATH . 'includes/page_tail.'.PHP_EXT);

   }
?>




I have done the standard page Link

 scotalertz1

I have set it as shown in picture below

 scotalertz2

When i click on the Preview in the standard page view i get

"Hacking Attempt" warning and nothing else,

Can someone assist me please.

Regards
 



 
AndyGpySend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: CMS - Standard Pages In CMS 
 
you forgot the

Code: [Download] [Hide]
  1. define('IN_ICYPHOENIX', true); 


right on top of all


and maybe kill the crtracker if you keep getting the message
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: CMS - Standard Pages In CMS 
 
Ok now i got that bit working, how do i get the menu bar at the side as it does not show
 



 
AndyGpySend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: CMS - Standard Pages In CMS 
 
go to your cms standart pages and click on alertz. you should get the possibility to asign blocks to the page
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
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

HideSimilar Topics





 
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