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
  #1  
Old 12-29-2012, 02:32 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,222
SilverDragonTears is on a distinguished road
Default Allow different spelling of names

If someone has the name Holly for an adopt, how can I make it so that another person can use HoLLy, or some other variation of the same name?
__________________

Check out SilvaTales
Reply With Quote
  #2  
Old 12-29-2012, 02:37 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,694
Abronsyth is on a distinguished road
Default

Not that I can answer this...but are users currently unable to give their pet the same name of another existing pet..?
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #3  
Old 12-29-2012, 02:38 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,222
SilverDragonTears is on a distinguished road
Default

If you have it set up that way which I do. And I think that it's default.
__________________

Check out SilvaTales
Reply With Quote
  #4  
Old 12-29-2012, 02:55 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: 327,526
Hall of Famer is on a distinguished road
Default

You can use strcmp() function to validate the name of an adoptable with another. This one is case sensitive, so Adopt and adopt are not the same.
__________________


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

Where do I place that at?
__________________

Check out SilvaTales
Reply With Quote
  #6  
Old 12-29-2012, 04:28 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: 327,526
Hall of Famer is on a distinguished road
Default

Place it where it validates adoptables name.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #7  
Old 12-30-2012, 10:20 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,222
SilverDragonTears is on a distinguished road
Default

I tried this but I don't think it's correct as it didn't work.

Code:
else{
                    $stmt = $adopts->query("SELECT * FROM ".constant('PREFIX')."owned_adoptables WHERE name='{$more}'");
                    $row = $stmt->fetchObject();
                    if(!is_object(strcmp($row))){ 
                       // The name has not yet been used, we are good to go!
__________________

Check out SilvaTales
Reply With Quote
  #8  
Old 12-30-2012, 10:42 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: 327,526
Hall of Famer is on a distinguished road
Default

Of course its not correct lol. You dont know how to use the strcmp() function dont ya? It accepts two arguments, not one. The arguments have to be strings, not objects. Try this:

PHP Code:
$name $adopts->query("SELECT name FROM ".constant('PREFIX')."owned_adoptables WHERE name='{$more}'")->fetchColumn();
if(!
strcmp($name$more)){
    
// The name has not be used...
}
else{
    
// Show error message

__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #9  
Old 12-30-2012, 11:29 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,222
SilverDragonTears is on a distinguished road
Default

Rawr, I'm not putting it in the right place :(

Code:
$name = $adopts->query("SELECT name FROM ".constant('PREFIX')."owned_adoptables WHERE name='{$more}'")->fetchColumn();
if(!strcmp($name, $more)){
                       // The name has not yet been used, we are good to go!
                        $adopts->query("UPDATE  ".constant('PREFIX')."owned_adoptables SET name='{$more}' WHERE aid='{$id}' and  owner='{$loggedinname}'");
It says it worked but it didn't change the name.
__________________

Check out SilvaTales

Last edited by SilverDragonTears; 12-30-2012 at 11:31 AM.
Reply With Quote
  #10  
Old 12-31-2012, 03: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: 327,526
Hall of Famer is on a distinguished road
Default

umm are you sure the query is executed correctly? I mean, do the variables $id and $more exist? If so, what values do they hold? Use var_dump($id) and var_dump($more) to validate their values. If one of them turns out to be blank or null, you know the problem.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
Reply

Thread Tools
Display Modes

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
Domain Names Abronsyth Webmasters Area 4 11-28-2015 04:55 PM
Names for adoptables? tahbikat Adoptables Buzz 1 06-22-2014 12:26 PM
Species Names Beaux Questions and Supports 5 05-09-2011 04:07 PM
Descriptions and Names for each level? milay Suggestions and Feature Requests 1 03-06-2009 06:26 AM
Help With Changing Names? rosepose Questions and Supports 2 02-07-2009 03:47 PM


All times are GMT -5. The time now is 03:36 PM.

Currently Active Users: 451 (0 members and 451 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