Results 1 to 2 of 2

Thread: displaying a specific forum on just one page

  1. #1
    Junior Member
    Join Date
    Jul 2004
    Posts
    11

    Default displaying a specific forum on just one page

    Hey

    my first attempt at some kind of mod , this might already been made (?), I'd like your comments (improvements and extra features/possibilities?)

    This is very basic, as I'm figuring out how this whole cmps thing works

    - Basicly I just cut a piece from latesttopics (view code below) and added some simple php
    - I created an exact same module as the exsisting Latest Forum Topics, except you don't add the adv_portal_latesttopics to the used templates

    you can see an example here:

    My website

    Code:
    <?php
    $forumid = array (
    "battlefield_1942" => 7,
     "unreal_tournament" => 8,
     "halflife" => 11,
     "farcry" => 13,
     "cod" => 14
     );
    $page = $_REQUEST['page'];
    $id=$forumid[$page];
    $maxlimit = 8;
    $threads = $DB_site->query("
      SELECT * FROM thread WHERE forumid = '$id' ORDER BY threadid DESC LIMIT 0, $maxlimit
    	");
    	
      while ($thread = $DB_site->fetch_array($threads))
      {
    		if (strlen($thread['title']) > $vba_options['portal_threads_maxchars'] AND $vba_options['portal_threads_maxchars'])
    		{
    			$thread['title'] = fetch_trimmed_title($thread['title'], $vba_options['portal_threads_maxchars']);
    		}
    
    		$thread = process_thread_array($thread, '', $vba_options['portal_threads_showicon']);
    
    		$getbgrow = getrowcolor();
    
    		eval('$threadbits .= "' . fetch_template('adv_portal_latesttopicbits') . '";');
     	}
    
    	eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_latesttopics') . '";');
    
      $DB_site->free_result($threads);
      unset($thread, $threadbits, $foruminfo, $query, $inforums);
    
    ?>

  2. #2
    Junior Member
    Join Date
    Feb 2004
    Posts
    10

    Default Re: displaying a specific forum on just one page

    be ok if it worked but it simply dont

    the box appears but theres nothing init

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. CMPS Can't show Forum and Latest Topics on the same page
    By george bray in forum Bugs & Other Issues
    Replies: 3
    Last Post: 09-12-2004, 02:45 PM
  2. Permissions problem on any page of the forum!!
    By Areku in forum Troubleshooting / "How do I..." Questions
    Replies: 1
    Last Post: 07-09-2004, 12:58 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
  •