vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   New Posting Features - Change Number of Post Icon Columns on New thread / Post Reply (https://vborg.vbsupport.ru/showthread.php?t=175891)

markbolyard 04-11-2008 10:00 PM

Change Number of Post Icon Columns on New thread / Post Reply
 
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.

Playa82 04-12-2008 05:07 AM

demo ?

Tom_S 04-13-2008 04:00 AM

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?

rooban12 04-13-2008 06:07 AM

any screen shots?

markbolyard 04-13-2008 10:32 AM

Here you go. This again is in the advanced reply / new thread display. The area highlighted indicates the rows displayed when adjusting this number.

Tom_S 04-13-2008 09:51 PM

Thanks ;)

donnyaz 06-15-2008 02:49 AM

simple and awesome

Moyses 09-19-2008 04:23 AM

thanks, so with smilies, how can I do it? anyone? :(

eTiKeT? 09-22-2008 10:30 AM

very Nice Thank ;)

Quote:

if ($numicons % 7 == 0 AND $numicons != 0)

Raptor 03-09-2009 02:37 PM

Works a treat with 3.8.1 PL1 - Thanks


All times are GMT. The time now is 01:35 AM.

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.02619 seconds
  • Memory Usage 1,734KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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