MyBB Hacks

Full Version: Random Number
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone know if it's possible to generate a random number when a member posts a thread with the likes of Template Conditionals? Basically, I want this to happen:

1. Member clicks New Thread
2. Adds their subject and text > Clicks Post Thread

3. Their thread then shows:

Subject: Their Subject

Message: Their Message + Your Random number is: *Random Number*

I just want the text Your Random Number is: and the number to appear in their post in a specified forum.

Maybe you can do it with Xthreads possibly? Or maybe it requires a whole new plugin, who knows. I'm just looking for the easier options Smile
Depends whether you want the random number is "static" or not.
What I meant by "static" is, it won't generate other random number after the thread is submitted (the random number created once while the user submitting the thread, so every users will see the same random number when viewing the same thread). The random number will be stored in db. For this type random number, you can use XThreads.

If you want it to be dynamic (each user will see different number, even when viewing the same thread), you can use Template Conditional.
Well I think I will need XThreads. I want only 1 forum to have this number shown. So, if I create a thread and my random number is 5, everyone must see my number is 5, so it doesn't change to different people. I don't want a different number shown to every member, just the number that is selected when thread is created.

Can you help me to get this done on XThreads? I am new and have never used it.
I'll try to create a tutorial soon.
Reference URL's