mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 10:01:55 +02:00
Hope this works ...
git-svn-id: file:///svn/phpbb/trunk@2039 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -6,9 +6,6 @@ $phpbb_root_path = "./";
|
|||||||
include($phpbb_root_path . 'extension.inc');
|
include($phpbb_root_path . 'extension.inc');
|
||||||
include($phpbb_root_path . 'common.'.$phpEx);
|
include($phpbb_root_path . 'common.'.$phpEx);
|
||||||
|
|
||||||
$subsilver_themes_sql = "INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3, img_size_poll, img_size_privmsg) VALUES (1, 'subSilver', 'subSilver', '', '', 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', '', '', '', '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', '', 'row1', 'row2', '', 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, \'Courier New\', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', '', '', '', '','')";
|
|
||||||
$subsilver_themes_names_sql = "INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES (1, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '')";
|
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
switch ( SQL_LAYER )
|
switch ( SQL_LAYER )
|
||||||
@@ -48,13 +45,14 @@ switch ( SQL_LAYER )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$errored = false;
|
$errored = false;
|
||||||
for($i = 0; $i < count($sql); $i++)
|
for($i = 0; $i < count($sql); $i++)
|
||||||
{
|
{
|
||||||
echo "Running >>> " . $sql[$i];
|
echo "Running >>> " . $sql[$i];
|
||||||
|
|
||||||
$result = $db->sql_query($sql[$i]);
|
$result = $db->sql_query($sql[$i]);
|
||||||
|
|
||||||
if ( !$result )
|
if ( !$result )
|
||||||
{
|
{
|
||||||
$errored = true;
|
$errored = true;
|
||||||
@@ -74,6 +72,33 @@ switch ( SQL_LAYER )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$sql = "SELECT themes_id
|
||||||
|
FROM " . THEMES_TABLE . "
|
||||||
|
WHERE template_name = 'subSilver'";
|
||||||
|
if( !($result = $db->sql_query($sql)) )
|
||||||
|
{
|
||||||
|
die("Couldn't obtain subSilver id");
|
||||||
|
}
|
||||||
|
|
||||||
|
if( $row = $db->sql_fetchrow($result) )
|
||||||
|
{
|
||||||
|
$theme_id = $row['themes_id'];
|
||||||
|
|
||||||
|
$sql = "UPDATE " . THEMES_TABLE . "
|
||||||
|
SET head_stylesheet = '', body_background = '', body_bgcolor = 'E5E5E5', body_text = '000000', body_link = '006699', body_vlink = '5493B4', body_alink = '', body_hlink = 'DD6900', tr_color1 = 'EFEFEF', tr_color2 = 'DEE3E7', tr_color3 = 'D1D7DC', tr_class1 = 'cellpic1', tr_class2 = 'cellpic3', tr_class3 = 'cellpic2', th_color1 = '98AAB1', th_color2 = '006699', th_color3 = 'FFFFFF', th_class1 = '', th_class2 = '', th_class3 = '', td_color1 = 'FAFAFA', td_color2 = 'FFFFFF', td_color3 = '', td_class1 = 'row1', td_class2 = 'row2', td_class3 = '', fontface1 = 'Verdana, Arial, Helvetica, sans-serif', fontface2 = 'Trebuchet MS', fontface3 = 'Courier, \'Courier New\', sans-serif', fontsize1 = 10, fontsize2 = 11, fontsize3 = 12, fontcolor1 = '444444', fontcolor2 = '006600', fontcolor3 = 'FFA34F', span_class1 = '', span_class2 = '', span_class3 = ''";
|
||||||
|
if ( !($result = $db->sql_query($sql)) )
|
||||||
|
{
|
||||||
|
die("Couldn't update subSilver theme");
|
||||||
|
}
|
||||||
|
|
||||||
|
$subsilver_themes_names_sql = "INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name)
|
||||||
|
VALUES ($theme_id, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '')";
|
||||||
|
if ( !($result = $db->sql_query($sql)) )
|
||||||
|
{
|
||||||
|
echo "WARNING >> Couldn't insert subSilver name info";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "SELECT post_id, topic_id
|
$sql = "SELECT post_id, topic_id
|
||||||
FROM " . POSTS_TABLE . "
|
FROM " . POSTS_TABLE . "
|
||||||
GROUP BY topic_id ASC
|
GROUP BY topic_id ASC
|
||||||
@@ -104,7 +129,6 @@ switch ( SQL_LAYER )
|
|||||||
echo "\n<br /><br />\nCOMPLETE! Please delete this file before continuing!<br />\n";
|
echo "\n<br /><br />\nCOMPLETE! Please delete this file before continuing!<br />\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Reference in New Issue
Block a user