Coroner
12-22-2009, 10:00 PM
I wrote this article, 'cause when I started with CMS, I didn't found were to change the layout.
After a long of searching, reading and asking, I found it in the frontend.
But ... there is a way to change it in the AdminCP.
This change will add two more options inside the section-menue. See images (before/after).
OK, let's start.
Open the file packages/vbcms/contentmanager.php
at the line 3416 you will found this code:
<td class=\"thead\">" . $vbphrase['viewcount'] . "</td>".
/* <td class=\"thead\">" . $vbphrase['layout'] . "</td>
<td class=\"thead\">" . $vbphrase['style'] . "</td> */
" </tr>";
change it into:
<td class=\"thead\">" . $vbphrase['viewcount'] . "</td>
<td class=\"thead\">" . $vbphrase['layout'] . "</td>
<td class=\"thead\">" . $vbphrase['style'] . "</td>
</tr>";
a few line later, at 3485 you will found the following code:
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\">" . $section['viewcount'] . "</td>\n";
/* $result .= " <td class=\"$bgclass\" style=\"font-size:80%;\"><select id=\"layout_" . $section['nodeid']. "\" name=\"layout_" . $section['nodeid']. "\"
onchange=\"setFormValue('do','saveonelayout');
setFormValue('nodeid', " . $section['nodeid']. ");
document.getElementById('cms_data').submit();\">" . self::getLayoutSelect($section['layoutid'],
$section['nodeid']) . "</select></td>\n";
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\"><select id=\"style_" . $section['nodeid']. "\" name=\"style_" . $section['nodeid']. "\"
onchange=\"setFormValue('do','saveonestyle');
setFormValue('nodeid'," . $section['nodeid']. ");
document.getElementById('cms_data').submit();\">" . self::getStyleSelect($section['styleid'],
$section['nodeid']) . "</select></td>\n"; */
$result .= "</tr>\n";
change those lines into:
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\">" . $section['viewcount'] . "</td>\n";
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\"><select id=\"layout_" . $section['nodeid']. "\" name=\"layout_" . $section['nodeid']. "\"
onchange=\"setFormValue('do','saveonelayout');
setFormValue('nodeid', " . $section['nodeid']. ");
document.getElementById('cms_data').submit();\">" . self::getLayoutSelect($section['layoutid'],
$section['nodeid']) . "</select></td>\n";
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\"><select id=\"style_" . $section['nodeid']. "\" name=\"style_" . $section['nodeid']. "\"
onchange=\"setFormValue('do','saveonestyle');
setFormValue('nodeid'," . $section['nodeid']. ");
document.getElementById('cms_data').submit();\">" . self::getStyleSelect($section['styleid'],
$section['nodeid']) . "</select></td>\n";
$result .= "</tr>\n";
All those changes were done in the RC4 (I don't know if it's disabled in the 4.0.0PL1, I can't get the suite at the moment).
After a long of searching, reading and asking, I found it in the frontend.
But ... there is a way to change it in the AdminCP.
This change will add two more options inside the section-menue. See images (before/after).
OK, let's start.
Open the file packages/vbcms/contentmanager.php
at the line 3416 you will found this code:
<td class=\"thead\">" . $vbphrase['viewcount'] . "</td>".
/* <td class=\"thead\">" . $vbphrase['layout'] . "</td>
<td class=\"thead\">" . $vbphrase['style'] . "</td> */
" </tr>";
change it into:
<td class=\"thead\">" . $vbphrase['viewcount'] . "</td>
<td class=\"thead\">" . $vbphrase['layout'] . "</td>
<td class=\"thead\">" . $vbphrase['style'] . "</td>
</tr>";
a few line later, at 3485 you will found the following code:
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\">" . $section['viewcount'] . "</td>\n";
/* $result .= " <td class=\"$bgclass\" style=\"font-size:80%;\"><select id=\"layout_" . $section['nodeid']. "\" name=\"layout_" . $section['nodeid']. "\"
onchange=\"setFormValue('do','saveonelayout');
setFormValue('nodeid', " . $section['nodeid']. ");
document.getElementById('cms_data').submit();\">" . self::getLayoutSelect($section['layoutid'],
$section['nodeid']) . "</select></td>\n";
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\"><select id=\"style_" . $section['nodeid']. "\" name=\"style_" . $section['nodeid']. "\"
onchange=\"setFormValue('do','saveonestyle');
setFormValue('nodeid'," . $section['nodeid']. ");
document.getElementById('cms_data').submit();\">" . self::getStyleSelect($section['styleid'],
$section['nodeid']) . "</select></td>\n"; */
$result .= "</tr>\n";
change those lines into:
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\">" . $section['viewcount'] . "</td>\n";
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\"><select id=\"layout_" . $section['nodeid']. "\" name=\"layout_" . $section['nodeid']. "\"
onchange=\"setFormValue('do','saveonelayout');
setFormValue('nodeid', " . $section['nodeid']. ");
document.getElementById('cms_data').submit();\">" . self::getLayoutSelect($section['layoutid'],
$section['nodeid']) . "</select></td>\n";
$result .= " <td class=\"$bgclass\" style=\"font-size:80%;\"><select id=\"style_" . $section['nodeid']. "\" name=\"style_" . $section['nodeid']. "\"
onchange=\"setFormValue('do','saveonestyle');
setFormValue('nodeid'," . $section['nodeid']. ");
document.getElementById('cms_data').submit();\">" . self::getStyleSelect($section['styleid'],
$section['nodeid']) . "</select></td>\n";
$result .= "</tr>\n";
All those changes were done in the RC4 (I don't know if it's disabled in the 4.0.0PL1, I can't get the suite at the moment).