More details:
http://mybbhacks.zingaburga.com/showthread.php?tid=5295
Create a custom thread fields with these settings:
Title: Your Random Number is:
Key: random_number
Applicable Forums: Select any forum(s) where the random number will be displayed.
Hide input field on New/edit thread: Checked
Text Mask Filter: Digits
Input Formatter:
Modify it as our needs (ex: using min and max).
Custom Modify Error:
Underlying Data Type: Integer (unsigned, usually 32-bit)
By default, it'll be displayed above the first post. For displaying it manually somewhere else, check the Hide on Show thread setting, set the Display Format setting to:
then put {$GLOBALS['threadfields']['random_number']} inside postbit_first and/or postbit_first_classic and/or forumdisplay_thread templates.