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

as7apcool 02-24-2010 09:27 PM

Thanks 4 the good work

darren1981 02-25-2010 03:06 PM

Nice work mate :)

Has this been tested on 4.0.2 ? and if i install your mod / hack... will i need to re-install after the 4.0.3 release ?

Thanks

Coroner 02-26-2010 03:20 AM

No. Only of you overwrite the file itself by an upgrade.

bturaif 02-28-2010 10:10 AM

Great work, makes thing a lot easier.

crazyace 03-03-2010 12:40 PM

You may want to update the lines that it starts on. As of 4.0.2 PL1

1st Edit - Line: 3458

2nd Edit - Line: 3527

justasiam 03-09-2010 10:11 PM

Is there any way at all to do this without editing one of the php files. The problem I have with this is NOT editing the file, it is just that whenever an upgrade is performed, I have to remember to do this mod all over again. Very frustrating?

justasiam 03-12-2010 12:51 AM

Is there any answer to my question?

Mutt 04-05-2010 10:15 PM

thanks

Sadikb 04-07-2010 10:13 AM

Quote:

Originally Posted by justasiam (Post 2000560)
Is there any way at all to do this without editing one of the php files. The problem I have with this is NOT editing the file, it is just that whenever an upgrade is performed, I have to remember to do this mod all over again. Very frustrating?

No, if there's no php hook there.

K4GAP 04-28-2010 11:14 AM

Thanks,
Works on 4.0.3 but the line numbers are slightly different than you have listed for the different vb version.

Great work, thanks'

khamchihoa 04-18-2011 08:45 PM

Thank so much.

inigo 11-09-2011 07:35 PM

Someone try this on 4.1.7?

I think this is very useful,...

Thanks,

rjerina 04-25-2012 07:53 AM

The 2nd edit seems to have been moved or removed, I can't find any code similar with lines commented out.

Just uncommenting the lines in the first edit makes the CMS admincp pages not load :(

Prorockz 01-21-2013 07:08 PM

can you please provide code for 4.2 latest


All times are GMT. The time now is 01:49 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.02639 seconds
  • Memory Usage 1,764KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete