Bryan_TAO Posted February 12, 2018 Share Posted February 12, 2018 Hi, am I permitted to comment out/remove the News & Announcements Latest Topics section on the Dashboard and if so - how please? Thank you. Bryan. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 12, 2018 Share Posted February 12, 2018 We could simplly edit the template to not show these, but since it takes time to fetch the 'News' and 'Recent Extensions', time that is now wasted, we can edit the controller code that fetches this data. In the admin file /sources/dashboard.index.inc.php: Near line 91, find: ## Get recent extensions if($GLOBALS['session']->has('recent_extensions')) { Note the ending brace of the if/else block at line 108. Above the if statement, add: /* Strarting ignoring statements After the ending brace, add: Ending ignoring statements */ Then, near line 387, find: ## Latest News (from RSS) if ($GLOBALS['config']->has('config', 'default_rss_feed') && !$GLOBALS['config']->isEmpty('config', 'default_rss_feed') && filter_var($GLOBALS['config']->get('config', 'default_rss_feed'), FILTER_VALIDATE_URL)) { Note the closing brace for the if/else block at line 431. Add new lines as added above. Quote Link to comment Share on other sites More sharing options...
Bryan_TAO Posted February 13, 2018 Author Share Posted February 13, 2018 Thank you very much! Bryan Quote Link to comment Share on other sites More sharing options...
Bryan_TAO Posted February 13, 2018 Author Share Posted February 13, 2018 Hi bsmither I'm sorry to be a pain - and I don't know if asking this is possible as I'm a bit of a dinosaur and not used to Forums and the etiquette involved - but is it possible for you to make the second changes to the attached dashboard.index.inc file as every time I try I break it! I made the changes in the first part of your instructions to remove the Recent Marketplace Extensions and saved that; great! But I cannot make the second part work to remove News & Announcements. Thank you in hopeful anticipation. Bryan. dashboard.index.inc.php Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 13, 2018 Share Posted February 13, 2018 The file attached above does not contain the edit regarding the Recent Extensions. Was this suppose to be the file that you edited? In the admin file /sources/ dashboard.index.inc.php: Near line 428, find these six lines: trigger_error($e->getMessage(), E_USER_WARNING); } } } } $GLOBALS['main']->addTabControl($lang['dashboard']['title_store_overview'], 'advanced'); Change to: trigger_error($e->getMessage(), E_USER_WARNING); } } } } End ignoring statements */ $GLOBALS['main']->addTabControl($lang['dashboard']['title_store_overview'], 'advanced'); Near line 387, find: ## Latest News (from RSS) if ($GLOBALS['config']->has('config', 'default_rss_feed') && !$GLOBALS['config']->isEmpty('config', 'default_rss_feed') && filter_var($GLOBALS['config']->get('config', 'default_rss_feed'), FILTER_VALIDATE_URL)) { Change to: ## Latest News (from RSS) /* Start ignoring statements if ($GLOBALS['config']->has('config', 'default_rss_feed') && !$GLOBALS['config']->isEmpty('config', 'default_rss_feed') && filter_var($GLOBALS['config']->get('config', 'default_rss_feed'), FILTER_VALIDATE_URL)) { Quote Link to comment Share on other sites More sharing options...
Bryan_TAO Posted February 15, 2018 Author Share Posted February 15, 2018 Thank you bsmither! Lots of trials, mostly errors :-) but I got there in the end! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.