Template Sections are Editable
This bug came back as a result of the fix for another template bug here:
http://www.crackedeggstudios.com/issues/857/
Fixed in the current ZIP (2.5.6).
If you already downloaded before I posted this, download again and replace:
- vault/special_class_bbcode.php
- vault/special_plugins_bbcode.php
OR make the file edits. In
vault/special_class_bbcode.php, find:
Code:
'no_smilies' => 0,
'strip_space_after' => 0,
Add after:
Code:
if ($node['name'] == 'noedit')
{
continue;
}
$pending_text = '';
Replace with:
Code:
$pending_text = '';
if ($node['name'] == 'noedit')
{
if ($node['closing'] == false)
{
$parse_options['no_edit'] = 1;
}
else
{
$parse_options['no_edit'] = 0;
}
continue;
}
Find:
Code:
if (isset($this->tag_list["$current_cycle"]["$has_option"]["$open[name]"]))
{
Add after:
Code:
if (!empty($parse_options['no_edit']))
{
$open['no_edit'] = 1;
}
In
vault/special_plugins_bbcode.php, find:
Code:
foreach ($parser->stack AS $surrounding)
{
if ($surrounding['name'] != 'noedit' AND $surrounding['name'] != 'table')
{
continue;
}
$vault->postbit['sections'][$parser->edit_heading]['noedit'] = true;
}
Replace with:
Code:
if (count($parser->stack) > 1)
{
foreach ($parser->stack AS $surrounding)
{
if ($surrounding['name'] != 'table')
{
continue;
}
$vault->postbit['sections'][$parser->edit_heading]['noedit'] = true;
}
}
if (!empty($parser->current_tag['no_edit']))
{
$vault->postbit['sections'][$parser->edit_heading]['noedit'] = true;
}
Replace with:
Code:
if (!empty($parser->current_tag['no_edit']))
{
$vault->postbit['sections'][$parser->edit_heading]['noedit'] = true;
}