MyBB Community Forums

Full Version: [Tutorial] Edit Stylesheet in Advanced Mode by Default
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Edit Stylesheet in Advanced Mode by Default
This tutorial is meant for administrators who have a solid understanding of CSS and would prefer to edit their stylesheets in the advanced mode. This saves you a click by opening up the editor in advanced mode instead of simple mode. This tutorial requires core file edits, so please make a backup.

This works for both 1.6 & 1.8.

Open up /admin/modules/style/themes.php

Find:
$table->construct_cell("<strong><a href=\"index.php?module=style-themes&amp;action=edit_stylesheet&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}\">{$filename}</a></strong>{$inherited}<br />{$attached_to}");

Replace with:
$table->construct_cell("<strong><a href=\"index.php?module=style-themes&amp;action=edit_stylesheet&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}&amp;mode=advanced\">{$filename}</a></strong>{$inherited}<br />{$attached_to}");

Find:
$popup->add_item($lang->edit_style, "index.php?module=style-themes&amp;action=edit_stylesheet&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}");

Replace With:
$popup->add_item($lang->edit_style, "index.php?module=style-themes&amp;action=edit_stylesheet&amp;file=".htmlspecialchars_uni($filename)."&amp;tid={$theme['tid']}&amp;mode=advanced");

Save and upload your file. Your stylesheets should now open in advanced mode by default.
Great post! Was exactly what I was looking for.
Works perfectly on 1.6.17.

Thanks jshort!