This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $view = views_get_view('questions'); | |
| $view->set_arguments(array($topic_node->nid)); | |
| $output = $view->preview('panel_pane_1'); | |
| if (!empty($view->result)) { | |
| // We don't need to show anything. | |
| return; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| background: rgb(245,245,245); /* Old browsers */ | |
| background: -moz-linear-gradient(left, rgba(245,245,245,1) 0%, rgba(242,242,242,1) 60%, rgba(236,236,236,1) 73%, rgba(233,233,233,1) 100%); /* FF3.6+ */ | |
| background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(245,245,245,1)), color-stop(60%,rgba(242,242,242,1)), color-stop(73%,rgba(236,236,236,1)), color-stop(100%,rgba(233,233,233,1))); /* Chrome,Safari4+ */ | |
| background: -webkit-linear-gradient(left, rgba(245,245,245,1) 0%,rgba(242,242,242,1) 60%,rgba(236,236,236,1) 73%,rgba(233,233,233,1) 100%); /* Chrome10+,Safari5.1+ */ | |
| background: -o-linear-gradient(left, rgba(245,245,245,1) 0%,rgba(242,242,242,1) 60%,rgba(236,236,236,1) 73%,rgba(233,233,233,1) 100%); /* Opera 11.10+ */ | |
| background: -ms-linear-gradient(left, rgba(245,245,245,1) 0%,rgba(242,242,242,1) 60%,rgba(236,236,236,1) 73%,rgba(233,233,233,1) 100%); /* IE10+ */ | |
| background: linear-gradient(to right, rgba(245,245,245,1) 0%,rgba(242,242,242,1) 60%,rgba(236,236,236,1) 73%,rgba(233,2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Find term. | |
| $term_origin = taxonomy_get_term_by_name($origin_name); | |
| // Create term. | |
| $term = new stdClass(); | |
| $term->name = $category_name; | |
| $term->vid = $product_category_vid; | |
| taxonomy_term_save($term); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Contextual links wigget. TODO: make this custom to creative page. | |
| div.contextual-links-wrapper { | |
| ul.contextual-links { | |
| width: 100px; | |
| right: auto; | |
| top: 18px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function aaa($race = 'humans') { | |
| $terms = taxonomy_get_term_by_name($race, 'race'); | |
| $query->entityCondition('entity_type', 'node') | |
| ->entityCondition('bundle', 'video') | |
| ->propertyCondition('status', NODE_PUBLISHED) | |
| ->fieldCondition(field_video_link, 'entity_id', null, '<>') | |
| ->fieldCondition(field_blog_race, 'entity_id', $race) | |
| ->propertyOrderBy('created', 'DESC'); | |
| ->range(0, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Controler | |
| * @param $auction | |
| * @return mixed | |
| */ | |
| public function getHighestMailBidderAmount($auction) { | |
| return $auction->bids_mail[0]; | |
| } | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Pantheon Apache Solr settings. | |
| drush --strict=0 @blau.dev en pantheon_apachesolr -y | |
| drush --strict=0 @blau.dev vset pantheon_apachesolr_schema "profiles/blau/modules/contrib/apachesolr/solr-conf/solr-4.x/schema.xml" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function bootstrap_subtheme_preprocess_button(&$vars) { | |
| $vars['element']['#attributes']['class'][] = 'btn'; | |
| if (isset($vars['element']['#value'])) { | |
| if ($class = _bootstrap_colorize_button($vars['element']['#value'])) { | |
| $vars['element']['#attributes']['class'][] = $class; | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $query | |
| ->entityCondition('entity_type', 'node') | |
| ->range(0,1) | |
| ->propertyOrderBy('updated', DESC); | |
| $result = $query->execute(); | |
| if (empty($result['node'])) { | |
| return time("10.10.2014"); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Find the designer node. | |
| $conditions = array( | |
| 'title_field' => array('type' => 'field', 'value' => $row->designer_heb), | |
| ); | |
| if ($designer_nid = $this->createNode('designer', $conditions, $values)) { | |
| $wrapper->field_designer->set($designer_nid); | |
| } | |
OlderNewer