•  · 0 friends

How to set no.of online friends to show in front end

How to set no.of online friends to show in front end

1 0 0 0 0 0
  • 186
Replies (5)
  • Hello Kanna !

    It will require to add some code for the Persons module and add the new block for it.

    0 0 0 0 0 0
    • ok why to add new block ?


      0 0 0 0 0 0
      • It is more comfortable to insert the new method into a separate block. Or you may change any from the current list.

        0 0 0 0 0 0
        • where to change in already used code


          0 0 0 0 0 0
          • You may add the new block to the home page with the following MySQL command:

            INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES

            ('sys_home', 1, 'bx_persons', '' , '_bx_persons_page_block_title_latest_profiles', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_persons";s:6:"method";s:22:"get_online_friends_num";}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);

            The bold words give the name of the new service method from the BxPersonsModule.php file. It should have the name like:

            public function serviceGetOnlineFriendsNum () { code of your method }

            0 0 0 0 0 0
            Not logged in users can't 'Comments Post'.
            3
            3
            Added:
            Category:

            UNA - Social Media Software Framework

            Close