Is CSS Override possible?

Events happening in the community are now at Drupal community events on www.drupal.org.
stattler's picture

I was wondering if subtheming or overriding CSS is a possibility for the theme provided with OP 1.6?

Comments

Sub-theming is available for

irakli's picture

Sub-theming is available for any theme in Drupal, so I don't see why not?

.............................................
http://twitter.com/inadarei

Oh really? I didn't know

stattler's picture

Oh really? I didn't know that. I will have to explore then. Thanks.
Just found http://drupal.org/node/441088 and its so easy to make a simple subtheme!

Importing Context

stattler's picture

Hello,

I was trying to export the contexts to my old site. It exports well but when I import it, it gives me the following error:

    * warning: Invalid argument supplied for foreach() in /drupal/root/includes/common.inc on line 914.
    * warning: strtr() [function.strtr]: The second argument is not an array in /drupal/root/includes/common.inc on line 931.

Any suggestions? Here is the exported context:

function _context_default_contexts() {
  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'node_detail',
    'value' => 'article',
    'node' => array(
      '0' => 'article',
    ),
    'block' => array(
      'morelikethis_taxonomy' => array(
        'module' => 'morelikethis',
        'delta' => 'taxonomy',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'More Like This Taxonomy Block',
        'type' => 'context_ui',
      ),
      'morelikethis_flickr' => array(
        'module' => 'morelikethis',
        'delta' => 'flickr',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'More Like This Flickr Block',
        'type' => 'context_ui',
      ),
      'block_3' => array(
        'module' => 'block',
        'delta' => '3',
        'weight' => 34,
        'region' => 'right',
        'status' => '0',
        'label' => 'Right Block Square Ad',
        'type' => 'context_ui',
      ),
      'morelikethis_googlevideo' => array(
        'module' => 'morelikethis',
        'delta' => 'googlevideo',
        'weight' => 35,
        'region' => 'under_content',
        'status' => '0',
        'label' => 'More Like This Google Video Block',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'listing_pages',
    'value' => 'articles',
    'views' => array(
      '0' => 'articles',
    ),
    'block' => array(
      'block_3' => array(
        'module' => 'block',
        'delta' => '3',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'Right Block Square Ad',
        'type' => 'context_ui',
      ),
      'views_most_viewed_by_taxonomy-block' => array(
        'module' => 'views',
        'delta' => 'most_viewed_by_taxonomy-block',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'Most Viewed By Taxonomy',
        'type' => 'context_ui',
      ),
      'views_most_commented_articles-block_1' => array(
        'module' => 'views',
        'delta' => 'most_commented_articles-block_1',
        'weight' => 34,
        'region' => 'right',
        'status' => '0',
        'label' => 'Most Commented Articles',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'node_detail',
    'value' => 'blog',
    'node' => array(
      '0' => 'blog',
    ),
    'block' => array(
      'morelikethis_taxonomy' => array(
        'module' => 'morelikethis',
        'delta' => 'taxonomy',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'More Like This Taxonomy Block',
        'type' => 'context_ui',
      ),
      'morelikethis_flickr' => array(
        'module' => 'morelikethis',
        'delta' => 'flickr',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'More Like This Flickr Block',
        'type' => 'context_ui',
      ),
      'block_3' => array(
        'module' => 'block',
        'delta' => '3',
        'weight' => 34,
        'region' => 'right',
        'status' => '0',
        'label' => 'Right Block Square Ad',
        'type' => 'context_ui',
      ),
      'morelikethis_googlevideo' => array(
        'module' => 'morelikethis',
        'delta' => 'googlevideo',
        'weight' => 35,
        'region' => 'under_content',
        'status' => '0',
        'label' => 'More Like This Google Video Block',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'listing_pages',
    'value' => 'blogs',
    'views' => array(
      '0' => 'blogs',
    ),
    'block' => array(
      'block_3' => array(
        'module' => 'block',
        'delta' => '3',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'Right Block Square Ad',
        'type' => 'context_ui',
      ),
      'views_most_viewed_by_node_type-block' => array(
        'module' => 'views',
        'delta' => 'most_viewed_by_node_type-block',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'Most Viewed By Node Type',
        'type' => 'context_ui',
      ),
      'views_most_commented_blogs-block_1' => array(
        'module' => 'views',
        'delta' => 'most_commented_blogs-block_1',
        'weight' => 34,
        'region' => 'right',
        'status' => '0',
        'label' => 'Most Commented Blog Entries',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'multi',
    'value' => 'content_detail',
    'node' => array(
      '0' => 'blog',
      '1' => 'article',
      '2' => 'event',
      '3' => 'resource',
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'node_detail',
    'value' => 'event',
    'node' => array(
      '0' => 'event',
    ),
    'block' => array(
      'morelikethis_taxonomy' => array(
        'module' => 'morelikethis',
        'delta' => 'taxonomy',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'More Like This Taxonomy Block',
        'type' => 'context_ui',
      ),
      'morelikethis_flickr' => array(
        'module' => 'morelikethis',
        'delta' => 'flickr',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'More Like This Flickr Block',
        'type' => 'context_ui',
      ),
      'block_3' => array(
        'module' => 'block',
        'delta' => '3',
        'weight' => 34,
        'region' => 'right',
        'status' => '0',
        'label' => 'Right Block Square Ad',
        'type' => 'context_ui',
      ),
      'morelikethis_googlevideo' => array(
        'module' => 'morelikethis',
        'delta' => 'googlevideo',
        'weight' => 35,
        'region' => 'under_content',
        'status' => '0',
        'label' => 'More Like This Google Video Block',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'listing_pages',
    'value' => 'events',
    'views' => array(
      '0' => 'events',
    ),
    'block' => array(
      'block_3' => array(
        'module' => 'block',
        'delta' => '3',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'Right Block Square Ad',
        'type' => 'context_ui',
      ),
      'views_most_viewed_by_node_type-block' => array(
        'module' => 'views',
        'delta' => 'most_viewed_by_node_type-block',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'Most Viewed By Node Type',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'listing_pages',
    'value' => 'frontpage',
    'path' => array(
      '<front>' => '<front>',
    ),
    'block' => array(
      'views_articles-block_2' => array(
        'module' => 'views',
        'delta' => 'articles-block_2',
        'weight' => 33,
        'region' => 'left',
        'status' => '0',
        'label' => 'Homepage Featured Article',
        'type' => 'context_ui',
      ),
      'views_articles-block_1' => array(
        'module' => 'views',
        'delta' => 'articles-block_1',
        'weight' => 34,
        'region' => 'left',
        'status' => '0',
        'label' => 'Homepage Articles',
        'type' => 'context_ui',
      ),
      'views_feed_items-block_1' => array(
        'module' => 'views',
        'delta' => 'feed_items-block_1',
        'weight' => 35,
        'region' => 'left',
        'status' => '0',
        'label' => 'Feed Items',
        'type' => 'context_ui',
      ),
      'block_4' => array(
        'module' => 'block',
        'delta' => '4',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'Homepage Ad Block 1',
        'type' => 'context_ui',
      ),
      'openpublish_popular_terms_0' => array(
        'module' => 'openpublish_popular_terms',
        'delta' => '0',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'Most Used Terms',
        'type' => 'context_ui',
      ),
      'block_5' => array(
        'module' => 'block',
        'delta' => '5',
        'weight' => 34,
        'region' => 'right',
        'status' => '0',
        'label' => 'Homepage Ad Block 2',
        'type' => 'context_ui',
      ),
      'openpublish_popular_terms_1' => array(
        'module' => 'openpublish_popular_terms',
        'delta' => '1',
        'weight' => 35,
        'region' => 'right',
        'status' => '0',
        'label' => 'Featured Topic Hubs',
        'type' => 'context_ui',
      ),
      'views_blogs-block_2' => array(
        'module' => 'views',
        'delta' => 'blogs-block_2',
        'weight' => 32,
        'region' => 'over_content',
        'status' => '0',
        'label' => 'Homepage Blogs',
        'type' => 'context_ui',
      ),
      'views_multimedia-block_1' => array(
        'module' => 'views',
        'delta' => 'multimedia-block_1',
        'weight' => 33,
        'region' => 'over_content',
        'status' => '0',
        'label' => 'Homepage Multimedia',
        'type' => 'context_ui',
      ),
      'views_resources-block_1' => array(
        'module' => 'views',
        'delta' => 'resources-block_1',
        'weight' => 34,
        'region' => 'over_content',
        'status' => '0',
        'label' => 'Homepage Resources',
        'type' => 'context_ui',
      ),
      'views_twitter_items-block_1' => array(
        'module' => 'views',
        'delta' => 'twitter_items-block_1',
        'weight' => 35,
        'region' => 'over_content',
        'status' => '0',
        'label' => 'Latest Tweets',
        'type' => 'context_ui',
      ),
      'views_events-block_1' => array(
        'module' => 'views',
        'delta' => 'events-block_1',
        'weight' => 36,
        'region' => 'over_content',
        'status' => '0',
        'label' => 'Homepage Events',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'listing_pages',
    'value' => 'multimedia',
    'views' => array(
      '0' => 'multimedia',
    ),
    'block' => array(
      'block_3' => array(
        'module' => 'block',
        'delta' => '3',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'Right Block Square Ad',
        'type' => 'context_ui',
      ),
      'views_most_viewed_multimedia-block' => array(
        'module' => 'views',
        'delta' => 'most_viewed_multimedia-block',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'Most Viewed Multimedia',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'node_detail',
    'value' => 'resource',
    'node' => array(
      '0' => 'resource',
    ),
    'block' => array(
      'morelikethis_taxonomy' => array(
        'module' => 'morelikethis',
        'delta' => 'taxonomy',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'More Like This Taxonomy Block',
        'type' => 'context_ui',
      ),
      'morelikethis_flickr' => array(
        'module' => 'morelikethis',
        'delta' => 'flickr',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'More Like This Flickr Block',
        'type' => 'context_ui',
      ),
      'block_3' => array(
        'module' => 'block',
        'delta' => '3',
        'weight' => 34,
        'region' => 'right',
        'status' => '0',
        'label' => 'Right Block Square Ad',
        'type' => 'context_ui',
      ),
      'morelikethis_googlevideo' => array(
        'module' => 'morelikethis',
        'delta' => 'googlevideo',
        'weight' => 35,
        'region' => 'under_content',
        'status' => '0',
        'label' => 'More Like This Google Video Block',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'listing_pages',
    'value' => 'resources',
    'views' => array(
      '0' => 'resources',
    ),
    'block' => array(
      'block_3' => array(
        'module' => 'block',
        'delta' => '3',
        'weight' => 32,
        'region' => 'right',
        'status' => '0',
        'label' => 'Right Block Square Ad',
        'type' => 'context_ui',
      ),
      'views_most_viewed_by_node_type-block' => array(
        'module' => 'views',
        'delta' => 'most_viewed_by_node_type-block',
        'weight' => 33,
        'region' => 'right',
        'status' => '0',
        'label' => 'Most Viewed By Node Type',
        'type' => 'context_ui',
      ),
    ),
    'type' => 0,
    'status' => 1,
  );

  $items[] = array(
    'namespace' => 'openpublish',
    'attribute' => 'general',
    'value' => 'sitewide',
    'system' => 0,
    'description' => '',
    'sitewide' => '1',
    'block' => array(
      'block_1' => stdClass::__set_state(array(
         'module' => 'block',
         'delta' => '1',
         'weight' => -33,
         'region' => 'footer',
         'status' => '0',
         'label' => 'Credits',
         'type' => 'context_ui',
         'bid' => 'block_1',
      )),
    ),
    'type' => 1,
    'status' => 1,
  );

  return $items;
}

There's a bug in Context

irakli's picture

There's a bug in Context import/export code. You have to export one context at a time and import them one at a time, as well. Exported context are located in contexts folder under openpublish_core module, though so you can use them, too.

http://drupalcode.org/viewvc/drupal/contributions/modules/openpublish_co...

.............................................
http://twitter.com/inadarei

Import works

stattler's picture

I was able to import the contexts using the link that you gave. Unfortunately, I am unable to move the blocks. For example, in OP 1.5, Frontpage Blog view was assigned to Center position. For some reason, its now assigned to Left side, and I can't move it to "".

Do you know any solution to this problem? Sometime, blocks do not move to another region of the theme!

I am attaching the context

stattler's picture

I am attaching the context page. Could you please tell me how to remove the blocks from the Left sidebar region? It is circled red in the attached image. Thanks in advance.

Solved

stattler's picture

Problem solved after disabling Aggregator module.

Context related

stattler's picture

Dear Irakli
I've overwritten the old OP1.5 installation with OP1.6, imported the contexts but the problem is-- the Articles, Feature Articles, Blogs and everything else do not show up in the frontpage. Anything else needed to change to have it working? Thanks!

Are you using theme from 1.6?

irakli's picture

Are you using theme from 1.6? You need to also clear Drupal cache (using devel module or drush)

.............................................
http://twitter.com/inadarei

Yes, OP 1.6's

stattler's picture

Yes, OP 1.6's openpublish_theme. I am not cacheing at all. Tried to clear the cache from Configuration/Performance.

Context question

stattler's picture

Would you please give me some clue to put a block on frontpage? say, in the middle, below the blog list? I have played around with the context with no success.

I should say, I tried to put

stattler's picture

I should say, I tried to put an aggregator block with no success. Other blocks work.

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: