Bryan_TAO

Remove News & Announcements Latest Topics

Recommended Posts

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.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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)) {

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now