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.


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'=>'')),
	array('blog.blogs' => array('ajax' => '#blog.getNew?id=js_new_item_holder', 'id'=>'blog','block'=>'')),
	array('' => array('ajax' => '#photo.getNew?id=js_new_item_holder', 'id'=>'photo','block'=>'')),
	array('poll.polls' => array('ajax' => '#poll.getNew?id=js_new_item_holder', 'id'=>'poll','block'=>''))		

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.

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

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