Results 1 to 2 of 2

Thread: Forum List Module - help?

  1. #1
    Join Date
    Nov 2005
    Posts
    13

    Default Forum List Module - help?

    Hey ya'll...

    I'm trying to put this forum list module together based on....

    http://www.vbadvanced.com/forum/showthread.php?t=11890

    by hqtrung

    but i cant seem to get it to work with VB 3.0.3 with VBA 2.0

    Any ideas?

    ---created new module - Forum List
    ---included forumlist.php

    Code:
    <?php
    // ++=========================================================================++
    // || Module: Forum list on portal for vBadvanced Portal 2.0
    // || Author: Huynh Quang Trung (hqtrung at gmail dot com)
    // || 
    // || http://vnsolutions.net
    // || 
    // || 
    // ++ ========================================================================++
    function construct_forum_list($parentid = -1, &$ret, $permission = '')
    {
    	global $vbulletin;
    	global $stylevar, $vbphrase, $defaultselected;
    	if (!($vbulletin->userinfo['permissions']['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']))
    	{
    		return;
    	}
    	if (empty($vbulletin->iforumcache))
    	{
    		require_once(DIR . '/includes/functions_forumlist.php');
    		cache_ordered_forums(1, 1);
    	}
    	if (empty($vbulletin->iforumcache["$parentid"]) OR !is_array($vbulletin->iforumcache["$parentid"]))
    	{
    		return;
    	}
    	$ret.= "<ul>\n";
    	foreach($vbulletin->iforumcache["$parentid"] AS $forumid)
    	{
    		$forumperms = $vbulletin->userinfo['forumpermissions']["$forumid"];
    		if ((!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) AND !$vbulletin->options['showprivateforums']) OR !($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['showonforumjump']) OR !$vbulletin->forumcache["$forumid"]['displayorder'] OR !($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['active']))
    		{
    			continue;
    		}
    		else
    		{
    			$forum = $vbulletin->forumcache["$forumid"];
    			$ret.= "<li>\n";
    			$ret.= "<a href='forumdisplay.php?f=$forumid'>"." $forum[title_clean]\n";
    			construct_forum_list($forumid, $ret, $forumperms);
    			$ret.= "</li>\n";
    		} // if can view
    	} // end foreach ($vbulletin->iforumcache[$parentid] AS $forumid)
    	$ret .= "</ul>\n";
    	return $ret;
    }
    $adv_portal_forumlist = "";
    $adv_portal_forumlist = construct_forum_list(-1, $adv_portal_forumlist);
    $adv_portal_forumlist = "<div id='custom'>\n".$adv_portal_forumlist."</div>\n";
    eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_forumlist') . '";');
    ?>
    ---Templates used was "adv_portal_forumlist".
    ---Created template "adv_portal_forumlist".


    Code:
    <tr><td class="$bgclass">
    $adv_portal_forumlist
    	</td>
    </tr>
    ---Activated the module....

    But it's still not working....Any Ideas?

  2. #2
    Join Date
    Oct 2005
    Posts
    11

    Default Re: Forum List Module - help?

    I posted a potential fix to this at: http://www.vbadvanced.com/forum/show...4&postcount=33

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [module] Forum list
    By hqtrung in forum Add-On Modules (version 3.x & 2.x)
    Replies: 77
    Last Post: 09-13-2016, 01:27 AM
  2. [REQ] Forum list block
    By hqtrung in forum Module & Modification Discussion & Requests
    Replies: 5
    Last Post: 11-11-2005, 01:33 PM
  3. how can i add my forum list ??
    By MP3 in forum Add-On Modules & Modifications
    Replies: 2
    Last Post: 05-19-2005, 06:02 AM
  4. List of forum names in module?
    By disco4me in forum Troubleshooting / "How do I..." Questions
    Replies: 12
    Last Post: 05-04-2005, 06:06 PM
  5. Forum List Module?
    By akmartin in forum Add-On Modules & Modifications
    Replies: 2
    Last Post: 09-21-2004, 10:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •