K
How to set no.of online friends to show in front end
Hello Kanna !
It will require to add some code for the Persons module and add the new block for it.
ok why to add new block ?
It is more comfortable to insert the new method into a separate block. Or you may change any from the current list.
where to change in already used code
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 }
Hello Kanna !
It will require to add some code for the Persons module and add the new block for it.
K
ok why to add new block ?
It is more comfortable to insert the new method into a separate block. Or you may change any from the current list.
K
where to change in already used code
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 }