Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all articles
Browse latest Browse all 685

[Tutorial] Edit Stylesheet in Advanced Mode by Default

$
0
0
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:
Code:
$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:
Code:
$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:
Code:
$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:
Code:
$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.

Viewing all articles
Browse latest Browse all 685

Trending Articles