MyBB Community Forums

Full Version: [F] Forum announcements trow do not alternate [C-StefanT]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Screen below, forum announcements trow colors do not alternate after so many announcements.
Here's the page it's on. I'm also running 1.4.8 current.
http://www.centerstagem.com/forum/forumd...php?fid=17

Shows like this in either theme I use also. If you look in the other forums you'll also see the ones with 2 announcements are the same color also.

Regards
I can also reproduce this in 1.4.8 stock with standard theme. in forumdisplay.php, bgcolor is initialized to trow1, then it goes into the loop for the announcements, and at the end of each loop, it calls $bgcolor = alt_trow() - and the first call to that functions sets it to trow1 again, so the first two announcements show up in the same color.

To me it seems like no variable should be initialized to "trow1" at all, instead it should be initialized to alt_trow(reset=true) - which would set it to trow1 and ensure that the next call to alt_trow will be trow2 so it alternates properly.
How can this be reproduced? Can you give some steps?

I see the code behind it, does commenting out the lines at 123 and 298 resolve the problem? I don't quite see why $bgcolor is used outside a loop anyway...
All I did was create some global and forum announcements (three each), and it showed the first two with the trow1 shade. If it doesn't happen for you, you must have something else initializing the alt_trow() differently... maybe a subforum that's displayed on the same page, since those also use alt_trow()? Do you have subforums in there?
No I didn't, but I can see where I went wrong. Smile
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group