Hi Zhiguo,
The design in the link can be used with randomise for a 2x2 repeated measurements design after a few changes regarding the exchangeability blocks. Even so, however, given that you'd like to account for nuisance variables, other less trivial changes to the design and contrasts would have to be done for the main effect of group.
It is much simpler to compute the sums and subtractions -- these can be scripted (use a for-loop for each subject, calling fslmaths to do the computations, then merge in new 4D files with fslmerge).
The main effect of time is computed using differences within subject. The main effect of group using the average (or the sum) within subject. The interaction with a difference for one group, and the difference with the sign swapped for the other group. All three tests will the use the same design: a 1-sample t-test adjusted for covariate(s), like this example from the manual: