New function which creates stats button on diary.