Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Random Number
Greig Offline
Junior Member
**
Posts: 16
Joined: Nov 2015
Post: #1
Random Number
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

Forum Lair: http://www.forumlair.com
The exciting hybrid community!
11-18-2015 02:04 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: Random Number
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.

11-19-2015 01:32 AM
Find all posts by this user Quote this message in a reply
Greig Offline
Junior Member
**
Posts: 16
Joined: Nov 2015
Post: #3
RE: Random Number
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.

Forum Lair: http://www.forumlair.com
The exciting hybrid community!
11-19-2015 03:05 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Random Number
I'll try to create a tutorial soon.

11-19-2015 03:07 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: