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 08-24-2018, 11:23 PM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 44,505
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: 516
Gender: Unknown/Other
Credits: 63,590
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.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 44,505
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:41 AM.

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