vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 5.x Products & Extensions (https://vborg.vbsupport.ru/forumdisplay.php?f=258)
-   -   Mini Mods - [CJ] Randomize (https://vborg.vbsupport.ru/showthread.php?t=328335)

delicjous 11-05-2020 10:00 PM

[CJ] Randomize
 
1 Attachment(s)
[CJ] Randomize is a vB5 plugin to create random integers, chars and strings to use it on the template.

Tested with 5.6.4 but should work with all other versions.

Because there is no built in syntax to generate random numbers in the templates, you could use this tiny plugin to get this done.

Examples are also available to activate on the admincp template-hook list. You could view the examples result on your footer after activating the template-hook.

To install the plugin, just put the unzipped folder into core/packages/
It will be installed automatically.

Examples
HTML Code:

Test a quick random number (0 to 9) without any variables. <br />
{vb:data randnr, delirandomize:delirand, randomNo}
{vb:raw randnr}
<br /> <br />
Test a 3digit random number without 0 (1 to 999). <br />
{vb:data randnr, delirandomize:delirand, randomNo, 1, 999}
{vb:raw randnr}
<br /> <br />
Test a 3digit random number only with 2 to 4 numbers. <br />
{vb:data randnr, delirandomize:delirand, randomNo, 2, 4, 3}
{vb:raw randnr}
<br /> <br /> Test a quick Letter upper case Letter. (A-Z) <br />
{vb:data randaz, delirandomize:delirand, randomAZ}
{vb:raw randaz}
<br /> <br />
Test 2 lowercase Letters. (A-Z) <br />
{vb:data randaz, delirandomize:delirand, randomAZ, 2, 1}
{vb:raw randaz}
<br /> <br />
Test a random string with given chars. <br />
{vb:data randstring, delirandomize:delirand, randomString, 'aAbBcC????*', 45}
{vb:raw randstring}


yilmaz 11-06-2020 11:46 AM

Good job.
I'll test it when I get home.

ywwz 12-24-2020 04:00 AM

Quote:

Originally Posted by yilmaz (Post 2604582)
Good job.
I'll test it when I get home.

It's been 48 days mate...


All times are GMT. The time now is 11:27 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.01054 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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