Home Private Messages Search
CPG Dragonfly™ CMS
 
Wiki ⇒ Upgrading or Switching ⇒ 9.1 to 9.2

WikiUpgrading or Switching ⇒ 9.1 to 9.2  

Glossary
The Project
Install
Upgrading or Switching
Dragonfly admininistration
Dragonfly public view
Dragonfly Themes
Build local server
Tips and Tricks
Rules & Regulations
v9 Developer's Manual
v10 Developer's manual
Wiki Permissions
4.3: 9.1 to 9.2 Parent

Upgrade TIPS from 9.1.x to 9.2.x

Below is information and all instructions about upgrading your themes and modules, only small changes, but required.

PHP:
# This applies to Release number 9.2.1
P3P editor:
  • will be found in admin -> main settings
Classes:
    blocks.php
  • A new Block class has been written to replace many functions found in includes/functions/display.php.
  • It fixes a few minor bugs always present since 9.0.6.1.
  • It should speed up the blocks display process.
    menu.php
  • A new Menu static class has been created to reduce I/O disk access by saving image paths in the visitor Session and it does reduce site-wide, page generation time. A cached version will probably come later on.
    rss.php
  • Has a new public function format()
Deprecated functions:
  • MEMBER_BLOCK, themesidebox(), themecenterbox(), blocks(), rss_content(), blocks_visible(), render_blocks(), blockfileinc(), headlines(), userblock() and hideblock() are now deprecated.
  • By activating CPG_DEBUG (a must in this case) will link old functions to the new class and appropriate warnings will show up in the footer.

Themes changes:
PHP:
In file themes/Your_Theme/theme.php
# add to themeheader() and themefooter() globals
$Blocks

# replace
blocks_visible('l/r');
# with
$Blocks->l;
$Blocks->r;

# replace
hideblock('N');
# with
$Blocks->hideblock('N');

# replace
blocks('left/right/center/down')
# with
$Blocks->display('l');
$Blocks->display('r');
$Blocks->display('c');
$Blocks->display('d');



/*
Make sure themes/Your_Theme/template/block.html works properly since it will be now finally used by $Block->preview() in admin -> blocks and wherever a developer wants to preview of a block.
*/

# themes/Your_Theme/template/header.html, footer.html and blocks.html add minus/plus image file extension like
src="{leftblock.S_IMAGE}.gif"


Modules changes:
PHP:
/*
Only if your module use MEMBER_BLOCK or you as developer want to add a user custom "tools" block like Your_Account and Coppermine does.
*/
$block = array(
'bid' = 10000,
'view' = 1, # 0 all, 1 user, 2 admin, 3 admins, >3 bbgroups
'side' => 'l', # l, r, c, d
'title' => _MULTILANG_ALLOWED,
'content' => $variable 'a string or a callback function()'
);
$Blocks->custom($block);
# just free up some memory
$block = NULL;

News Module Changes:
  • "morelink" is now split into components
  • virtually all html has been removed from the code and hard-coded colors in the templates have been eliminated
  • core theme templates have been adjusted
  • all custom themes will require template adjustments, or just adopt the default theme News template - it will inherit your theme's styles and the texcolor/bgcolor variables.

Templates files:
  • themes/default/admin/settings.html

Advanced Module Installer:
    Module developers are invited to use install/sql/tables/ and install/sql/data/ standards for future developments.
    9.2.x core already supports this and it will soon be the new install method. An example is found in cvs/modules/Blogs/

    Why?
    It will automatically upgrade any 3rd party modules at the same time as DragonflyCMS is upgraded.

    Also the module installer will be able to 'clearly' use all db_check functions/converters.

    e.g. you want to add a new field
    - you only need to add the field to the table structure, change version number to your module, and db_check will do the rest.

    e.g. you want to convert a varchar field that contains IPs to a varbinary field type
    - just change the field type in the module table structure and db_check will automatically carry out the conversion in all DragonflyCMS supported databases.

    In other words, it will make your module install/upgrade compatible with all supported databases.

 
Updated: Friday, April 20, 2012 (04:33:11) by NanoCaiordo
Created:  Wednesday, February 20, 2008 (02:10:02) by Phoenix

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy