Is it possible to create a block that will allow users to simply click on a colored box to change an elemnt (say, body background) throughout the site, this change will be visible to them only.
If that wasn't clear, see attached image.

CommentFileSizeAuthor
color_block.png902 bytestsi

Comments

aacraig’s picture

I'll be redoing the color selecting component on the next release.

I'll have to think about a generic use case for your request to see how it would work for in a general way.

Could you explain more in detail how you'd see this feature in the real world?

tsi’s picture

If I understand correctly your question, the general use case is the same as the project page states "to allow users to change their theme colors and background".
but this way, all the user have to do is click a color from a block situated in the header of any page (or anywhere else, it's a block after all...)
the site admin sets a group of selectors that will change according to the user's choice, for example I can choose that the user's choice will effect the body background and the h1, h2, h3 & h4 color.
there is a deprecated theme that used to do just that - called fourseasons 1.x, the 2.x version doesn't do that any more. here is a demo of 1.x.

SiteMaster.ServeLime.com’s picture

An extension of this use case would be to make the Color Picker available to choose a color code to apply.
Would that be easy to do?

Just found this module - Great! I'll definitely be playing with it :)

aacraig’s picture

Assigned: Unassigned » aacraig
aacraig’s picture

Version: 6.x-1.6 » 7.x-1.x-dev

Moving this request to the 7.x branch, as I won't be extending the 6.x functionality.

aacraig’s picture

Status: Active » Postponed

I've added this request to the roadmap.

hellomobe’s picture

Following up on the progress of the block and the use of jquery_colorpicker integration. I'm happy to fiddle with it (I'm a wanna be programmer, so it will definitely be fiddling). 1) didn't want to duplicate efforts - any code updates? and 2) how do I integrate the jquery_colorpicker...I see directions on colorpicker but not jquery_colorpicker (I can ask over on that module, but thought I'd start here so it applies best with your code base).

aacraig’s picture

I haven't had time to dedicate to the module, so the most recent code base is the dev snapshot.

You're welcome to fiddle and submit a patch. I should have time to work on the module next month, so if you have something by then I'll be able to include it in the next release.

hellomobe’s picture

I ended up going a custom scaled down version of your wonderful module -- huge thank you - I wanted to also add theme selection in one form borrowed from switchtheme module - I'll make a post with the code). Point being I can't test this.

For the block, looks the generality would be to add this to the module:

 function theme_hues_block_view($delta=''){
  switch($delta) {
    case 'theme_hues_user': //name of block - change to liking
      $block['subject'] = null; // Most forms don't have a subject 
      $block['content'] = drupal_get_form('theme_hues_configure'); //form function in theme_hues.user.inc
      break;
   }
   return $block;
 }

http://stackoverflow.com/questions/1450941/inserting-a-form-into-a-block... (no, I'm not the genius...unfortunately). Please test out and report back.

jmrivero’s picture

Issue summary: View changes

Here is a block definition that works for me, added block info to #9 the include of theme_hue.user.inc.

/**
* Implements hook_block_info().
*/
function theme_hues_block_info() {
  $blocks = array();

  $blocks['theme_hues_user'] = array(
    'info' => t('Page colors tweaking.'),
    'cache' => DRUPAL_NO_CACHE,
  );
 
  return $blocks;
}

/**
* Implements hook_block_view().
*/
function theme_hues_block_view($block_name = ''){
  switch($block_name) {
    case 'theme_hues_user': //name of block - change to liking
      module_load_include('inc', 'theme_hues', 'theme_hues.user');
      $block['subject'] = null; // Most forms don't have a subject
      $block['content'] = drupal_get_form('theme_hues_configure'); //form function in theme_hues.user.inc
      break;
   }
   return $block;
 }