Changeset 760 for trunk/Modules/User


Ignore:
Timestamp:
Jan 22, 2014, 6:12:46 PM (11 years ago)
Author:
maron
Message:
  • Fixed: search with diacriticals
  • Modified: Not show items search when nothing was found
  • Added: bbcode in Forum.php
  • Added: search in forum
  • Added: Last post at forum in user profile
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/User/Profile.php

    r728 r760  
    116116        return($Output);
    117117  }
     118 
     119        function ShowLastForum()
     120  {
     121    $parser = new HTML_BBCodeParser2(array('filters' => array('Basic','Extended','Images','Links','Lists','Email')));
     122        $Count = 20;
     123        $Output = '<strong>Poslední příspěvky ve fóru:</strong>';
     124 
     125                $Output .= '<div class="shoutbox">';
     126                $DbResult = $this->System->Database->query('SELECT `ForumText`.`Text`, `ForumText`.`Date`, `ForumText`.`UserName`,`ForumThread`.`Text` as `ThreadName`,`ForumText`.`Thread` FROM `ForumText` JOIN `ForumThread` ON `ForumThread`.`ID` = `ForumText`.`Thread` WHERE `ForumText`.`User` = '.($_GET['user'] * 1).' ORDER BY `ForumText`.`Date` DESC LIMIT '.$Count);
     127                while($Line = $DbResult->fetch_assoc())
     128                        $Output .= '<div><a href="'.$this->System->Link('/forum/?Thread='.$Line['Thread']).'">'.$Line['ThreadName'].'</a><br /><strong>'.$Line['UserName'].'</strong> ('.HumanDate($Line['Date']).'): '.$parser->qparse($Line['Text']).'</div> ';
     129                $Output .= '</div>';
     130                return($Output);
     131
     132        return($Output);
     133  }
    118134               
    119135        function ShowProfile()
     
    149165                        '<td>'.$this->ExportList().'</td>'.
    150166                        '</tr></table>';
    151                
     167                $Output .= '<br />'.$this->ShowLastForum().'<br />';
    152168                if($this->System->User->Licence(LICENCE_MODERATOR))
    153169                {
Note: See TracChangeset for help on using the changeset viewer.