My configuration that makes buttons (including thumb buttons) and wheel (including the small cruising buttons at the wheel) work (at least in Firefox) looks like this:
In /etc/X11/xorg.conf:
Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
EndSection
And in /etc/X11/Xmodmap:
pointer = 1 2 3 4 5 8 9 6 7