1
Chappy
Color Picker element? What is it and how to make it work?
  • 2006/8/25 22:02

  • Chappy

  • Friend of XOOPS

  • Posts: 456

  • Since: 2002/12/14


What is the color picker element and how do I make it work? I had read about it before and understood from what I read that whenever XOOPS presented a form, that the option would be present to set the color for the various elements. But, upon examination and trials, I couldn't make it work. Maybe I'm missing something (honestly, I'm sure I am), but I notice no differences on my forms with the Color Picker. Can someone explain it and how to set it's utility?

Thanks in advance!

Mike D.
MMM...It tastes like chicken! ...

2
Bender
Re: Color Picker element? What is it and how to make it work?
  • 2006/8/25 22:17

  • Bender

  • Home away from home

  • Posts: 1899

  • Since: 2003/3/10


You could PM zoullou with the url of this post in case he misses this it. He should be able to tell you more about this feature implementation.
Sorry, this signature is experiencing technical difficulties. We will return you to the sheduled signature as soon as possible ...

3
niluge_kiwi
Re: Color Picker element? What is it and how to make it work?

I've tested this new XoopsForm element, and it could be better...

To add this element to a form, its the same as the other xoopsform elements.

It adds a field containing a RGB HExadecimal color prefixed by #, and a button which open a small popup intowhich there is a table with lots of cells, each containing a color. And with some javascript, when the cursor is over a cell, the color and the code is display at the top of the popup, a clicks close the popup and adds the code color into the field.

I think a whole color palette sould be better (more choice of colors).

4
Chappy
Re: Color Picker element? What is it and how to make it work?
  • 2006/8/25 22:48

  • Chappy

  • Friend of XOOPS

  • Posts: 456

  • Since: 2002/12/14


Thanks, all! I'll pm him. It looks like it could be pretty helpful. Just not sure how to make it happen?
MMM...It tastes like chicken! ...

5
zoullou
Re: Color Picker element? What is it and how to make it work?
  • 2006/8/26 9:03

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


Hi all,

Here is a translation of a little article that i made for the French suport site.

Resized Image
You can use this Form Element on your XOOPS form by including the formLoader (class/xoopsformloader.php).
The name of this new class is : XoopsFormColorPicker. The constructor of this class : XoopsFormColorPicker($caption, $name, $value="#FFFFFF")
Caption and name have the same fonctionnality as for other XoopsFormElement and the 3rd parameter is for the default color.

You can test it like this :
$form = new XoopsThemeForm('Color Picker test form''color_picker_test''test.php''post'true);
$form->addElement(new XoopsFormColorPicker("Color Picker","color1"),true);
$form->display();


This code create a form with only the color picker. It work like the dataPicker, you must click on the button to display the color on a popoup windows.

I will add a post about this new feature : "Gave XoopsForm elements the possibility to render custom validation code"

Cheers

6
davidl2
Re: Color Picker element? What is it and how to make it work?
  • 2006/8/26 10:22

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Thank you Zoullou

Could you post any documents about this on the XOOPS Docs site as well? (French version also welcome )

7
zoullou
Re: Color Picker element? What is it and how to make it work?
  • 2006/8/26 10:26

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


No problem

8
Chappy
Re: Color Picker element? What is it and how to make it work?
  • 2006/8/27 0:08

  • Chappy

  • Friend of XOOPS

  • Posts: 456

  • Since: 2002/12/14


Thanks, Zoullou!

Appreciate all your hard work!
MMM...It tastes like chicken! ...

9
Chappy
Re: Color Picker element? What is it and how to make it work?
  • 2006/8/29 11:07

  • Chappy

  • Friend of XOOPS

  • Posts: 456

  • Since: 2002/12/14


I realy like this interface. It looks great. But, I still don't get exactly how I'm supposed to use it. I have never created my own forms. The instructions given seem to say that that is what I do to use this. In other words, I know next to nothing about programming. I can cut and paste code, but not program. What I am, trying to do is, for instance, get colorpicker to come up when I post and article in news. I think it would be a neat and instructive tutorial to show how to do that in the various modules. So far, it's not very obvious to me. Thanks for any thoughts that can be offered in better understanding this.
MMM...It tastes like chicken! ...

10
zoullou
Re: Color Picker element? What is it and how to make it work?
  • 2006/8/29 12:43

  • zoullou

  • Quite a regular

  • Posts: 250

  • Since: 2004/3/2 0


Hi Chappy,

Color picker is a XoopsFormElement. It must be used on a XoopsFormElement.
Where you want to use it ? (in news for exemple)

Thanks

Login

Who's Online

397 user(s) are online (238 user(s) are browsing Support Forums)


Members: 1


Guests: 396


DediRock,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits