vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4 CMS] AdminCP add 2 options for the Section Manager (https://vborg.vbsupport.ru/showthread.php?t=230946)

Coroner 12-22-2009 10:00 PM

[HOW TO - vB4 CMS] AdminCP add 2 options for the Section Manager
 
1 Attachment(s)
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:
Code:

                                <td class=\"thead\">" . $vbphrase['viewcount'] . "</td>".
/*                                <td class=\"thead\">" . $vbphrase['layout'] . "</td>
                                <td class=\"thead\">" . $vbphrase['style'] . "</td> */
                        " </tr>";

change it into:
Code:

                                <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:
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:
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";

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).

Lynne 12-23-2009 03:55 PM

Thank you. I don't know why they don't have this in the Section Manager by default.

Coroner 12-23-2009 04:46 PM

I do not know it, too :confused:

This will also work in 4.0.0.PL1

beduino 12-24-2009 07:18 PM

Thanks a lot
very useful

all the best
joao barroca
aka beduino

Antivirus 12-24-2009 10:57 PM

Quote:

Originally Posted by Lynne (Post 1936515)
Thank you. I don't know why they don't have this in the Section Manager by default.

I agree Lynne! Nice work Coroner :)

Hasanudin 12-25-2009 05:19 PM

finally.. great!

thank u..

Alfa1 12-25-2009 08:05 PM

I think its a bug that they have forgotten to include this. Thanks!

Cmangum 02-01-2010 08:57 PM

Thanks a bunch it worked perfect

ahmedipa 02-03-2010 08:00 AM

very good change in order to improve the CMS

Chickenpotpie 02-24-2010 09:21 PM

Worked very well in 4.0.2. Thanks for this!

-CP


All times are GMT. The time now is 12:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01083 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete