Dragonfly CMS v9 ⇒ Requests ⇒ Help to convert FiSubsilver Shadow Theme to 9.2.1 ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Themes v9 Requests

Help to convert FiSubsilver Shadow Theme to 9.2.1 Reply to topic


Hi everoyne,

I am a noob when it comes to changing the coding of themes to make them compatable with 9.2.1 from 9.1.2.1.

The theme I am trying to convert is the FiSubsilver Shadow Theme. Could someone please help me replace the code necessary in the header / other files needed to work with 9.2.1?

Thank you very much!

my website is here www.troop8113.org

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Siteground/ Dragonfly CMS 9.2.1


topic heading corrected to address the subject, since the whole forum is themes.

Please enter your server specs in your user profile! 😢


Hi Troop8113,

Did you make any progress with this? I'd also like to be able to use the FiSubsilver Shadow Theme after upgrading.

Thanks!

Note: WWW Private Listing - Staff Only

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/Apache 2.4.27/MySQL 10.1.26-MariaDB/PHP 5.2.17/Dragonfly 9.2.1


Already done here:

www.dizfunkshunal.com/...&id=97

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Nice. Thanks very much rosbif!

Note: WWW Private Listing - Staff Only

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/Apache 2.4.27/MySQL 10.1.26-MariaDB/PHP 5.2.17/Dragonfly 9.2.1


No worries - out of interest, have you tried an upgrade to 9.2 with this theme? Am thinking of trying to upgrade, but a little daunted by the process..

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


No, not yet, I feel exactly the same! Shocked

Note: WWW Private Listing - Staff Only

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
linux/Apache 2.4.27/MySQL 10.1.26-MariaDB/PHP 5.2.17/Dragonfly 9.2.1


I have made some changes so far using the guidelines in the upgrade tutorial RE the theme.php file. Here is what i have so far

<?php /* Theme Name: fisubsilver shadow */ /* Theme Design: coldblooded (www.nukemods.com) */ /* version 3.0 */ /* Theme inspired by the phpbb2 style legion by */ /* Daz (http://www.forumimages.com/) */ /* CPG NUKE 9.0 COMPLIANT */ /* Released under GNU GPL */ if (!defined('CPG_NUKE')) { exit; } $gfxcolor = '#C0C000'; $bgcolor1 = '#FFFFFF'; $bgcolor2 = '#D3DFE3'; $bgcolor3 = '#EFEFEF'; $bgcolor4 = '#FFC53A'; $textcolor1 = '#009900'; $textcolor2 = '#000000'; $hr = 1; # 1 to have horizonal rule in comments instead of table bgcolor function OpenTable() { global $bgcolor1, $bgcolor2; echo"<table width="100%" border="0" cellspacing="0" cellpadding="4">" . " <tr>" . " <td><table width="100%" border="0" cellspacing="0" cellpadding="1">" . " <tr>" . " <td bgcolor="#006699"><table width="100%" border="0" cellspacing="0" cellpadding="0">" . " <tr>" . " <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="0">" . " <tr> " . " <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="4">" . " <tr> " . " <td>" .""; } function CloseTable() { echo"</td>" . " </tr>" . " </table></td>" . " </tr>" . " </table></td>" . " </tr>" . " </table></td>" . " </tr>" . "</table>" . "<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>" . "</td>" . " </tr>" . "</table>" .""; } function OpenTable2() { global $bgcolor1, $bgcolor2; echo"<table width="100%" border="0" cellspacing="0" cellpadding="4">" . " <tr>" . " <td><table width="100%" border="0" cellspacing="0" cellpadding="1">" . " <tr>" . " <td bgcolor="#006699"><table width="100%" border="0" cellspacing="0" cellpadding="0">" . " <tr>" . " <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="0">" . " <tr> " . " <td bgcolor="#EAEDF4"><table width="100%" border="0" cellspacing="0" cellpadding="4">" . " <tr> " . " <td>" .""; } function CloseTable2() { echo"</td>" . " </tr>" . " </table></td>" . " </tr>" . " </table></td>" . " </tr>" . " </table></td>" . " </tr>" . "</table>" . "<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>" . "</td>" . " </tr>" . "</table>" .""; } function themeheader() { global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $themeblockside, $showblocks, $site_logo, $userinfo, $Blocks; $imgr = $imgl = ''; if ($showblocks) { if ((_TEXT_DIR == 'left' && $showblocks > 1) || (_TEXT_DIR == 'right' && !isset($_GET['hideleftblocks']))) { $img = 'minus.gif'; if ($Blocks->hideblock('601')) { //block is collapsed so hide it $img = 'plus.gif'; } $imgr = '<img align="right" alt="Toggle Content" title="Toggle Content" id="pic601" src="themes/legion/images/'.$img.'" onclick="blockswitch(\'601\');" style="cursor:pointer" />'; } if ((_TEXT_DIR == 'ltr' && !isset($_GET['hideleftblocks'])) || (_TEXT_DIR == 'rtl' && $showblocks > 1)) { $img = 'minus.gif'; if ($Blocks->hideblock('600')) { $img = 'plus.gif'; } $imgl = '<img align="left" alt="Toggle Content" title="Toggle Content" id="pic600" src="themes/legion/images/'.$img.'" onclick="blockswitch(\'600\');" style="cursor:pointer" />'; } } $cpgtpl->assign_vars(array( 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'B_L_HIDDEN' => $Blocks->hideblock('600') ? '' : 'style="display: none"', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_LEFTBLOCKS' => ($imgl != ''), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_USERNAME' => $userinfo['username'], 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => ($banners) ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_ADMININDEX' => $adminindex, 'I18N' => 'enctype="multipart/form-data" accept-charset="utf-8"' ) ); $themeblockside = 'left'; $Blocks->display(_TEXT_DIR); $themeblockside = ''; } function themefooter() { global $showblocks, $banners, $cpgtpl, $foot1, $foot2, $foot3, $copyright, $start_time, $db, $themeblockside, $Blocks; $Blocks->display('right'); $cpgtpl->assign_vars(array( 'B_R_VISIBLE' => $Blocks->hideblock('601') ? 'style="display: none"' : '', 'B_R_HIDDEN' => $Blocks->hideblock('601') ? '' : 'style="display: none"', 'S_FOOTER' => footmsg() ) ); $cpgtpl->set_filenames(array('footer' => 'footer.html')); $cpgtpl->display('footer'); } /*********************************************************************************** void themesidebox Output the specific block to left or right $title : the title of the block $content: all formatted content for the block $bid : the database record ID of the block ************************************************************************************/ function themesidebox($title, $content, $bid=0) { global $cpgtpl, $themeblockside; $cpgtpl->assign_block_vars($themeblockside.'block', array( 'S_TITLE' => $title, 'S_CONTENT' => $content, 'S_BID' => $bid, 'S_VISIBLE' => hideblock($bid) ? 'style="display:none"' : '', 'S_HIDDEN' => hideblock($bid) ? '' : 'style="display:none"', 'S_IMAGE' => 'themes/legion/images/'.(hideblock($bid) ? 'plus.gif' : 'minus.gif') ) ); if ($themeblockside == '') { $cpgtpl->set_filenames(array('block' => 'block.html')); $cpgtpl->display('block'); } } /*********************************************************************************** string theme_open_form Creates start tag for form $get_link : link for action default blank $form_name : useful for styling and nbbcode $legend: optional string value is used in form lagend tag $border: optional use 1 to not show border on fieldset from stylesheet ************************************************************************************/ function theme_open_form($link, $form_name=false, $legend=false,$tborder=false) { $leg = $legend ? "<legend>$legend</legend>" : ''; $bord = $tborder ? $tborder : ''; $form_name = $form_name ? ' name="'.$form_name.'" id="'.$form_name.'"' :''; return '<fieldset '.$bord.'>'.$leg.'<form method="post" action="'.$link.'"'.$form_name.' enctype="multipart/form-data" accept-charset="utf-8">'; } function theme_close_form() { return '</form></fieldset>'; } /*********************************************************************************** string theme_yesno_option Creates 2 radio buttons with a Yes and No option $name : name for the <input> $value: current value, 1 = yes, 0 = no ************************************************************************************/ function theme_yesno_option($name, $value=0) { $sel[(!$value)] = ''; $sel[$value] = ' selected="selected"'; $select = '<select class="set" name="'.$name.'" id="'.$name."">\n"; $select .= '<option value="1"'.$sel[1].">"._YES."</option>\n"; $select .= '<option value="0"'.$sel[0].">"._NO."</option>\n"; return $select.'</select>'; //$sel[intval($value)] = ' checked="checked"'; //return '<input type="radio" name="'.$name.'" value="1"'.$sel[1].' title="'._YES.'" /> //<label class="yes" for="'.$name.'">'._YES.'</label> //<input type="radio" name="'.$name.'" value="0" '.$sel[0].' title="'._NO.'" /> //<label class="no" for="'.$name.'">'._NO.'</label> '; } /*********************************************************************************** string theme_select_option Creates a selection dropdown box of all given variables in the array $name : name for the <select> $value: current/default value $array: array like array("value1","value2") ************************************************************************************/ function theme_select_option($name, $value, $array) { $sel[$value] = ' selected="selected"'; $select = '<select class="set" name="'.$name.'" id="'.$name."">\n"; foreach($array as $var) { $select .= '<option'.(isset($sel[$var])?$sel[$var]:'').">$var</option>\n"; } return $select.'</select>'; } /*********************************************************************************** string theme_select_box Creates a selection dropdown box of all given variables in the multi array $name : name for the <select> $value: current/default value $array: array like array("value1 => title1","value2 => title2") ************************************************************************************/ function theme_select_box($name, $value, $array) { $select = '<select class="set" name="'.$name.'" id="'.$name."">\n"; foreach($array as $val => $title) { $select .= "<option value="$val"".(($val==$value) ? ' selected="selected"' : '').">$title</option>\n"; } return $select.'</select>'; }

While it runs, the blocks dont show up so something is clearly still broke.
You can view the results here www.thelegionoflight.n.../index.php
Scroll down to the very bottm, i have turned on debugging and it gives the error:
includes/classes/blocks.php
Notice line 77: Undefined property: ltr
Notice line 77: Undefined property: right

Any help i can get resolving this issue and getting this theme back working would be greatly appreciated.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
9.1.2.1


sorry about that the theme.php code did not show up, so here it is

<?php /* Theme Name: fisubsilver shadow */ /* Theme Design: coldblooded (www.nukemods.com) */ /* version 3.0 */ /* Theme inspired by the phpbb2 style legion by */ /* Daz (http://www.forumimages.com/) */ /* CPG NUKE 9.0 COMPLIANT */ /* Released under GNU GPL */ if (!defined('CPG_NUKE')) { exit; } $gfxcolor = '#C0C000'; $bgcolor1 = '#FFFFFF'; $bgcolor2 = '#D3DFE3'; $bgcolor3 = '#EFEFEF'; $bgcolor4 = '#FFC53A'; $textcolor1 = '#009900'; $textcolor2 = '#000000'; $hr = 1; # 1 to have horizonal rule in comments instead of table bgcolor function OpenTable() { global $bgcolor1, $bgcolor2; echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">" . " <tr>" . " <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">" . " <tr>" . " <td bgcolor=\"#006699\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . " <tr>" . " <td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">" . " <tr> " . " <td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">" . " <tr> " . " <td>" .""; } function CloseTable() { echo"</td>" . " </tr>" . " </table></td>" . " </tr>" . " </table></td>" . " </tr>" . " </table></td>" . " </tr>" . "</table>" . "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tbl\"><tr><td class=\"tbll\"><img src=\"images/spacer.gif\" alt=\"\" width=\"8\" height=\"4\" /></td><td class=\"tblbot\"><img src=\"images/spacer.gif\" alt=\"\" width=\"8\" height=\"4\" /></td><td class=\"tblr\"><img src=\"images/spacer.gif\" alt=\"\" width=\"8\" height=\"4\" /></td></tr></table>" . "</td>" . " </tr>" . "</table>" .""; } function OpenTable2() { global $bgcolor1, $bgcolor2; echo"<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">" . " <tr>" . " <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">" . " <tr>" . " <td bgcolor=\"#006699\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . " <tr>" . " <td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">" . " <tr> " . " <td bgcolor=\"#EAEDF4\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">" . " <tr> " . " <td>" .""; } function CloseTable2() { echo"</td>" . " </tr>" . " </table></td>" . " </tr>" . " </table></td>" . " </tr>" . " </table></td>" . " </tr>" . "</table>" . "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tbl\"><tr><td class=\"tbll\"><img src=\"images/spacer.gif\" alt=\"\" width=\"8\" height=\"4\" /></td><td class=\"tblbot\"><img src=\"images/spacer.gif\" alt=\"\" width=\"8\" height=\"4\" /></td><td class=\"tblr\"><img src=\"images/spacer.gif\" alt=\"\" width=\"8\" height=\"4\" /></td></tr></table>" . "</td>" . " </tr>" . "</table>" .""; } function themeheader() { global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $themeblockside, $showblocks, $site_logo, $userinfo, $Blocks; $imgr = $imgl = ''; if ($showblocks) { if ((_TEXT_DIR == 'left' && $showblocks > 1) || (_TEXT_DIR == 'right' && !isset($_GET['hideleftblocks']))) { $img = 'minus.gif'; if ($Blocks->hideblock('601')) { //block is collapsed so hide it $img = 'plus.gif'; } $imgr = '<img align="right" alt="Toggle Content" title="Toggle Content" id="pic601" src="themes/legion/images/'.$img.'" onclick="blockswitch(\'601\');" style="cursor:pointer" />'; } if ((_TEXT_DIR == 'ltr' && !isset($_GET['hideleftblocks'])) || (_TEXT_DIR == 'rtl' && $showblocks > 1)) { $img = 'minus.gif'; if ($Blocks->hideblock('600')) { $img = 'plus.gif'; } $imgl = '<img align="left" alt="Toggle Content" title="Toggle Content" id="pic600" src="themes/legion/images/'.$img.'" onclick="blockswitch(\'600\');" style="cursor:pointer" />'; } } $cpgtpl->assign_vars(array( 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'), 'B_L_VISIBLE' => $Blocks->hideblock('600') ? 'style="display: none"' : '', 'B_L_HIDDEN' => $Blocks->hideblock('600') ? '' : 'style="display: none"', 'G_LEFTIMAGE' => $imgl, 'G_RIGHTIMAGE' => $imgr, 'S_IS_ADMIN' => is_admin(), 'S_CAN_ADMIN' => can_admin(), 'S_IS_USER' => is_user(), 'S_LEFTBLOCKS' => ($imgl != ''), 'S_LOGO' => $site_logo, 'S_SITENAME' => $sitename, 'S_HOME' => _HOME, 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false, 'S_FORUMS' => _ForumsLANG, 'S_USERNAME' => $userinfo['username'], 'S_MY_ACCOUNT' => _Your_AccountLANG, 'S_ADMIN' => _ADMINISTRATION, 'S_BANNER' => ($banners) ? viewbanner() : '', 'U_MAININDEX' => $mainindex, 'U_DOWNLOADS' => getlink('Downloads'), 'U_FORUMS' => getlink('Forums'), 'U_MY_ACCOUNT' => getlink('Your_Account'), 'U_ADMININDEX' => $adminindex, 'I18N' => 'enctype="multipart/form-data" accept-charset="utf-8"' ) ); $themeblockside = 'left'; $Blocks->display(_TEXT_DIR); $themeblockside = ''; } function themefooter() { global $showblocks, $banners, $cpgtpl, $foot1, $foot2, $foot3, $copyright, $start_time, $db, $themeblockside, $Blocks; $Blocks->display('right'); $cpgtpl->assign_vars(array( 'B_R_VISIBLE' => $Blocks->hideblock('601') ? 'style="display: none"' : '', 'B_R_HIDDEN' => $Blocks->hideblock('601') ? '' : 'style="display: none"', 'S_FOOTER' => footmsg() ) ); $cpgtpl->set_filenames(array('footer' => 'footer.html')); $cpgtpl->display('footer'); } /*********************************************************************************** void themesidebox Output the specific block to left or right $title : the title of the block $content: all formatted content for the block $bid : the database record ID of the block ************************************************************************************/ function themesidebox($title, $content, $bid=0) { global $cpgtpl, $themeblockside; $cpgtpl->assign_block_vars($themeblockside.'block', array( 'S_TITLE' => $title, 'S_CONTENT' => $content, 'S_BID' => $bid, 'S_VISIBLE' => hideblock($bid) ? 'style="display:none"' : '', 'S_HIDDEN' => hideblock($bid) ? '' : 'style="display:none"', 'S_IMAGE' => 'themes/legion/images/'.(hideblock($bid) ? 'plus.gif' : 'minus.gif') ) ); if ($themeblockside == '') { $cpgtpl->set_filenames(array('block' => 'block.html')); $cpgtpl->display('block'); } } /*********************************************************************************** string theme_open_form Creates start tag for form $get_link : link for action default blank $form_name : useful for styling and nbbcode $legend: optional string value is used in form lagend tag $border: optional use 1 to not show border on fieldset from stylesheet ************************************************************************************/ function theme_open_form($link, $form_name=false, $legend=false,$tborder=false) { $leg = $legend ? "<legend>$legend</legend>" : ''; $bord = $tborder ? $tborder : ''; $form_name = $form_name ? ' name="'.$form_name.'" id="'.$form_name.'"' :''; return '<fieldset '.$bord.'>'.$leg.'<form method="post" action="'.$link.'"'.$form_name.' enctype="multipart/form-data" accept-charset="utf-8">'; } function theme_close_form() { return '</form></fieldset>'; } /*********************************************************************************** string theme_yesno_option Creates 2 radio buttons with a Yes and No option $name : name for the <input> $value: current value, 1 = yes, 0 = no ************************************************************************************/ function theme_yesno_option($name, $value=0) { $sel[(!$value)] = ''; $sel[$value] = ' selected="selected"'; $select = '<select class="set" name="'.$name.'" id="'.$name."\">\n"; $select .= '<option value="1"'.$sel[1].">"._YES."</option>\n"; $select .= '<option value="0"'.$sel[0].">"._NO."</option>\n"; return $select.'</select>'; //$sel[intval($value)] = ' checked="checked"'; //return '<input type="radio" name="'.$name.'" value="1"'.$sel[1].' title="'._YES.'" /> //<label class="yes" for="'.$name.'">'._YES.'</label> //<input type="radio" name="'.$name.'" value="0" '.$sel[0].' title="'._NO.'" /> //<label class="no" for="'.$name.'">'._NO.'</label> '; } /*********************************************************************************** string theme_select_option Creates a selection dropdown box of all given variables in the array $name : name for the <select> $value: current/default value $array: array like array("value1","value2") ************************************************************************************/ function theme_select_option($name, $value, $array) { $sel[$value] = ' selected="selected"'; $select = '<select class="set" name="'.$name.'" id="'.$name."\">\n"; foreach($array as $var) { $select .= '<option'.(isset($sel[$var])?$sel[$var]:'').">$var</option>\n"; } return $select.'</select>'; } /*********************************************************************************** string theme_select_box Creates a selection dropdown box of all given variables in the multi array $name : name for the <select> $value: current/default value $array: array like array("value1 => title1","value2 => title2") ************************************************************************************/ function theme_select_box($name, $value, $array) { $select = '<select class="set" name="'.$name.'" id="'.$name."\">\n"; foreach($array as $val => $title) { $select .= "<option value=\"$val\"".(($val==$value) ? ' selected="selected"' : '').">$title</option>\n"; } return $select.'</select>'; }

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
9.1.2.1


merged ...

DF TIPS | Upgrade| Find Your Signature Specs|
"A bug in the code is worth two in the documentation. "

Please enter your server specs in your user profile! 😢


I've taken the plunge and gone for the upgrade (see the site in my sig). There were a couple of issues with the theme that I am working my way through but I haven't had a single module or block issue - That's pretty impressive so thanks to all who've put the work in!

I've just got to work out exactly what I've gained in upgrading now, and how to work the new blocks admin...

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


www.dizfunkshunal.com/...id=22.html

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Multiple Setups


Ah, my 9.2 is completely different from that!

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Then something is not correct

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Multiple Setups


It's all changed in 9.2 I think - how do you do a screengrab in vista? ctrl-prtscn doesn't seem to work...

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

All times are UTC


Jump to: