While there may be different ways of doing things, this is one way of manipulating the style.cfg to force changes to the default.cfg without actually having to edit or import the default.cfg directly into the style folder.
Using Limun's vbblack style in this example, one can easily see where the style name should be added to the config.
Spoiler: [ Show ]
Spoiler: [ Hide ]
<?php
/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license h**p://opensource.org/licenses/GPL-license.php GNU Public License
*
*/
$color = $row['body_background'];
$css_color = $color;
$full_server_url = create_server_url();
$default_images_root = 'templates/default/images/';
$current_template_images = $current_template_path . '/images/' . $color . '/';
$png_colors = array('vbblack');
$png_buttons_colors = array('vbblack');
$images_extension = in_array($color, $png_colors) ? 'png' : 'gif';
$buttons_extension = in_array($color, $png_buttons_colors) ? 'png' : 'gif';
$extra_padding = in_array($color, $png_buttons_colors) ? '" style="margin-bottom:2px; margin-left:2px;' : '';
// Start Forced changes to the default.cfg (This disables the image fade function)
$img_fade = '';
$img_fade_nm = '';
// End forced changes to the default.cfg
// #### Note: This markup is strictly related to a specific style.
// You WILL need to change it for different styles. ####
if ($color == 'vbblack')
{
$images['page_begin'] = '<div id="wrapper"><div id="wrapper1"><div id="wrapper2"><div id="wrapper3"><div id="wrapper4"><div id="wrapper5"><div id="wrapper6"><div id="wrapper7"><div id="wrapper-inner">';
$images['page_end'] = '</div></div></div></div></div></div></div></div></div>';
}
$images['tbl_b_l'] = '';
$images['tbl_b_c'] = '';
$images['tbl_b_r'] = '';
$images['tbl_f_l'] = '';
$images['tbl_f_c'] = '';
$images['tbl_f_r'] = '';
$images['tbl_h_l'] = '<div class="tbl"><div class="tbl-h-l"><div class="tbl-h-r"><div class="tbl-h-c"><div class="tbl-title">';
$images['tbl_h_c'] = '';
$images['tbl_h_r'] = '</div></div></div></div>';
$images['tbl_f_l'] = '<div class="tbl-f-l"><div class="tbl-f-r"><div class="tbl-f-c"> ';
$images['tbl_f_c'] = '';
$images['tbl_f_r'] = '</div></div></div></div>';
$images['tbl_h_l_house'] = $images['tbl_h_l'];
$images['tbl_h_l_alt'] = $images['tbl_h_l'];
$images['tbl_h_r_alt'] = $images['tbl_h_r'];
$images['tbl_h_l_small_b'] = $images['tbl_h_l'];
$images['tbl_h_r_small_b'] = $images['tbl_h_r'];
$images['tbl_h_l_small_y'] = $images['tbl_h_l'];
$images['tbl_h_r_small_y'] = $images['tbl_h_r'];
// #### End Specific Markup ####
if ($color == 'vbblack')
{
$copyright_link = '<span class="copyright">Design by <a href="h**p://***.icyphoenix.com/profile.php?mode=viewprofile&u=3336" target="_blank">Limun</a> </span>';
}
include(IP_ROOT_PATH . 'templates/default/default.cfg');
// Example: these images in the default.cfg are .gif
// $images['menu_sep'] = $current_template_buttons . 'menu_sep.gif';
// $images['nav_menu_sep'] = $current_template_buttons . 'menu_sep.gif';
// Here we change them to .png
// Start Style specific images
$images['menu_sep'] = $current_template_buttons . 'menu_sep.png';
$images['nav_menu_sep'] = $current_template_buttons . 'menu_sep.png';
// END Style specific images
// Required template variables used for switching fixed image.extensions - .gif to .png etc.
// You do not need to edit these vars. Simply add any changes above - after "// Start Style specific images"
$template->assign_vars(array(
'IMG_ARROW_UP' => '<img src="' . $images['arrow_up'] . '" alt="up" title="up" />',
'IMG_ARROW_RIGHT' => '<img src="' . $images['arrow_right'] . '" alt="right" title="right" />',
'IMG_ARROW_DOWN' => '<img src="' . $images['arrow_down'] . '" alt="down" title="down" />',
'IMG_ARROW_LEFT' => '<img src="' . $images['arrow_left'] . '" alt="left" title="left" />',
'IMG_MENU_SEP' => $images['menu_sep'],
'IMG_POST_PREV' => $images['icon_post_prev'],
'IMG_POST_NEXT' => $images['icon_post_next'],
'IMG_MAXIMISE' => $images['maximise'],
'IMG_MINIMISE' => $images['minimise'],
'IMG_NAV_MENU_SEP' => '<img src="' . $images['nav_menu_sep'] . '" alt="" title="" />',
'IMG_NAV_MENU_APPLICATION' => $images['nav_menu_application'],
'IMG_NAV_MENU_NEWSPAPER' => $images['nav_menu_newspaper'],
'IMG_NAV_MENU_INFORMATION' => $images['nav_menu_information'],
'IMG_NAV_MENU_GROUP' => $images['nav_menu_group'],
'IMG_NAV_MENU_PALETTE' => $images['nav_menu_palette'],
'IMG_NAV_MENU_WORLD' => $images['nav_menu_world'],
'IMG_NAV_MENU_RANDOM_QUOTE' => $images['nav_menu_random_quote'],
'IMG_NAV_MENU_SPONSOR' => $images['nav_menu_sponsor'],
'IMG_NAV_MENU_FEED' => $images['nav_menu_feed'],
'IMG_NAV_MENU_RSS_FEED' => $images['nav_menu_rss_feed'],
'IMG_NAV_MENU_GAMES' => $images['nav_menu_games'],
'IMG_NAV_MENU_GAMES_ALT' => $images['nav_menu_games_alt'],
'IMG_NAV_MENU_PM' => $images['nav_menu_pm'],
'IMG_NAV_MENU_STAR' => $images['nav_menu_star'],
'IMG_NAV_MENU_USERS' => $images['nav_menu_users'],
'IMG_NAV_MENU_WSETTINGS' => $images['nav_menu_wsettings'],
'RSS_NEWS_HELP' => '<a href="javascript:rss_news_help()">' . $lang['Rss_news_help'] . '</a>',
'IMG_CALENDAR' => $images['icon_calendar'],
'IMG_VF_ANN' => $images['vf_topic_ann'],
'IMG_VF_CAL' => $images['vf_topic_cal'],
'IMG_VF_GA' => $images['vf_topic_ga'],
'IMG_VF_IMP' => $images['vf_topic_imp'],
'IMG_VF_NEWS' => $images['vf_topic_news'],
'IMG_VF_NOR' => $images['vf_topic_nor'],
'IMG_VF_POLL' => $images['vf_topic_poll'],
)
);
// Start Add new template variables
$images['tbl_cw_t'] = '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="right" width="11"><img src="' . $current_template_images . 'tbl-top-l-main.png" width="11" alt="" /></td><td class="cwtbl_top_c" width="100%"></td><td width="11" align="left"><img src="' . $current_template_images . 'tbl-top-r-main.png" width="11" alt="" /></td></tr><tr><td class="cwtbl_l_s" width="11"></td><td>';
$images['tbl_cw_b'] = '</td><td class="cwtbl_r_s" width="11"></td></tr><tr><td width="11"><img src="' . $current_template_images . 'tbl-f-l-main.png" width="11" height="10" alt="" /></td><td class="cwtbl_f_c"></td><td width="11"><img src="' . $current_template_images . 'tbl-f-r-main.png" width="11" height="10" alt="" /></td></tr></table>';
$template->assign_vars(array(
'IMG_CWT' => $images['tbl_cw_t'],
'IMG_CWB' => $images['tbl_cw_b'],
)
);
// End Add new template variables
// If you are changing image folder locations - make the changes after this line.
// SUDOKU - BEGIN
if (defined('IN_SUDOKU'))
{
$images['sudoku_x'] = $current_template_images . 'sudoku/sudoku_blank.gif';
$images['sudoku_1'] = $current_template_images . 'sudoku/1_given.png';
$images['sudoku_2'] = $current_template_images . 'sudoku/2_given.png';
$images['sudoku_3'] = $current_template_images . 'sudoku/3_given.png';
$images['sudoku_4'] = $current_template_images . 'sudoku/4_given.png';
$images['sudoku_5'] = $current_template_images . 'sudoku/5_given.png';
$images['sudoku_6'] = $current_template_images . 'sudoku/6_given.png';
$images['sudoku_7'] = $current_template_images . 'sudoku/7_given.png';
$images['sudoku_8'] = $current_template_images . 'sudoku/8_given.png';
$images['sudoku_9'] = $current_template_images . 'sudoku/9_given.png';
$images['sudoku_11'] = $current_template_images . 'sudoku/11_given.png';
$images['sudoku_12'] = $current_template_images . 'sudoku/12_given.png';
$images['sudoku_13'] = $current_template_images . 'sudoku/13_given.png';
$images['sudoku_14'] = $current_template_images . 'sudoku/14_given.png';
$images['sudoku_15'] = $current_template_images . 'sudoku/15_given.png';
$images['sudoku_16'] = $current_template_images . 'sudoku/16_given.png';
$images['sudoku_17'] = $current_template_images . 'sudoku/17_given.png';
$images['sudoku_18'] = $current_template_images . 'sudoku/18_given.png';
$images['sudoku_19'] = $current_template_images . 'sudoku/19_given.png';
$images['sudoku_21'] = $current_template_images . 'sudoku/1_ran.png';
$images['sudoku_22'] = $current_template_images . 'sudoku/2_ran.png';
$images['sudoku_23'] = $current_template_images . 'sudoku/3_ran.png';
$images['sudoku_24'] = $current_template_images . 'sudoku/4_ran.png';
$images['sudoku_25'] = $current_template_images . 'sudoku/5_ran.png';
$images['sudoku_26'] = $current_template_images . 'sudoku/6_ran.png';
$images['sudoku_27'] = $current_template_images . 'sudoku/7_ran.png';
$images['sudoku_28'] = $current_template_images . 'sudoku/8_ran.png';
$images['sudoku_29'] = $current_template_images . 'sudoku/9_ran.png';
}
// SUDOKU - END
?>
/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license h**p://opensource.org/licenses/GPL-license.php GNU Public License
*
*/
$color = $row['body_background'];
$css_color = $color;
$full_server_url = create_server_url();
$default_images_root = 'templates/default/images/';
$current_template_images = $current_template_path . '/images/' . $color . '/';
$png_colors = array('vbblack');
$png_buttons_colors = array('vbblack');
$images_extension = in_array($color, $png_colors) ? 'png' : 'gif';
$buttons_extension = in_array($color, $png_buttons_colors) ? 'png' : 'gif';
$extra_padding = in_array($color, $png_buttons_colors) ? '" style="margin-bottom:2px; margin-left:2px;' : '';
// Start Forced changes to the default.cfg (This disables the image fade function)
$img_fade = '';
$img_fade_nm = '';
// End forced changes to the default.cfg
// #### Note: This markup is strictly related to a specific style.
// You WILL need to change it for different styles. ####
if ($color == 'vbblack')
{
$images['page_begin'] = '<div id="wrapper"><div id="wrapper1"><div id="wrapper2"><div id="wrapper3"><div id="wrapper4"><div id="wrapper5"><div id="wrapper6"><div id="wrapper7"><div id="wrapper-inner">';
$images['page_end'] = '</div></div></div></div></div></div></div></div></div>';
}
$images['tbl_b_l'] = '';
$images['tbl_b_c'] = '';
$images['tbl_b_r'] = '';
$images['tbl_f_l'] = '';
$images['tbl_f_c'] = '';
$images['tbl_f_r'] = '';
$images['tbl_h_l'] = '<div class="tbl"><div class="tbl-h-l"><div class="tbl-h-r"><div class="tbl-h-c"><div class="tbl-title">';
$images['tbl_h_c'] = '';
$images['tbl_h_r'] = '</div></div></div></div>';
$images['tbl_f_l'] = '<div class="tbl-f-l"><div class="tbl-f-r"><div class="tbl-f-c"> ';
$images['tbl_f_c'] = '';
$images['tbl_f_r'] = '</div></div></div></div>';
$images['tbl_h_l_house'] = $images['tbl_h_l'];
$images['tbl_h_l_alt'] = $images['tbl_h_l'];
$images['tbl_h_r_alt'] = $images['tbl_h_r'];
$images['tbl_h_l_small_b'] = $images['tbl_h_l'];
$images['tbl_h_r_small_b'] = $images['tbl_h_r'];
$images['tbl_h_l_small_y'] = $images['tbl_h_l'];
$images['tbl_h_r_small_y'] = $images['tbl_h_r'];
// #### End Specific Markup ####
if ($color == 'vbblack')
{
$copyright_link = '<span class="copyright">Design by <a href="h**p://***.icyphoenix.com/profile.php?mode=viewprofile&u=3336" target="_blank">Limun</a> </span>';
}
include(IP_ROOT_PATH . 'templates/default/default.cfg');
// Example: these images in the default.cfg are .gif
// $images['menu_sep'] = $current_template_buttons . 'menu_sep.gif';
// $images['nav_menu_sep'] = $current_template_buttons . 'menu_sep.gif';
// Here we change them to .png
// Start Style specific images
$images['menu_sep'] = $current_template_buttons . 'menu_sep.png';
$images['nav_menu_sep'] = $current_template_buttons . 'menu_sep.png';
// END Style specific images
// Required template variables used for switching fixed image.extensions - .gif to .png etc.
// You do not need to edit these vars. Simply add any changes above - after "// Start Style specific images"
$template->assign_vars(array(
'IMG_ARROW_UP' => '<img src="' . $images['arrow_up'] . '" alt="up" title="up" />',
'IMG_ARROW_RIGHT' => '<img src="' . $images['arrow_right'] . '" alt="right" title="right" />',
'IMG_ARROW_DOWN' => '<img src="' . $images['arrow_down'] . '" alt="down" title="down" />',
'IMG_ARROW_LEFT' => '<img src="' . $images['arrow_left'] . '" alt="left" title="left" />',
'IMG_MENU_SEP' => $images['menu_sep'],
'IMG_POST_PREV' => $images['icon_post_prev'],
'IMG_POST_NEXT' => $images['icon_post_next'],
'IMG_MAXIMISE' => $images['maximise'],
'IMG_MINIMISE' => $images['minimise'],
'IMG_NAV_MENU_SEP' => '<img src="' . $images['nav_menu_sep'] . '" alt="" title="" />',
'IMG_NAV_MENU_APPLICATION' => $images['nav_menu_application'],
'IMG_NAV_MENU_NEWSPAPER' => $images['nav_menu_newspaper'],
'IMG_NAV_MENU_INFORMATION' => $images['nav_menu_information'],
'IMG_NAV_MENU_GROUP' => $images['nav_menu_group'],
'IMG_NAV_MENU_PALETTE' => $images['nav_menu_palette'],
'IMG_NAV_MENU_WORLD' => $images['nav_menu_world'],
'IMG_NAV_MENU_RANDOM_QUOTE' => $images['nav_menu_random_quote'],
'IMG_NAV_MENU_SPONSOR' => $images['nav_menu_sponsor'],
'IMG_NAV_MENU_FEED' => $images['nav_menu_feed'],
'IMG_NAV_MENU_RSS_FEED' => $images['nav_menu_rss_feed'],
'IMG_NAV_MENU_GAMES' => $images['nav_menu_games'],
'IMG_NAV_MENU_GAMES_ALT' => $images['nav_menu_games_alt'],
'IMG_NAV_MENU_PM' => $images['nav_menu_pm'],
'IMG_NAV_MENU_STAR' => $images['nav_menu_star'],
'IMG_NAV_MENU_USERS' => $images['nav_menu_users'],
'IMG_NAV_MENU_WSETTINGS' => $images['nav_menu_wsettings'],
'RSS_NEWS_HELP' => '<a href="javascript:rss_news_help()">' . $lang['Rss_news_help'] . '</a>',
'IMG_CALENDAR' => $images['icon_calendar'],
'IMG_VF_ANN' => $images['vf_topic_ann'],
'IMG_VF_CAL' => $images['vf_topic_cal'],
'IMG_VF_GA' => $images['vf_topic_ga'],
'IMG_VF_IMP' => $images['vf_topic_imp'],
'IMG_VF_NEWS' => $images['vf_topic_news'],
'IMG_VF_NOR' => $images['vf_topic_nor'],
'IMG_VF_POLL' => $images['vf_topic_poll'],
)
);
// Start Add new template variables
$images['tbl_cw_t'] = '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="right" width="11"><img src="' . $current_template_images . 'tbl-top-l-main.png" width="11" alt="" /></td><td class="cwtbl_top_c" width="100%"></td><td width="11" align="left"><img src="' . $current_template_images . 'tbl-top-r-main.png" width="11" alt="" /></td></tr><tr><td class="cwtbl_l_s" width="11"></td><td>';
$images['tbl_cw_b'] = '</td><td class="cwtbl_r_s" width="11"></td></tr><tr><td width="11"><img src="' . $current_template_images . 'tbl-f-l-main.png" width="11" height="10" alt="" /></td><td class="cwtbl_f_c"></td><td width="11"><img src="' . $current_template_images . 'tbl-f-r-main.png" width="11" height="10" alt="" /></td></tr></table>';
$template->assign_vars(array(
'IMG_CWT' => $images['tbl_cw_t'],
'IMG_CWB' => $images['tbl_cw_b'],
)
);
// End Add new template variables
// If you are changing image folder locations - make the changes after this line.
// SUDOKU - BEGIN
if (defined('IN_SUDOKU'))
{
$images['sudoku_x'] = $current_template_images . 'sudoku/sudoku_blank.gif';
$images['sudoku_1'] = $current_template_images . 'sudoku/1_given.png';
$images['sudoku_2'] = $current_template_images . 'sudoku/2_given.png';
$images['sudoku_3'] = $current_template_images . 'sudoku/3_given.png';
$images['sudoku_4'] = $current_template_images . 'sudoku/4_given.png';
$images['sudoku_5'] = $current_template_images . 'sudoku/5_given.png';
$images['sudoku_6'] = $current_template_images . 'sudoku/6_given.png';
$images['sudoku_7'] = $current_template_images . 'sudoku/7_given.png';
$images['sudoku_8'] = $current_template_images . 'sudoku/8_given.png';
$images['sudoku_9'] = $current_template_images . 'sudoku/9_given.png';
$images['sudoku_11'] = $current_template_images . 'sudoku/11_given.png';
$images['sudoku_12'] = $current_template_images . 'sudoku/12_given.png';
$images['sudoku_13'] = $current_template_images . 'sudoku/13_given.png';
$images['sudoku_14'] = $current_template_images . 'sudoku/14_given.png';
$images['sudoku_15'] = $current_template_images . 'sudoku/15_given.png';
$images['sudoku_16'] = $current_template_images . 'sudoku/16_given.png';
$images['sudoku_17'] = $current_template_images . 'sudoku/17_given.png';
$images['sudoku_18'] = $current_template_images . 'sudoku/18_given.png';
$images['sudoku_19'] = $current_template_images . 'sudoku/19_given.png';
$images['sudoku_21'] = $current_template_images . 'sudoku/1_ran.png';
$images['sudoku_22'] = $current_template_images . 'sudoku/2_ran.png';
$images['sudoku_23'] = $current_template_images . 'sudoku/3_ran.png';
$images['sudoku_24'] = $current_template_images . 'sudoku/4_ran.png';
$images['sudoku_25'] = $current_template_images . 'sudoku/5_ran.png';
$images['sudoku_26'] = $current_template_images . 'sudoku/6_ran.png';
$images['sudoku_27'] = $current_template_images . 'sudoku/7_ran.png';
$images['sudoku_28'] = $current_template_images . 'sudoku/8_ran.png';
$images['sudoku_29'] = $current_template_images . 'sudoku/9_ran.png';
}
// SUDOKU - END
?>