In a large bowl, mix together flour, baking powder, baking soda and salt. In a separate bowl, mix buttermilk, eggs, rum extract and vanilla. With an electric mixer on medium speed, cream the butter and sugar until smooth. Add the flour mixture and blend. Pour and spread the batter over the pineapples.