Article hits not show up in user profile

15 years 10 months ago #64005 by tuan
Articles tab does not display hits. Cause: global var $mosConfig_hits (or $mosConfig_show_hits) for some reason disappears and does not get pass to the function getDisplayTab($tab,$user,$ui) when this function is invoked. My temporary fix is:

function getDisplayTab($tab,$user,$ui) {
global $database, $mosConfig_hits,
$mosConfig_offset, $mainframe, $my;
$return="";

// --- Retrieve $mosConfig_hits here
$contentConfig = &JComponentHelper::getParams( 'com_content' );
$config_vars = get_object_vars($contentConfig->toObject());
$mosConfig_hits = $config_vars;
// ----

....
}

Please Log in to join the conversation.

15 years 10 months ago #64031 by beat
fixed differently in shortly upcoming CB 1.2 :)

Thanks for reporting with a fix proposal B)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 4 months ago #82525 by quirkee
Replied by quirkee on topic Re:Article hits not show up in user profile
I'm using Joomla 1.5.8 and CB 1.2 RC 4. The article hits still do not show on the Articles tab. All that shows is the Date and Title of articles. I miss seeing the Hits. :(

Will this be fixed?

Scott

Please Log in to join the conversation.

15 years 3 months ago #84801 by mvelco
Replied by mvelco on topic Re:Article hits not show up in user profile
Also on J1.5.8 and CB 1.2RC4 and do not see the hit count.

Several of my users are also asking about this. They don't want to go to the actual article and skew the actual hit count.

It looks like the code for this in cb.authortab.php is looking for a config parameter, but I do not see where it would be set.

[code:1]
if($_CB_framework->getCfg( 'hits' ))
$return .= "<th>"._UE_ARTICLEHITS."</th>";
[/code:1]
and
[code:1]
if ( $_CB_framework->getCfg( 'hits' ) ) {
$hits = "<td>".$item->hits."</td>";
}
[/code:1]

Mark

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.225 seconds

Facebook Twitter LinkedIn