22
Alright...I can't seem to figure it out. Here's the source code for my file:
<?php
/*****************************************************************************
Tune Tracker Database
Written Exclusively For: SceneSpot.org
By: D. Travis "Coplan" North
******************************************************************************/
include_once(XOOPS_ROOT_PATH.'/modules/tunetracker/system.php');
function b_tunetracker_current_tunes() {
global $xoopsDB, $tt_sinfo, $tt_users, $tt_songs;
// This part is temporary until I get include working
$tt_users = $xoopsDB->prefix("users");
$tt_sinfo = $xoopsDB->prefix("tt_sinfo");
$tt_songs = $xoopsDB->prefix("tt_songs");
$block = array();
$sth = $xoopsDB->query('SELECT *, DATE_FORMAT(s_date, "%b %d %Y") as f_date FROM '.$tt_sinfo.' ORDER BY s_date DESC LIMIT 8') or die (mysql_error());
$cnt = 0;
while ($row = $xoopsDB->fetchArray($sth)) {
$block['tunes'][$cnt]['url'] = XOOPS_URL.'/modules/tunetracker/viewsong.php?id='.$row[sinfo_id];
$block['tunes'][$cnt]['s_name'] = $row[s_name];
$block['tunes'][$cnt]['date'] = $row[f_date];
$a_sth= $xoopsDB->query('SELECT uname FROM '.$tt_songs.' LEFT JOIN '
.$tt_users.' ON '.$tt_songs.'.user_id='.$tt_users
.'.uid WHERE sinfo_id="'.$row[sinfo_id]
.'" ORDER BY uname') or die (mysql_error());
$ac = 0;
while ($arow = $xoopsDB->fetchArray($a_sth)) {
if ($ac >= 1) { $block['tunes'][$cnt]['artist'] .= ', '; }
$block['tunes'][$cnt]['artist'] .= $arow[uname];
$ac++;
}
$cnt++;
}
return $block;
}
?>
system.php has a bunch of subroutines and definitions that I need (such as $tt_sinfo, etc). You'll notice I had to put a little tidbit in there until I can get this file included.
Also....
I discovered another symptom along the way. I can include files from other modules -- just not my module. Anything from this module gets spit out as a blank page containing only "<html><body></body></html>" and nothing more. And it doesn't matter what file I try to include. I checked my directory settings, and everything seems to be okay. Anyone have any more ideas as to why I can't include files in my block?
As always, i appreciate the help.