First of all, i'd try to use correct PHP
PHP Code:
if (!$istyles)
{
$istyles = array(
'pi_button_down' => array(
0 => '#98B5E2',
1 => '#000000',
2 => '0px',
3 => '1px solid #316AC5'
),
'pi_button_hover' => array(
0 => '#C1D2EE',
1 => '#000000',
2 => '0px',
3 => '1px solid #316AC5'
),
'pi_button_normal' => array(
0 => '#E1E1E2',
1 => '#000000',
2 => '1px',
3 => 'none'
),
'pi_button_selected' => array(
0 => '#F1F6F8',
1 => '#000000',
2 => '0px',
3 => '1px solid #316AC5'
),
'pi_menu_down' => array(
0 => '#98B5E2',
1 => '#316AC5',
2 => '0px',
3 => '1px solid #316AC5'
),
'pi_menu_hover' => array(
0 => '#C1D2EE',
1 => '#316AC5',
2 => '0px',
3 => '1px solid #316AC5',
),
'pi_menu_normal' => array(
0 => '#FFFFFF',
1 => '#000000',
2 => '0px',
3 => '1px solid #FFFFFF'
),
'pi_popup_down' => array(
0 => '#98B5E2',
1 => '#000000',
2 => '0px',
3 => '1px solid #316AC5'
)
);
}
Quote:
Originally Posted by showthread.php
PHP Code:
$istyles_js = construct_editor_styles_js();
|
Quote:
Originally Posted by functions_editor.php
PHP Code:
function construct_editor_styles_js($editorstyles = false)
{
// istyles - CSS in order: background / color / padding / border
global $istyles;
if (!is_array($istyles))
{
if (!$editorstyles)
{
$istyles = unserialize($GLOBALS['style']['editorstyles']);
}
else
{
$istyles = unserialize($editorstyles);
}
}
$istyle = array();
foreach ($istyles AS $key => $array)
{
$istyle[] = "\"$key\" : [ \"$array[0]\", \"$array[1]\", \"$array[2]\", \"$array[3]\" ]";
}
return implode(", ", $istyle);
}
|