Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Change Number of Post Icon Columns on New thread / Post Reply Details »»
Change Number of Post Icon Columns on New thread / Post Reply
Version: 1.00, by markbolyard markbolyard is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.7.0 RC 2 Rating:
Released: 04-11-2008 Last Update: Never Installs: 6
Re-useable Code Code Changes Translations  
No support by the author.

I recently had to search the forums to locate where to change the number of columns for the post icons in the New Thread and Post Reply. I did find threads refering the the file to be modified, but no info as to where it needed changed.

So, here it is for those looking to change the number of columns displayed for your post icons. Useful for those with narrow fixed width styles where the icons may cause table breaks, or for those with fluid designs that would allow for more columns displayed.

Edit your includes/functions_newpost.php, locate the following section of code:

Code:
	while ($icon = $vbulletin->db->fetch_array($icons))
	{
		$show['posticons'] = true;
		if ($numicons % 7 == 0 AND $numicons != 0)
		{
			$posticonbits .= "</tr><tr><td>&nbsp;</td>";
		}

		$numicons++;

		$iconid = $icon['iconid'];
		$iconpath = $icon['iconpath'];
		$alttext = $icon['title'];
		if ($seliconid == $iconid)
		{
			$iconchecked = 'checked="checked"';
			$selectedicon = array('src' => $iconpath, 'alt' => $alttext);
		}
		else
		{
			$iconchecked = '';
		}

		($hook = vBulletinHook::fetch_hook('posticons_bit')) ? eval($hook) : false;

		eval('$posticonbits .= "' . fetch_template('posticonbit') . '";');

	}

	$remainder = $numicons % 7;

	if ($remainder)
	{
		$remainingspan = 2 * (7 - $remainder);
		$show['addedspan'] = true;
Change each instance of the number 7, to the desired number of columns. Save, and upload the modified file.

Remember to always keep a backup of the original file in case of bad file edits, and if you upgrade in the future, you will have to edit this file again.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-12-2008, 05:07 AM
Playa82 Playa82 is offline
 
Join Date: Mar 2006
Location: Germany
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

demo ?
Reply With Quote
  #3  
Old 04-13-2008, 04:00 AM
Tom_S Tom_S is offline
 
Join Date: Jan 2007
Location: VA Beach
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So first I changed mine to 9 just to see what the heck you are talking about and I got nadda so I changed it to 20 and I still got nadda. So what the heck are you talking about?
Reply With Quote
  #4  
Old 04-13-2008, 06:07 AM
rooban12 rooban12 is offline
 
Join Date: May 2007
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any screen shots?
Reply With Quote
  #5  
Old 04-13-2008, 10:32 AM
markbolyard's Avatar
markbolyard markbolyard is offline
 
Join Date: Apr 2005
Location: Maryland
Posts: 629
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here you go. This again is in the advanced reply / new thread display. The area highlighted indicates the rows displayed when adjusting this number.
Reply With Quote
  #6  
Old 04-13-2008, 09:51 PM
Tom_S Tom_S is offline
 
Join Date: Jan 2007
Location: VA Beach
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
Reply With Quote
  #7  
Old 06-15-2008, 02:49 AM
donnyaz's Avatar
donnyaz donnyaz is offline
 
Join Date: Aug 2006
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

simple and awesome
Reply With Quote
  #8  
Old 09-19-2008, 04:23 AM
Moyses's Avatar
Moyses Moyses is offline
 
Join Date: Mar 2002
Location: El Salvador
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks, so with smilies, how can I do it? anyone?
Reply With Quote
  #9  
Old 09-22-2008, 10:30 AM
eTiKeT?'s Avatar
eTiKeT? eTiKeT? is offline
 
Join Date: Aug 2008
Location: T?rkiye
Posts: 257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very Nice Thank

Quote:
if ($numicons % 7 == 0 AND $numicons != 0)
Reply With Quote
  #10  
Old 03-09-2009, 02:37 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works a treat with 3.8.1 PL1 - Thanks
Reply With Quote
Reply


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 01:41 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.04933 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete