roaringbiz, I don't use Orca myself, however taking a look, the file you probably want for this is:
orca/classes/Forum.php
I find the following sections that might help you out:
/**
* returns my threads topics XML
* @param $wp return whole page XML
*/
function getMyThreadsXML ($wp)
{
global $gConf;
$user = $this->getLoginUser();
$fdb = new DbForum ();
$f = $fdb->getForum ($forum_id);
if (!$user)
{
return $this->_no_access($wp);
}
$x1 = <<<EOF
<forum>
<title><![CDATA[[L[My Topics]]]]></title>
<desc><![CDATA[[L[Topics you participate in]]]]></desc>
</forum>
EOF;
$x2 = '';
$user_last_act = (int)$fdb->getUserLastActivity ($user);
$a = $fdb->getMyThreadsTopics($user);
reset ($a);
$t = '';
while ( list (,$r) = each ($a) )
{
$lp = $fdb->getTopicPost($r['topic_id'], 'last');
$fp = $fdb->getTopicPost($r['topic_id'], 'first');
$td = $fdb->getTopicDesc ($r['topic_id']);
$this->_buld_topic_desc ($td);
if (!$user)
$new_topic = 0;
else
$new_topic = $this->isNewTopic ($r['topic_id'], $r['last_post_when'], $user_last_act) ? 1 : 0;
encode_post_text ($r['topic_title'], $wp, 1);
$t .= <<<EOF
<topic id="{$r['topic_id']}" new="$new_topic" lpt="{$r['last_post_when']}" lut="{$user_last_act}">
<uri>{$r['topic_uri']}</uri>
<title>{$r['topic_title']}</title>
<desc>{$td}</desc>
<count>{$r['count_posts']}</count>
<last_u>{$lp['user']}</last_u>
<last_d>{$lp['when']}</last_d>
<first_u>{$fp['user']}</first_u>
<first_d>{$fp['when']}</first_d>
</topic>
EOF;
}
$p = '';
$num = $fdb->getTopicsNum($forum_id);
for ($i = 0 ; $i < $num ; $i += $gConf['topics_per_page'])
$p .= '<p c="' . (($start >= $i && $start < ($i + $gConf['topics_per_page'])) ? 1 : 0 ). '" start="' . $i . '">' . ($i/$gConf['topics_per_page'] + 1) . '</p>';
if ($wp)
{
$li = $this->_getLoginInfo ();
return $this->addHeaderFooter ($li, "<topics><pages>$p</pages>{$x2}{$x1}{$t}</topics>");
}
else
{
$cu = $this->getUrlsXml ();
return "<root>$cu<topics><pages>$p</pages>{$x2}{$x1}{$t}</topics></root>";
}
}
Moving through the file:
/**
* returns flagged topics XML
* @param $wp return whole page XML
*/
function getMyFlagsXML ($wp)
{
global $gConf;
$user = $this->getLoginUser();
$fdb = new DbForum ();
$f = $fdb->getForum ($forum_id);
if (!$user)
{
return $this->_no_access($wp);
}
$x1 = <<<EOF
<forum>
<title><![CDATA[[L[Flagged topics]]]]></title>
<desc><![CDATA[[L[Topics you have flagged]]]]></desc>
</forum>
EOF;
$x2 = '';
$user_last_act = (int)$fdb->getUserLastActivity ($user);
$a = $fdb->getMyFlaggedTopics($user);
reset ($a);
$t = '';
while ( list (,$r) = each ($a) )
{
$lp = $fdb->getTopicPost($r['topic_id'], 'last');
$fp = $fdb->getTopicPost($r['topic_id'], 'first');
$td = $fdb->getTopicDesc ($r['topic_id']);
$this->_buld_topic_desc ($td);
if (!$user)
$new_topic = 0;
else
$new_topic = $this->isNewTopic ($r['topic_id'], $r['last_post_when'], $user_last_act) ? 1 : 0;
encode_post_text ($r['topic_title'], $wp, 1);
$t .= <<<EOF
<topic id="{$r['topic_id']}" new="$new_topic" lpt="{$r['last_post_when']}" lut="{$user_last_act}">
<uri>{$r['topic_uri']}</uri>
<title>{$r['topic_title']}</title>
<desc>{$td}</desc>
<count>{$r['count_posts']}</count>
<last_u>{$lp['user']}</last_u>
<last_d>{$lp['when']}</last_d>
<first_u>{$fp['user']}</first_u>
<first_d>{$fp['when']}</first_d>
</topic>
EOF;
}
$p = '';
$num = $fdb->getTopicsNum($forum_id);
for ($i = 0 ; $i < $num ; $i += $gConf['topics_per_page'])
$p .= '<p c="' . (($start >= $i && $start < ($i + $gConf['topics_per_page'])) ? 1 : 0 ). '" start="' . $i . '">' . ($i/$gConf['topics_per_page'] + 1) . '</p>';
if ($wp)
{
$li = $this->_getLoginInfo ();
return $this->addHeaderFooter ($li, "<topics><pages>$p</pages>{$x2}{$x1}{$t}</topics>");
}
else
{
$cu = $this->getUrlsXml ();
return "<root>$cu<topics><pages>$p</pages>{$x2}{$x1}{$t}</topics></root>";
}
}
Then this section:
/**
* returns forum topics XML
* @param $forum_id forum id
* @param $wp return whole page XML
* @param $start record to start with
*/
function getTopicsXML ($forum_uri, $wp, $start = 0)
{
global $gConf;
$fdb = new DbForum ();
$f = $fdb->getForumByUri ($forum_uri);
$forum_id = $f['forum_id'];
$user = $this->getLoginUser();
if (!$this->_checkUserPerm ($user, $f['forum_type'], 'read', $forum_id))
{
return $this->_no_access($wp);
}
encode_post_text ($f['forum_title'], $wp);
encode_post_text ($f['forum_desc'], $wp);
$x1 = <<<EOF
<forum>
<id>{$f['forum_id']}</id>
<uri>{$f['forum_uri']}</uri>
<title>{$f['forum_title']}</title>
<desc>{$f['forum_desc']}</desc>
<type>{$f['forum_type']}</type>
</forum>
EOF;
$cat = $fdb->getCat ($f['cat_id']);
encode_post_text ($cat['cat_name'], $wp);
$x2 = <<<EOF
<cat>
<id>{$cat['cat_id']}</id>
<uri>{$cat['cat_uri']}</uri>
<title>{$cat['cat_name']}</title>
</cat>
EOF;
$user_last_act = (int)$fdb->getUserLastActivity ($user);
$a = $fdb->getTopics($forum_id, $start);
reset ($a);
$t = '';
while ( list (,$r) = each ($a) )
{
$td = $fdb->getTopicDesc ($r['topic_id']);
$this->_buld_topic_desc ($td);
if (!$user)
$new_topic = 0;
else
$new_topic = $this->isNewTopic ($r['topic_id'], $r['last_post_when'], $user_last_act) ? 1 : 0;
encode_post_text ($r['topic_title'], $wp, 1);
$t .= <<<EOF
<topic id="{$r['topic_id']}" new="$new_topic" lpt="{$r['last_post_when']}" lut="{$user_last_act}" sticky="{$r['topic_sticky']}" locked="{$r['topic_locked']}">
<uri>{$r['topic_uri']}</uri>
<title>{$r['topic_title']}</title>
<desc>{$td}</desc>
<count>{$r['count_posts']}</count>
<last_u>{$r['last_post_user']}</last_u>
<last_d>{$r['last_when']}</last_d>
<first_u>{$r['first_post_user']}</first_u>
<first_d>{$r['first_when']}</first_d>
</topic>
EOF;
}
$p = '';
$num = $fdb->getTopicsNum($forum_id);
for ($i = 0 ; $i < $num ; $i += $gConf['topics_per_page'])
$p .= '<p c="' . (($start >= $i && $start < ($i + $gConf['topics_per_page'])) ? 1 : 0 ). '" start="' . $i . '">' . ($i/$gConf['topics_per_page'] + 1) . '</p>';
if ($wp)
{
$li = $this->_getLoginInfo ($user);
return $this->addHeaderFooter ($li, "<topics><pages>$p</pages>{$x2}{$x1}{$t}</topics>");
}
else
{
$cu = $this->getUrlsXml ();
return "<root>$cu<topics><pages>$p</pages>{$x2}{$x1}{$t}</topics></root>";
}
}
Followed by this part:
/**
* returns forum topics XML
* @param $forum_id forum id
* @param $wp return whole page XML
* @param $start record to start with
*/
function getTopicsXML ($forum_uri, $wp, $start = 0)
{
global $gConf;
$fdb = new DbForum ();
$f = $fdb->getForumByUri ($forum_uri);
$forum_id = $f['forum_id'];
$user = $this->getLoginUser();
if (!$this->_checkUserPerm ($user, $f['forum_type'], 'read', $forum_id))
{
return $this->_no_access($wp);
}
encode_post_text ($f['forum_title'], $wp);
encode_post_text ($f['forum_desc'], $wp);
$x1 = <<<EOF
<forum>
<id>{$f['forum_id']}</id>
<uri>{$f['forum_uri']}</uri>
<title>{$f['forum_title']}</title>
<desc>{$f['forum_desc']}</desc>
<type>{$f['forum_type']}</type>
</forum>
EOF;
$cat = $fdb->getCat ($f['cat_id']);
encode_post_text ($cat['cat_name'], $wp);
$x2 = <<<EOF
<cat>
<id>{$cat['cat_id']}</id>
<uri>{$cat['cat_uri']}</uri>
<title>{$cat['cat_name']}</title>
</cat>
EOF;
$user_last_act = (int)$fdb->getUserLastActivity ($user);
$a = $fdb->getTopics($forum_id, $start);
reset ($a);
$t = '';
while ( list (,$r) = each ($a) )
{
$td = $fdb->getTopicDesc ($r['topic_id']);
$this->_buld_topic_desc ($td);
if (!$user)
$new_topic = 0;
else
$new_topic = $this->isNewTopic ($r['topic_id'], $r['last_post_when'], $user_last_act) ? 1 : 0;
encode_post_text ($r['topic_title'], $wp, 1);
$t .= <<<EOF
<topic id="{$r['topic_id']}" new="$new_topic" lpt="{$r['last_post_when']}" lut="{$user_last_act}" sticky="{$r['topic_sticky']}" locked="{$r['topic_locked']}">
<uri>{$r['topic_uri']}</uri>
<title>{$r['topic_title']}</title>
<desc>{$td}</desc>
<count>{$r['count_posts']}</count>
<last_u>{$r['last_post_user']}</last_u>
<last_d>{$r['last_when']}</last_d>
<first_u>{$r['first_post_user']}</first_u>
<first_d>{$r['first_when']}</first_d>
</topic>
EOF;
}
$p = '';
$num = $fdb->getTopicsNum($forum_id);
for ($i = 0 ; $i < $num ; $i += $gConf['topics_per_page'])
$p .= '<p c="' . (($start >= $i && $start < ($i + $gConf['topics_per_page'])) ? 1 : 0 ). '" start="' . $i . '">' . ($i/$gConf['topics_per_page'] + 1) . '</p>';
if ($wp)
{
$li = $this->_getLoginInfo ($user);
return $this->addHeaderFooter ($li, "<topics><pages>$p</pages>{$x2}{$x1}{$t}</topics>");
}
else
{
$cu = $this->getUrlsXml ();
return "<root>$cu<topics><pages>$p</pages>{$x2}{$x1}{$t}</topics></root>";
}
}
I can keep going here, but I think you see this file is loaded with references to the subject. Hope it helps and can't promise this is the right spot, but a good place to take a look.