Mysidia Adoptables Support Forum  

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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-24-2018, 11:23 PM
Missy Master's Avatar
Missy Master Missy Master is offline
*~Pet-Sim Com!~*
 
Join Date: Jan 2010
Posts: 448
Gender: Unknown/Other
Credits: 12,974
Missy Master is an unknown quantity at this point
Default Color picker

Does anyone know a simple way to use color picker with the latest version?

I want to use that to change colors on bases.



I've never gotten the hang of CP, sadly!
__________________
Reply With Quote
  #2  
Old 08-26-2018, 07:12 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 508
Gender: Unknown/Other
Credits: 20,683
Dinocanid is on a distinguished road
Default

You could use a color picker with an HTML form, like:
PHP Code:
$document->add(new Comment("<form action='PAGENAME' method='post'>
<input type='color' id='color' name='color' value='#e66465' />
<button id='submit' value='submit' name='submit type='submit'>Pick Color!</button>
</form>"
)); 
Replace PAGENAME with the whatever page you use this on. If used in blankview.php for example, you would replace it with "blank".

To get the data from the form, use this:
PHP Code:
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            
$mycolor $_REQUEST['color'];
            
$document->add(new Comment("The color you picked was {$mycolor}!"));
//a database statement could also go here if you want to store the chosen color
            
return;
        } 
That's just getting the color though. I'm not entirely sure how to apply the chosen color to pets.
__________________
Reply With Quote
  #3  
Old 08-27-2018, 10:13 AM
Missy Master's Avatar
Missy Master Missy Master is offline
*~Pet-Sim Com!~*
 
Join Date: Jan 2010
Posts: 448
Gender: Unknown/Other
Credits: 12,974
Missy Master is an unknown quantity at this point
Default

I might be able to work that out. :)

Thank you so much, I appreciate the tips!
__________________
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


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

Currently Active Users: 247 (1 members and 246 guests)
Threads: 3,942, Posts: 31,405, Members: 15,530
Welcome to our newest members, ancrsbys01.
BER





What's New?

What's Hot?

What's Popular?


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