Skip to Content Skip to Menu

MyBlog and CB Author tab

  • zakx
  • zakx
  • OFFLINE
  • Posts: 12
  • Thanks: 0
  • Karma: 1
15 years 9 months ago #69237 by zakx
MyBlog and CB Author tab was created by zakx
Hi,

MyBlog uses the same article table as Joomla, so this causes the problem that in the CB profile, the same content is linked in the MyBlog tab *and* the author tab, but with different URLs, one using com_content, and the other using com_myblog.

I contacted azrul and the only way round this is to alter the CB author tab. Here's their very helpful response:

********
By default, since My Blog uses the same content's database table as the Joomla's default content component, you will have to hack the CB's author tab to not include My Blog's managed sections. To do so, firstly, you will have to include the configuration file of My Blog,

include_once('path/to/administrator/components/com_myblog/config.myblog.php');

Within the function itself, you will need to declare $_MY_CONFIG as a global variable, by adding the codes below,

global $_MY_CONFIG;

Then, you can get the managed sections by accessing,

$myblogSections = $_MY_CONFIG->get('managedSections');

The result should be in a string such as , '1,2,3' where the numbers are the section id and you will have to look for the sql query that the CB Author's tab uses to get the list of contents.

Hope this helps.
********

I should imagine that it would also be a good idea to check if com_myblog is enabled. I wonder if anyone has the expertise to code the necessary alteration?

Thanks,
Zak

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn