I have a showcase but no tab as expected in my profile:
https://www.avforums.com/members/stuart-wright.1/
https://www.avforums.com/members/stuart-wright.1/
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Yes, I checked that setting. It is ticked.
ALTER TABLE xf_user ADD showcase_count int(10) unsigned NOT NULL DEFAULT '0'
The field is there, but my showcase count is zero. I don't think any of your cache rebuild routines for showcases fixes the showcase count in the user table.
/**
* Updates the showcase_count field in the xf_user table for all users that have at least 1 visible item.
* This is mainly used for the install file when the showcase_count field was added to the xf_user table.
* Can be fired via CRON for routine maintenance or rebuild count
*/
public function updateUserShowcaseCount()
{
$userIds = $this->_getDb()->fetchCol('
SELECT DISTINCT user_id
FROM xf_nflj_showcase_item
WHERE item_state = "visible"
');
foreach ($userIds as $userId)
{
$itemCount = $this->_getDb()->fetchOne('
SELECT COUNT(*) as count
FROM xf_nflj_showcase_item
WHERE user_id = ?
AND item_state = "visible"
', $userId);
$this->_getDb()->update(
'xf_user',
array('showcase_count' => $itemCount),
'user_id = ' . $userId
);
}
}