Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #11  
Old 02-24-2012, 05:26 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 85,227
SilverDragonTears is on a distinguished road
Default

Can't wait for this!!
__________________

Check out SilvaTales
Reply With Quote
  #12  
Old 03-06-2012, 01:20 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 397,749
Hall of Famer is on a distinguished road
Default

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.
Reply With Quote
  #13  
Old 03-07-2012, 01:17 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 85,227
SilverDragonTears is on a distinguished road
Default

*makes grabby hands*
__________________

Check out SilvaTales
Reply With Quote
  #14  
Old 03-07-2012, 02:03 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 397,749
Hall of Famer is on a distinguished road
Default

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.
Reply With Quote
  #15  
Old 03-07-2012, 03:36 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 85,227
SilverDragonTears is on a distinguished road
Default

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?
__________________

Check out SilvaTales
Reply With Quote
  #16  
Old 03-07-2012, 03:39 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 397,749
Hall of Famer is on a distinguished road
Default

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.
Reply With Quote
  #17  
Old 03-07-2012, 03:46 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 85,227
SilverDragonTears is on a distinguished road
Default

Ok I see. But you never see that code. I guess I want the $aid to be letters.
__________________

Check out SilvaTales
Reply With Quote
  #18  
Old 03-07-2012, 04:11 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 397,749
Hall of Famer is on a distinguished road
Default

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:
$aid passgenerator(15,0
Assume you do not want symbols in this field, since it is an id this should make sense. Be careful with what you do with adoptables id though, this field is predefined to be an auto-increment number and modifying this can lead to many potential problems in future.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #19  
Old 03-07-2012, 09:20 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 85,227
SilverDragonTears is on a distinguished road
Default

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
__________________

Check out SilvaTales
Reply With Quote
  #20  
Old 03-09-2012, 07:49 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 397,749
Hall of Famer is on a distinguished road
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -5. The time now is 11:25 PM.

Currently Active Users: 774 (0 members and 774 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636