Need Forum Help /#topic! Please Somebody

I have the fix for groups it's the following:

 

 

===============================================

I think I found the fix. Open up inc/classes/BxDolGroups.php.


Find this line (around line 447 v 6.14):


$sRetHtml .= $this->genGroupActionBtn( 'Post topic', "groups/orca/#forum/{$sForumUri}-0.htm#action=goto&new_topic={$sForumUri}" );


and replace it with this:


//$sRetHtml .= $this->genGroupActionBtn( 'Post topic', "groups/orca/#forum/{$sForumUri}-0.htm#action=goto&new_topic={$sForumUri}" );
$sRetHtml .= $this->genGroupActionBtn( 'Post topic', "groups/orca/#action=goto&new_topic={$sForumUri}" );


I have left in the original call and only commented it out to preserve the call.


praveenkv1988
posts: 887
Sep 16, 2008 14:40    QuotePoints: 1   Vote Also check whether you have mod_rewrite enabled.

scott_gb
posts: 4
Dec 05, 2008 14:20    QuotePoints: 0   Vote I noticed another 404 linking error in my group forums so I thought I would share.

At the bottom of the group page, in the forum box, I noticed that the link to an actual post was going to http://mysite.com/groups/orca/topic/Topic-Name.htm and resulted in a 404 error. I found a fix for this in the actual forum by adding the # in front of the word topic. This corrected the problem when inside the orca folder and viewing all the topics. But had trouble fixing this in the box at the bottom of the group page. To fix this go to the templates/base/xsl folder and open group_last_topic.xsl. Around line 36 change  <xsl:attribute name="href" groups/orca/topic/<xsl:value-of select="uri" />.htm</xsl:attribute> to  <xsl:attribute name="href">groups/orca/#topic/<xsl:value-of select="uri" />.htm</xsl:attribute> this appeared to fix my problem. Hope it helps someone else.


By the way why are there so many # related 404 errors with orca? If i were to guess, it looks like it didnt belong there in earlier versions and then it was added somehow somewhere but was not corrected in all of the scripts. I don't know for sure because i havent had any experience with orca prior to the release with dolphin 6.14
=========================================================

 

But for some reason I CANNOT find the file to fix in forum post ie:/orca/

Can someone direct me to the file used to display forum posts? It needs to be /#topic and not /topic

I am having a very hard time trying to find the file to fix it..

your help will be greatly appreciated.

Quote · 9 Aug 2009

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.

Quote · 9 Aug 2009

arrgghhhh been on it all night.. can't seem to append #topic to a variable?

I really need to get this fixed.. now it's opening a new window with the wrong /topic/ when it should be /#topic/

 

Someone? please? I will even pay for assistance

Quote · 10 Aug 2009

arrgghhhh been on it all night.. can't seem to append #topic to a variable?

I really need to get this fixed.. now it's opening a new window with the wrong /topic/ when it should be /#topic/

Someone? please? I will even pay for assistance

Are you trying to post to a forum or a group? If it is a forum issue (not group) make sure you have the .htaccess file uploaded to the folder. This solved my issue.

Quote · 9 Jan 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.