vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Random Number BBCode (https://vborg.vbsupport.ru/showthread.php?t=99516)

spongebobrox128 10-27-2005 10:00 PM

Random Number BBCode
 
Well, I wrote this, and I sometimes have a use for random numbers (long story...), so I decided to release it.
Just import the product, you should know what to do by now, vb 3.5 has been out.
Use in posts by [rand] (will be a number 0-9)
UPDATE:
product-randombbcodenochange.xml will make it so that the number stays what it is at after posting, and product-randomnumberbbcode.xml makes it so that at each refresh, it is a different number

Lea Verou 10-28-2005 04:05 PM

This would be nice for forum-games, like a dice :)
I won't be installing now but I'll think about it later :)
Does it produce integers only?
Is the random number created at once or changes each time sb refreshes the page?

Anyway thanks for sharing :)

spongebobrox128 10-28-2005 04:21 PM

It changes each time the page refreshes, and it produces integers 0-9 only.

Lea Verou 10-28-2005 04:31 PM

Ohh then it wouldn't very good for a dice.
Anyway I'm sure many people will like it :)

spongebobrox128 10-28-2005 05:43 PM

Thanks!
I could make a version that doesn't change every time easily though, if you want (Obviously, all I need to do is make it replace on post instead of on view)

Lea Verou 10-28-2005 05:51 PM

I'll ask the other admin if he likes it too and if so I'll tell you so that you don't do it for no reason :)

spongebobrox128 10-28-2005 06:36 PM

Well, I am already done...I will upload if you want it or if anyone else does
EDIT: Uploaded

calldaffer 10-29-2005 11:46 PM

I like it...now I just gotta figure out a game to use it on ;)

dknelson 11-15-2005 06:05 PM

I like this but is it possible for the random number to be higher? For example, I sometimes have contests on my forum. At this time, I have just over 1900 members. I would like to be able to choose a random number between 1 and 19XX or whatever the membership number is.

Lea Verou 11-15-2005 11:23 PM

Quote:

Originally Posted by dknelson
I like this but is it possible for the random number to be higher? For example, I sometimes have contests on my forum. At this time, I have just over 1900 members. I would like to be able to choose a random number between 1 and 19XX or whatever the membership number is.

Try to find rand(1,9) in the plugin code and change it to rand(1,1999) ;)

Edit: Oh, I just saw that you want the number to represent the member number... That would need a query and right now I don't have time to format it for you :o

jesus likes pie 11-15-2005 11:29 PM

Actually Michelle, I don't think he meant that....he just wanted like a raffle I think.


Anyways, nice hack, I'll bookmark it and if I ever need it I will install it :)

Lea Verou 11-15-2005 11:30 PM

Quote:

Originally Posted by jesus likes pie
Actually Michelle, I don't think he meant that....he just wanted like a raffle I think.


Anyways, nice hack, I'll bookmark it and if I ever need it I will install it :)

What is a raffle? :nervous:

Rich 11-16-2005 04:27 PM

Hello,

A raffle is when a random number string is collected and the user that holds that random number wins a prize. In essence, it is a lottery governed by the gambling laws.

I too would like to use this for something similar. In order for this to work for a raffle though, it would need to make sure it doesn't generate the same number in a thread. If all numbers have been taken, it would need to "close" automatically.

If this modification could generate these random numbers after a payment of somesort has been made. (Like integrating it with the PP donations hack), it would make for a great raffle system.

Rukbat 04-02-2006 07:58 PM

so how do i actually install this? just upload the xml file? to where? no other changes need to be made anywhere?


All times are GMT. The time now is 05:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01092 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete