Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Forums arranged in columns on forumhome Details »»
Forums arranged in columns on forumhome
Version: 1.2.1, by Xenon Xenon is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 01-08-2004 Last Update: 01-16-2005 Installs: 118
 
No support by the author.

As requested several times, this hack allows you to arrange forums on forumhome in xx columns instead of just one per row as it is in standart vb3.

Look at the screenshot to know what i mean

The design is changeable in the templates of course

I've tested it, and it should work, but as i don't use it myself, i cannot do a longtime test, so if you find any bugs, report them

You can apply the changes to forumdisplay as well if wanted

Show Your Support

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

Comments
  #462  
Old 10-11-2005, 03:04 PM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried it a couple weeks ago and it didn't work. The first few file edits look to be about the same, but it wasn't working on my test site.
Reply With Quote
  #463  
Old 10-11-2005, 03:45 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, seems like i have to work on it then
Reply With Quote
  #464  
Old 10-12-2005, 06:32 PM
Nutz's Avatar
Nutz Nutz is offline
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a go at this and your nice SQL syntax highlighting and failed at both.

I tried to use the new function construct_forum_bit and change it to suite with no luck:

PHP Code:

// ###################### Start construct_forum_columns #######################
function construct_forum_columns($parentid$columncount)
{
    global 
$vbulletin$stylevar$vbphrase$show;
    global 
$imodcache$lastpostarray$counters$inforum;

    if (
$columncount == 0)
    {
        
// 0 Columns means don't show subforums at all
        
return '';
    }


    
// this function takes the constant MAXFORUMDEPTH as its guide for how
    // deep to recurse down forum lists. if MAXFORUMDEPTH is not defined,
    // it will assume a depth of 2.

    // call fetch_last_post_array() first to get last post info for forums
    
if (!is_array($lastpostarray))
    {
        
fetch_last_post_array();
    }

    if (empty(
$vbulletin->iforumcache["$parentid"]))
    {
        return;
    }

    if (!
defined(MAXFORUMDEPTH))
    {
        
define('MAXFORUMDEPTH'1);
    }

    
$forumbits '';
    
$depth++;

    foreach (
$vbulletin->iforumcache["$parentid"] AS $forumid)
    {
        
// grab the appropriate forum from the $vbulletin->forumcache
        
$forum $vbulletin->forumcache["$forumid"];
        
$lastpostforum $vbulletin->forumcache["$lastpostarray[$forumid]"];
        if (!
$forum['displayorder'] OR !($forum['options'] & $vbulletin->bf_misc_forumoptions['active']))
        {
            continue;
        }

        
$forumperms $vbulletin->userinfo['forumpermissions']["$forumid"];
        
$lastpostforumperms $vbulletin->userinfo['forumpermissions']["$lastpostarray[$forumid]"];
        if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canview']) AND !$vbulletin->options['showprivateforums'])
        { 
// no permission to view current forum
            
continue;
        }

            
$GLOBALS['forumshown'] = true// say that we have shown at least one forum

            
if (($forum['options'] & $vbulletin->bf_misc_forumoptions['cancontainthreads']))
            { 
// get appropriate suffix for template name
                
$tempext '_post';
            }
            else

            {
                
$tempext '_nopost';
            }

            if (!
$vbulletin->options['showforumdescription'])
            { 
// blank forum description if set to not show
                
$forum['description'] = '';
            }

            
// dates & thread title
            
$lastpostinfo $vbulletin->forumcache["$lastpostarray[$forumid]"];

            
// compare last post time for this forum with the last post time specified by
            // the $lastpostarray, and if it's less, use the last post info from the forum
            // specified by $lastpostarray
            
if ($vbulletin->forumcache["$lastpostarray[$forumid]"]['lastpost'] > 0)
            {
                if (!(
$lastpostforumperms $vbulletin->bf_ugp_forumpermissions['canview']) OR (!($lastpostforumperms $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND $lastpostinfo['lastposter'] != $vbulletin->userinfo['username']))
                {
                    
$forum['lastpostinfo'] = $vbphrase['private'];
                }
                else
                {
                    
$lastpostinfo['lastpostdate'] = vbdate($vbulletin->options['dateformat'], $lastpostinfo['lastpost'], 1);
                    
$lastpostinfo['lastposttime'] = vbdate($vbulletin->options['timeformat'], $lastpostinfo['lastpost']);
                    
$lastpostinfo['trimthread'] = fetch_trimmed_title($lastpostinfo['lastthread']);

                    if (
$icon fetch_iconinfo($lastpostinfo['lasticonid']))
                    {
                        
$show['icon'] = true;
                    }
                    else
                    {
                        
$show['icon'] = false;
                    }

                    
$show['lastpostinfo'] = (!$lastpostforum['password'] OR verify_forum_password($lastpostforum['forumid'], $lastpostforum['password'], false));

                    eval(
'$forum[\'lastpostinfo\'] = "' fetch_template('forumhome_lastpostby') . '";');
                }
            }
            else if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canview']))
            {
                
$forum['lastpostinfo'] = $vbphrase['private'];
            }
            else
            {
                
$forum['lastpostinfo'] = $vbphrase['never'];
            }

            
// do light bulb
            
$forum['statusicon'] = fetch_forum_lightbulb($forumid$lastpostinfo$forum);

            
// add lock to lightbulb if necessary
            
if ((!($forumperms $vbulletin->bf_ugp_forumpermissions['canpostnew']) OR !($forum['options'] & $vbulletin->bf_misc_forumoptions['allowposting'])) AND $vbulletin->options['showlocks'] AND !$forum['link'])
            {
                
$forum['statusicon'] .= '_lock';
            }

            
// get counters from the counters cache ( prepared by fetch_last_post_array() )
            
$forum['threadcount'] = $counters["$forum[forumid]"]['threadcount'];
            
$forum['replycount'] = $counters["$forum[forumid]"]['replycount'];

            
// get moderators ( this is why we needed cache_moderators() )
            
if ($vbulletin->options['showmoderatorcolumn'])
            {
                
$showmods = array();
                
$listexploded explode(','$forum['parentlist']);
                foreach (
$listexploded AS $parentforumid)
                {
                    if (!isset(
$imodcache["$parentforumid"]))
                    {
                        continue;
                    }
                    foreach(
$imodcache["$parentforumid"] AS $moderator)
                    {
                        if (isset(
$showmods["$moderator[userid]"]))
                        {
                            continue;
                        }

                        
$showmods["$moderator[userid]"] = true;
                        if (!isset(
$forum['moderators']))
                        {
                            eval(
'$forum[\'moderators\'] = "' fetch_template('forumhome_moderator') . '";');
                        }
                        else
                        {
                            eval(
'$forum[\'moderators\'] .= ", ' fetch_template('forumhome_moderator') . '";');
                        }
                    }
                }
                if (!isset(
$forum['moderators']))
                {
                    
$forum['moderators'] = '';
                }
            }

            if (
$forum['link'])
            {
                
$forum['replycount'] = '-';
                
$forum['threadcount'] = '-';
                
$forum['lastpostinfo'] = '-';
            }
            else
            {
                
$forum['replycount'] = vb_number_format($forum['replycount']);
                
$forum['threadcount'] = vb_number_format($forum['threadcount']);
            }

            
$show['forumdescription'] = iif ($forum['description'] != ''truefalse);

            
// build the template for the current forum
            
$column_width intval(100 $columncount) . '%';
            eval(
'$column = "' fetch_template("forumhome_forumbit_columncell") . '";');
            
            
// do the columnstuff
            
if ($counter $columncount == 0)
            {
                
// Begin a new row
                
$forumbits .= "\t<tr>\n";
            }
            
$forumbits .= $column;
            if (
$counter $columncount == $columncount 1)
            {
                
// End row
                
$forumbits .= "\t</tr>\n";
            }

            
$counter++;
    }

    
// prevent unclosed <tr> tags
    
if ($counter $columncount != 0)
    {
        
$forumbits .= "\t</tr>\n";
    }
    return 
$forumbits;

Maybe you can use this in some way, I understand you?re busy

Thanks,
Mat
Reply With Quote
  #465  
Old 10-13-2005, 11:38 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

don't break your head with the SQL sysntax, i have already ported it, just not yet released
Reply With Quote
  #466  
Old 10-13-2005, 06:16 PM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you should release it, even if it is only in beta format. I have a couple test sites I could check it out on.
Reply With Quote
  #467  
Old 10-13-2005, 06:44 PM
Nutz's Avatar
Nutz Nutz is offline
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you don't want the hassle of releasing/suporting it could you PM the mod?

Thanks,
Mat
Reply With Quote
  #468  
Old 10-13-2005, 06:45 PM
hbalagh1's Avatar
hbalagh1 hbalagh1 is offline
 
Join Date: Jun 2005
Location: San Diego
Posts: 230
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't wait
Reply With Quote
  #469  
Old 10-13-2005, 07:42 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@99: i will do so when i have upgrade vb.org, as my testversion is running there

i don't write the instructions before i am sure they work
Reply With Quote
  #470  
Old 10-13-2005, 07:48 PM
Nutz's Avatar
Nutz Nutz is offline
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How far off is the 3.5 vb.org

Thanks,
Mat
Reply With Quote
  #471  
Old 10-13-2005, 07:50 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hard to say.

the most things are done, just 2 things are missing, but these are important...
i expect two weeks, but cannot promise it.
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 07:20 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.11678 seconds
  • Memory Usage 2,405KB
  • Queries Executed 25 (?)
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_php
  • (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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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