MyBlog and JomSocial Integration

Here is solution to add a "Community Home" on the toolbar of MyBlog

You need to modify the given below files

a. language/en-GB/en-GB.com_myblog.ini

SEARCH # Toolbar menu and ADD
TOOLBAR MENU COMMUNITY HOME=Community Home

b. components/com_myblog/templates/default/toolbar.tmpl.html




c. components/com_myblog/task/base.php

$myCommunityItemid = myGetCommunityItemId();
$communityHomeLink = JRoute::_("index.php?option=com_community&view=frontpage&Itemid=$myCommunityItemid");

$toolbar['communityHomeLink'] = $communityHomeLink;
$active['communityhome'] = '';

d. Write function myGetCommunityItemId() in components/com_myblog/functions.myblog.php

2 comments:

  1. where do you add c and d on those files? i got Parse error: syntax error, unexpected T_FUNCTION, expecting '{' in... when i just add them to the bottom of the files

    ReplyDelete
  2. You have to write

    function myGetCommunityItemId(){
    // Write code to get the community menuid here

    }

    in components/com_myblog/functions.myblog.php

    ReplyDelete