|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
By CAL: find: [/code] replace with:
</pre></div></div><br><br>At the top of ubb_lib.cgi find:<br><div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre> Under it add: [code] [ March 26, 2001: Message edited by: MasterMind ]
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Hey MM, that looks pretty good. Does it affect speed? Or is it just a much cleaner way of writing that sub?
|
|
|
|
Joined: Jan 2001
Posts: 14
Junior Member
|
Junior Member
Joined: Jan 2001
Posts: 14 |
probably a stupid question, but where can i find that sub?
|
|
|
|
Joined: Mar 2001
Posts: 97
Member
|
Member
Joined: Mar 2001
Posts: 97 |
You can find it in ubb_lib.cgi.
|
|
|
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
Hi Borg!
[ March 26, 2001: Message edited by: MasterMind ]
|
|
|
|
Joined: Jul 2000
Posts: 1,349
Member
|
Member
Joined: Jul 2000
Posts: 1,349 |
|
|
|
|
Joined: Feb 1999
Posts: 1,379
Programmer
|
Programmer
Joined: Feb 1999
Posts: 1,379 |
NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO! DO NOT USE THIS AS IS!!!!!! You need two important changes. Firstly, my example code generates a 5 digit random, whilst the existing gives a 6 digit. This version works: Secondly, you MUST put a call to "srand(time());" somewhere where it will get run once per execution (like the top os lib.cgi) else they wont be random at all! Just a thought
|
|
|
|
Joined: Jul 2000
Posts: 1,349
Member
|
Member
Joined: Jul 2000
Posts: 1,349 |
Greg: Shouldn't this be included in your "speeding up UBB" hack? BTW, 2 huge bugs in 1 line of code? Must be a record.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Somebody wanna finish this then?
|
|
|
|
Joined: Nov 2000
Posts: 1,271
Kahuna
|
Kahuna
Joined: Nov 2000
Posts: 1,271 |
and also...
please tell me (poor, poor rob) what this does?
i mean, sure, we all want clean make_random_number subs. my mom never let me leave home without one on! but... ...now that im all grow'd up... what does it do?
|
|
|
|
Joined: Feb 2000
Posts: 4,625
Member
|
Member
Joined: Feb 2000
Posts: 4,625 |
Fixed docs. It cleans up the make random number sub.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 21,079
Joined: March 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|