Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

Field background-color & Field select image

  • escalona
  • escalona
  • OFFLINE
  • Posts: 113
  • Thanks: 5
  • Karma: 1
12 years 2 months ago #214291 by escalona
Hi,
I am creating profiles with Profile Pro and I want to that users can choose the color of background.
I can do this: <div style "background-color:{fld cb_color}"> and works.
Color field is a select.
Well, now my problem is this:
ugly that user choose these values:#993300, #87B016 .Best: Red, green,...
QUESTION 1:
How do?
QUESTION 2:
it would be fantastic images as field value and display in edit profile images, so user choose from different backgrounds. As you have in the Gallery Avatar.
Is it possible?
Thank you.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48708
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214297 by krileon

How do?

Just create a dropdown with the hex values instead of red/green/etc.. otherwise you're going to need to create a new fieldtype that has the name as the label and the hex value as the value. You can also try supplying the next value as the field values then translate them in your CB language files as follows.

'#000000' => 'Black',
'#FFFFFF' => 'White',

Is it possible?

Yes, use CSS to alter the background of the dropdown selects options. Use Chrome or Firebug for Firefox to inspect the select field to see its options IDs as each has a unique ID you can use in CSS to style it. Alternative is to do similar except have the field be a radio type if you're wanting something somewhat like the avatar gallery selector.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • escalona
  • escalona
  • OFFLINE
  • Posts: 113
  • Thanks: 5
  • Karma: 1
12 years 2 months ago #214302 by escalona
OK, Attempt Question 1 with translation language, but, I feel it, do not do well.
I paste this:
DEFINE("#993300","Rojo");
in components\com_comprofiler\plugin\language\es-es\lenguage.php
or in
\components\com_comprofiler\plugin\language\default_language\lenguage.php????
TANKS

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48708
  • Thanks: 8319
  • Karma: 1447
12 years 2 months ago #214333 by krileon
If your site is only using 1 language then just define it in that languages plugin. Otherwise you need to define it in both.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum