Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles

Reply
 
Thread Tools
[HOW TO - vB4 CMS] AdminCP add 2 options for the Section Manager
Coroner
Join Date: Feb 2008
Posts: 797

I start for about 25 years with an TI and learned Basic. Next was an Commodere 64, Amiga. On Amiga I learned Assembler and wrote some Games. Many years later again, I learned myself (without book ...) php,html and javascript. Then I wrote some small

Germany
Show Printable Version Email this Page Subscription
Coroner Coroner is offline 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:
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).
Attached Images
File Type: jpg Bild 1.jpg (51.7 KB, 0 views)
File Type: jpg Bild 2.jpg (61.9 KB, 0 views)
Reply With Quote
  #2  
Old 12-23-2009, 03:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you. I don't know why they don't have this in the Section Manager by default.
Reply With Quote
  #3  
Old 12-23-2009, 04:46 PM
Coroner Coroner is offline
 
Join Date: Feb 2008
Location: Germany
Posts: 797
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I do not know it, too

This will also work in 4.0.0.PL1
Reply With Quote
  #4  
Old 12-24-2009, 07:18 PM
beduino's Avatar
beduino beduino is offline
 
Join Date: Dec 2005
Location: Rio de Janeiro
Posts: 280
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot
very useful

all the best
joao barroca
aka beduino
Reply With Quote
  #5  
Old 12-24-2009, 10:57 PM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Thank you. I don't know why they don't have this in the Section Manager by default.
I agree Lynne! Nice work Coroner
Reply With Quote
  #6  
Old 12-25-2009, 05:19 PM
Hasanudin's Avatar
Hasanudin Hasanudin is offline
 
Join Date: Jun 2003
Location: Indonesia
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

finally.. great!

thank u..
Reply With Quote
  #7  
Old 12-25-2009, 08:05 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think its a bug that they have forgotten to include this. Thanks!
Reply With Quote
  #8  
Old 02-01-2010, 08:57 PM
Cmangum Cmangum is offline
 
Join Date: Feb 2009
Location: Utah
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a bunch it worked perfect
Reply With Quote
  #9  
Old 02-03-2010, 08:00 AM
ahmedipa ahmedipa is offline
 
Join Date: Feb 2009
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very good change in order to improve the CMS
Reply With Quote
  #10  
Old 02-24-2010, 09:21 PM
Chickenpotpie Chickenpotpie is offline
 
Join Date: Feb 2010
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked very well in 4.0.2. Thanks for this!

-CP
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:49 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04575 seconds
  • Memory Usage 2,303KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete