![]() |
|
Article Options |
Adding HTML5 color picker to your product settings
by
![]() Rating:
![]() Result http://www.w3schools.com/html/tryit....put_type_colorIn this article i will explain how to put an HTML5 colorpicker to your product setting. Usually what you can do is making a normal input text field where admins can put hex colors you can then use $vbulletin->options['setting_name'] to get that hex value but if you're looking for something more beautiful and easy to use (fir admins) then do as described. Create your setting Varname: Your setting varname (to use it later on your mod) Setting group: The group of settings where the setting is Product: Your product name Title: The title of your setting (e.g. Color of the background) Description: The description of your setting (e.g. Choose a color fron the color picker) Option code: In this case custom eval code
Remember that the value you insert will be used in a php string between two double-quotes so in your html tag you can use <font color=\" or <font color=', in this case i decide to use apostrophes. Default: Your default value (e.g. #000000) Data Validation type: Free Validation PHP Code: Not useful now Last edited by Scanu; 26 Jul 2014 at 11:35.. |
||||
Views: 6526
|
Comments |
#2
|
|||
|
|||
Amazing Scanu, I cant like your post telling me that I must like anothers post befor Liking yours .. And I did like another one and came back.. Still the same.. Strange..
Well done
__________________
I am having a little break from vB Developing. I am trying to finish my PHP and MYSQL courses for now. I will answer all my PM's if anyone needed help for my products, but only when I can be online on vB.org. Its great to see new and old developers keeping vB.org alive! Thank you all for your support!CM
No members have liked this post.
|
#3
|
||||
|
||||
screen shots not working !
![]() ![]() No members have liked this post.
|
#4
|
||||
|
||||
Sorry moderators removed attachments (don't ask me why)
![]() I'll upload new screenshots soon
__________________
http://twitter.com/scanu_account No members have liked this post.
|
#5
|
||||
|
||||
Thanks
![]() but screen shots not working ![]()
__________________
AdSense revenue sharing 100% - [ Hanan ] News, egypt : أخبار مصر - Photo, picture : صور No members have liked this post.
|
#6
|
||||
|
||||
Sorry again, i didn't find time to upload new screens. You can search on google for some image of the html 5 color picker (input type color).
__________________
http://twitter.com/scanu_account No members have liked this post.
|
#7
|
||||
|
||||
are there any products anyone know of off hand that have this in them, i'd like to see how it's implemented
__________________
If you need custom work done please use Dirt RIF CustUmz Owner of vBTeam vBulletin 3.8.14 DRC Edition PHP 7.4 Compatible- NOT a null, NOT complete files Requires a legit copy of vBulletin 3.8.11. No members have liked this post.
|
#8
|
||||
|
||||
http://www.w3schools.com/html/tryit....put_type_color
This is how it will look, it doesn't work on all browsers, on old browsers you'll see a normal text field
__________________
http://twitter.com/scanu_account No members have liked this post.
|
#9
|
||||
|
||||
Scanu, thanks for sharing! What about multiple color pickers with separated values(such as a comma separated), but in one setting? Something like this:
![]() At this moment, I add to Code Option next value:
I understand what wthis not correct. And I almost undersand wherefore after save settings, I have the same value for all three color pickers. As I understand for "Code Option" needed more tricky code, which would collect all the values separated by a comma, and in the cycle, based on the available number of values, would create the same number of color pickers. But I`m not very good understood how does work eval code in "Code Option" fields((( --------------- Added 02 Aug 2016 at 21:51 --------------- Forget it... I found this article: http://www.vbulletin.org/forum/showthread.php?t=181044 and figure out how I can implement what I need. No members have liked this post.
Last edited by taravasya; 02 Aug 2016 at 19:51. |
![]() |
«
Previous Article
|
Next Article
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Article Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 07:07.