Great Lakes Designs
Toggle Content Welcome Guest! Please Register or Login
Toggle Content Contributions
Due Date: Sep 30
September Goal: 50.00
Gross Amount: 0.00
PayPal Fees: 0.00
Net Balance: 0.00
Below Goal: 50.00
Site Currency: USD
 0%

Toggle Content Main Menu

Toggle Content User Info

Welcome Anonymous

Nickname
Password

Membership:
Latest: tonyb
New Today: 0
New Yesterday: 0
Overall: 12

People Online:
Members: 0
Visitors: 1
Total: 1
Who Is Where:
 Visitors:
01: Support Forums

Staff Online:

No staff members are online!

Toggle Content Preview theme
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.

Toggle Content Shopping Cart
Your cart is empty.

[ Browse ]

Support Forums › DragonFlyCMS Themes › Dragonfly Theming Tips & Tricks › Upgrading a theme from 9.1.2 to 9.2

    Forum IndexDragonfly Theming Tips & Tricks
Upgrading a theme from 9.1.2 to 9.2

Post new topic   Reply to topic   Printer Friendly Page
View previous topic :: View next topic  
Author Message
rlgura
Site Admin
Site Admin


Joined: Dec 13, 2007
Posts: 25
Location: Cleveland, OH USA

PostPosted: Wed Jan 14, 2009 5:28 am    Post subject: Upgrading a theme from 9.1.2 to 9.2 Reply with quote

Upgrade from 9.1 to 9.2:

* Make sure your This_Theme/templates/block.html exists and works properly

* If you're including This_Theme/templates/admin, include new settings.html (actually refresh all of these from default)
(still recommended not to include temlates/admin)

* Styles changes:
Add class: img {border: 0;}
Add additional style sheets (opera.css, safari.css, adminblocks.css)

* Additional files:
/javascript/adminblocks.js
/images/drag.png
/images/thumbtack.gif
/images/tabletree.png
/images/recycle_full.png
/images/recycle_empty.png
/images/cursors/*

* Themes.php changes:

Find and replace: with:
blocks('left'); ---> $Blocks->display('l');
blocks('right'); ---> $Blocks->display('r');
blocks('center') ---> $Blocks->display('c');
blocks('down') ---> $Blocks->display('d');
hideblock( ---> $Blocks->hideblock(


in function themeheader():
add $Blocks to global variable list and add $css_ie:
Code::
	$css_ie = ereg('MSIE 7.0', $user_agent) ? 'ie7' : (ereg('MSIE ([0-6].[0-9]{1,2})', $user_agent) ? 'ie6' : ((isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Safari') ? 'safari' : ((isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Opera') ? 'opera' : '')));

Change this:
Code::
	// left blocks ?
	if (blocks_visible('l')) {
		$img = hideblock('600') ? 'plus.gif' : 'minus.gif';
		$imgl = '<img align="left" alt="Toggle Content" title="Toggle Content" id="pic600" src="themes/'.$CPG_SESS['theme'].'/images/'.$img.'" onclick="blockswitch(\'600\');" style="cursor:pointer" />';
	}
	// right blocks ?
	if (blocks_visible('r')) {
		$img = hideblock('601') ? 'plus.gif' : 'minus.gif';
		$imgr = '<img align="right" alt="Toggle Content" title="Toggle Content" id="pic601" src="themes/'.$CPG_SESS['theme'].'/images/'.$img.'" onclick="blockswitch(\'601\');" style="cursor:pointer" />';
	}

to this:
Code::
	// left blocks ?
	if ($Blocks->l && ($Blocks->showblocks & 1)) {
		$img = $Blocks->hideblock('600') ? 'plus.gif' : 'minus.gif';
		$imgl = '<img alt="'._TOGGLE.'" title="'._TOGGLE.'" id="pic600" src="themes/'.$CPG_SESS['theme'].'/images/'.$img.'" onclick="blockswitch(\'600\');" style="cursor:pointer; float:left; padding:2px 0 2px 0;" />';
	}
	// right blocks ?
	if ($Blocks->r && ($Blocks->showblocks & 2)) {
		$img = $Blocks->hideblock('601') ? 'plus.gif' : 'minus.gif';
		$imgr = '<img alt="'._TOGGLE.'" title="'._TOGGLE.'" id="pic601" src="themes/'.$CPG_SESS['theme'].'/images/'.$img.'" onclick="blockswitch(\'601\');" style="cursor:pointer; float:right; padding:2px 0 2px 0;" />';
	}

Change in $cpgtpl->assign_vars(array(
Code::
		
'CSS_IE'		=> ($css_ie) ? '<link rel="stylesheet" type="text/css" href="themes/'.$CPG_SESS['theme'].'/style/'.$css_ie.'.css" />' : '',
'S_TOGGLE'		=> _TOGGLE,
Remove 'B_L_HIDDEN' => hideblock....

In function themefooter():
add $Blocks to global variable list

Remove these functions:
themesidebox(),



* Template file changes:

Find & replace:
Header.html: src="{leftblock.S_IMAGE}" ---> src="{leftblock.S_IMAGE}.gif"
Footer.hmtl: src="{rightblock.S_IMAGE}" ---> src="{rightblock.S_IMAGE}.gif"
Block.html: src="{block.S_IMAGE}" ---> src="{block.S_IMAGE}.gif"

News:
in Index.html, find {newstopic.S_MORELINK} and replace with:
Code::
{newstopic.S_MORELINK}{newstopic.S_COMMLINK}{newstopic.S_PRNTLINK}{newstopic.S_FRNDLINK}{newstopic.S_CATLINK}{newstopic.S_SCORLINK}

_________________
Site Admin - Great Lakes Web Designs
Theme Designer - WebSite Guru Designs
Site Admin - Families with Food Allergies
Back to top
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexDragonfly Theming Tips & Tricks All times are GMT
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Cardinal Theme orginally By: Lorkan Themes. - Ported to DragonflyCMS by: WebSiteGuru Designs
Version 9.2.1.2 - July 1, 2008