Store
Community Documentation

v3 Knowledgebase

How to rearrange the Whats New block

This tutorial will make the video to be the first and default tab under the "Whats New" block.

Warning: This steps will edit some default files.

BACKUP FIRST

Open: module/core/include/service/core.class.php

Find code around line 240:

$aMenus = Phpfox::massCallback('getWhatsNew');


Comment it like:

/* $aMenus = Phpfox::massCallback('getWhatsNew'); */


Then insert this code after that line (you can rearrange the array items to suit your needs):

$aMenus = array(
	array('video.videos' => array('ajax' => '#video.getNew?id=js_new_item_holder', 'id'=>'video','block'=>'video.new')),
	array('blog.blogs' => array('ajax' => '#blog.getNew?id=js_new_item_holder', 'id'=>'blog','block'=>'blog.new')),
	array('photo.photos' => array('ajax' => '#photo.getNew?id=js_new_item_holder', 'id'=>'photo','block'=>'photo.new')),
	array('poll.polls' => array('ajax' => '#poll.getNew?id=js_new_item_holder', 'id'=>'poll','block'=>'poll.new'))		
	);


Warning: If you are going to use this tweak you need to manually insert your 3rd party plugins if they use the what's new block.

Example:
array('myplugin.myplugin' => array('ajax' => '#myplugin.getNew?id=js_new_item_holder', 'id'=>'myplugin','block'=>'myplugin.new'))


NOTE: after doing this clear your cache using the admin panel to apply changes.