SubForum Title

Discussion in 'Developer Support' started by mlagrass, Sep 2, 2011.

  1. mlagrass New Member

    I and others ppls from android.com.pl have problem.

    tapatalk show only one forum :/ on search results and news topics result.

    example, now:

    Code:
    Roms and modifications
    example, what we need:

    Code:
    HTC Desire >> Roms and modifications
    One time I make this to work , but new version forum and new version tapatalk scripts , now i cant find "where" and "what" write .

    i write my old mod

    Code:
    line 571, mobiquo/include/functions_search.php //
    
    	// Mlagrass Mod // mlapeel@gmail.com // Tapatalk Plugin vb38 1.7.2 for vBulletin 3.8.4 // 
                $i = $db->query_first("SELECT parentid FROM " . TABLE_PREFIX . "forum WHERE forumid = ".$item['forumid']); 
                $i = $db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid = ".$i['parentid']); 
                $item['forumtitle'] = $i['title']." > ".$vbulletin->forumcache["$item[forumid]"]['title']; 
                //
    
  2. Jayeley Plugin Developer

    What do you mean by only one forum?
    The search result will always be in one specific forum?
  3. winter Tapatalk Master

    Jay,

    I think he meant the sub-forum name returned is only the immediate parent level, which sometimes can be a bit generic (in their case they have a lot of "Rom Modification" sub-forums under different category). Their question is if it can return another level higher.

    But I think the way to work around it is to have get_forum cached in the app and look up the parent category with the forum_id provided.
  4. mlagrass New Member

    Resolved

    Resolved

    [IMG]



    mobiquo_functions_search.php

    Code:
    				$is_approved = true;
    				if($post['visible'] == 0){
    					$is_approved = false;
    				}
    				
    				// Mlagrass Mod // mlapeel@gmail.com // Tapatalk Plugin vb4 // 
    
    				$i = $db->query_first("SELECT parentid FROM " . TABLE_PREFIX . "forum WHERE forumid = ".$thread[forumid]); 
    				$i = $db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid = ".$i['parentid']);
    				$forum[title_clean] = $i['title']."           \n".$forum[title_clean]." ";
    				
    				//	
    
    				$return_post = new xmlrpcval(array( 'forum_id'=>new xmlrpcval($thread[forumid],"string"),
    			                                      'forum_name'=>new xmlrpcval(mobiquo_encode($forum[title_clean]),"base64"),
    			                                      'topic_id'=>new xmlrpcval($thread[threadid],"string"),
    			        							  'post_id' => new xmlrpcval($post[postid],"string"),
    			                                      'topic_title'=>new xmlrpcval(mobiquo_encode($thread[title]),"base64"),
    

    get_unread_topic.php

    Code:
     $mobiquo_can_approve = ($current_user->canModerateForum($thread[forumid], 'canmoderateposts'))   ? true : false;
                $mobiquo_attach = iif(($thread['attach']>0),1,0);
                
                $thread['prefix_plain_html'] = '';
                if ($thread['prefixid'])
                {
                    $thread['prefix_plain_html'] = htmlspecialchars_uni($vbphrase["prefix_$thread[prefixid]_title_plain"]);
                }
    			
    				// Mlagrass Mod // mlapeel@gmail.com // Tapatalk Plugin vb4 // 
    				
    				$i = $db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid = ".$forum['parentid']);
    				$forum[title_clean] = $i['title']."           \n".$forum[title_clean]." ";
    				
    				//	
                
                $return_thread = new xmlrpcval(array(
                    'forum_id'=>new xmlrpcval($thread[forumid],"string"),
                    'forum_name'=>new xmlrpcval(mobiquo_encode($forum[title_clean]),"base64"),
                    'topic_id'=>new xmlrpcval($thread[threadid],"string"),
                    'topic_title'=>new xmlrpcval(mobiquo_encode($thread[title]),"base64"),
                    'prefix' => new xmlrpcval(mobiquo_encode($thread['prefix_plain_html']), 'base64'),