![]() |
#11
|
||||
|
||||
![]()
Can't wait for this!!
|
#12
|
||||
|
||||
![]()
I created a function that allows you to generate an alphanumeric code of any length. You can also enable/disable generation of symbols. This function will be included in the functions.php file for Mys v1.3.0 release, but you can have it now if you cant wait for this. The symbols list does not include all available symbols, since some mess up the script. But anyway, Id say at least 80% of symbols can be generated successfully with this function.
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#13
|
||||
|
||||
![]()
*makes grabby hands*
|
#14
|
||||
|
||||
![]()
Sent to your PM box already, the function will be available in Mys v1.3.0 anyway.
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#15
|
||||
|
||||
![]()
I must be missing some steps. It isn't working for me. Where do I put the example and do I need to change or add anything else?
|
#16
|
||||
|
||||
![]()
umm first of all, if you have a field called code in database, make sure its type is varchar instead of int, since the latter only accepts numbers. You will need to copy/paste the function passgenerator() into your functions.php file, and then call it whenever you want to generate an alphanumeric code.
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#17
|
||||
|
||||
![]()
Ok I see. But you never see that code. I guess I want the $aid to be letters.
|
#18
|
||||
|
||||
![]()
I see, the id to be letters? This can be done too, but a bit more complicated. First of all, you must disable the primary key auto_increment setting for this field. Next, edit the aid data type from phpmyadmin to make it varchar(15). The last thing to do is to use the following script, which you should not have problem with:
PHP Code:
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#19
|
||||
|
||||
![]()
I got it working but I had to remove the is_numeric part through out a lot of the scripts. Hope that wasn't very important
![]() |
#20
|
||||
|
||||
![]()
I dont suppose its important, since is_numeric() checks if a variable contains only numbers.
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Making IDs be codes? | Empress_Swanbottom | Questions and Supports | 6 | 02-16-2013 01:24 PM |
Promo Codes | SilverDragonTears | Questions and Supports | 2 | 06-30-2012 01:22 PM |
How do i use the codes | Soffi | Questions and Supports | 5 | 12-28-2011 02:21 PM |
BB CODES | zhiichiro | Questions and Supports | 4 | 03-24-2009 05:52 PM |
codes | Blackmagic | Questions and Supports | 3 | 01-13-2009 07:30 PM |
What's New? |
What's Hot? |
What's Popular? |