![]() |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
be ok if it worked but it simply dont
the box appears but theres nothing init |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CMPS Can't show Forum and Latest Topics on the same page | george bray | Bugs & Other Issues | 3 | 09-12-2004 02:45 PM |
| Permissions problem on any page of the forum!! | Areku | Troubleshooting / "How do I..." Questions | 1 | 07-09-2004 12:58 PM |