Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Color-picker?


Go to End


39 Posts   14267 Views

Avatar
bummzack

Community Member, 904 Posts

19 December 2009 at 9:18pm

1) The thing you downloaded is the JavaScript only. You also need the PHP class and some additional JavaScript to make it work in SilverStripe. Download it from my site: http://bummzack.ch/colorpicker (scroll down and download colorpicker.zip).

2) dev/build is something quite fundamental when developing with SilverStripe. You have to do it whenever you add new modules or own page-classes to your website. Basically you just append /dev/build to the URL where SilverStripe is installed. So if SilverStripe is installed in http://localhost/silverstripe, it would be http://localhost/silverstripe/dev/build.
I think you should really have a look at the SilverStripe tutorials.. it's all explained there: http://doc.silverstripe.org/doku.php?id=tutorials

Avatar
Mikan

Community Member, 17 Posts

19 December 2009 at 9:53pm


hi, banal

Thanks for your replying. I am new to silverstripe ,

I just downed the new "colorpicker.zip" from your site: http://bummzack.ch/colorpicker

after unzip the colorpicker.zip file, I saw this folder has 2 folders, "__MACOSX" and "colorpicker" folder, I did to uploaded the ""colorpicker" folder to my silverstripe site Directory.

and create a new ColorPage.php File, uploaded , then run dev/build by use: http://www.mysiteurl.com/dev/build)

site auto forward to http://www.mysiteurl.com/Security/login

my site still down, I don't know why .

Please check my new "ColorPage.php" file below

Thanks

Avatar
bummzack

Community Member, 904 Posts

19 December 2009 at 10:00pm

/dev/build requires a login if your website is live.
Either login, or if you can't do that due to the Error, add the following to mysite/_config.php

Director::set_environment_type('dev');

Then you should be able to run /dev/build without login.
Your colorpage looks fine.

Avatar
Mikan

Community Member, 17 Posts

19 December 2009 at 11:27pm

yes, banal

I just edited the file mysite/_config.php with code below:

Director::set_environment_type('dev');

after uploaded the file "_config.php" ,then run dev/build by use: http://www.mysiteurl.com/dev/build

It take me to:

Environment Builder (formerly db/build)
...
...
Creating database tables
...
Creating database records

My site has been back to live, after I logined to my admin CP -site content,

I can't see the "colorpicker" Module , I am not be able to edit color to my content.

how to activation the "colorpicker" Module ?

Thanks

Avatar
bummzack

Community Member, 904 Posts

19 December 2009 at 11:33pm

The colorpicker module just adds a new field to the SilverStripe form fields.
If you create a new "Color Page" in the CMS you should be able to select a color on the color field you added there...

Avatar
Mikan

Community Member, 17 Posts

19 December 2009 at 11:54pm

hi,

banal, I just created a page by choose" Color Page" , then click" Go"

It take me to "Content creating"

I can not see any color button and color words.

thanks

Avatar
bummzack

Community Member, 904 Posts

20 December 2009 at 1:59am

Do you see the text-field labeled "Background Color"? If you click on it, the color selector should appear.

Avatar
Mikan

Community Member, 17 Posts

20 December 2009 at 2:15am

yes,

I saw this "Background Color" ,

Background Color,

But to add the Color to my Content ?

how to make the "Background Color" to Content?

how to use the Color-picker ? how does it work on Content creating and text ?

thanks