Edit

Error message

  • Notice: Undefined offset: 37 in include() (line 133 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_table.tpl.php).
  • Notice: Trying to get property 'title' of non-object in include() (line 133 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_table.tpl.php).
  • Notice: Undefined variable: monthCounts in include() (line 12 of /homepages/21/d93015512/htdocs/library/organic_connectivity/date_overview.tpl.php).
  • Notice: Trying to access array offset on value of type null in include() (line 12 of /homepages/21/d93015512/htdocs/library/organic_connectivity/date_overview.tpl.php).
  • Notice: Undefined variable: monthCounts in include() (line 14 of /homepages/21/d93015512/htdocs/library/organic_connectivity/date_overview.tpl.php).
  • Warning: array_reverse() expects parameter 1 to be array, null given in include() (line 14 of /homepages/21/d93015512/htdocs/library/organic_connectivity/date_overview.tpl.php).
  • Warning: Invalid argument supplied for foreach() in include() (line 21 of /homepages/21/d93015512/htdocs/library/organic_connectivity/date_overview.tpl.php).
  • Notice: Undefined offset: 0 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 1 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 2 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 3 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 4 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 5 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 6 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 7 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 8 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 9 in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 42 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 0 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 1 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 2 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 3 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 4 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 5 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 6 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 7 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 8 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).
  • Notice: Undefined offset: 9 in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Notice: Trying to get property 'connections' of non-object in include() (line 150 of /homepages/21/d93015512/htdocs/library/organic_connectivity/items_map.tpl.php).
  • Warning: Invalid argument supplied for foreach() in search_for_attribute() (line 641 of /homepages/21/d93015512/htdocs/library/organic_connectivity/io.php).

Items

Items

112

Per Page

/ 12

Subject Attribute

Nodes Posts Things

Blocks

items_blocks.tpl.php

Nodes

items_nodes.tpl.php

  • Using jQuery flexslider with animated captions callback

    Context: 
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    jQuery(window).load(function(){
    
    
    
        jQuery('.flexslider').flexslider( {
    
            pauseOnHover: true,
            controlsContainer: ".flex-container",
        	slideshowSpeed: 8000,
    
            before: function(slider){
                var currentSlide = slider.slides.eq(slider.currentSlide);
                jQuery(currentSlide).find('.flex-caption').animate({'opacity':'0','right':'30px'},700);
            },
            after: function(slider){
                var currentSlide = slider.slides.eq(slider.currentSlide);
                jQuery(currentSlide).find('.flex-caption').animate({'opacity':'1','right':'0'},700);
            },
            start: function(slider){
                var currentSlide = slider.slides.eq(slider.currentSlide);
                jQuery(currentSlide).find('.flex-caption').animate({'opacity':'1','right':'0'},700);
            },
    
        } );
    
    
    
    } );
    .flex-container .flexslider ul.slides li a p.flex-caption{
        background-color: rgba(255,255,255,.9);
        color: rgba(55,55,55,.98);
        font-size: 20px;
        position: absolute;
        bottom: 0;
        right: 0;
        right: 30px;
        left: auto;
        z-index: 1;
        padding: 15px;
        width: 33.3%;
        font-style: italic;
        margin: 0;
        opacity: 0;
    }
  • Topics

    Context: 
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Attribute Type: 
    Types
    Images: 
  • MySQL

    Context: 
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    Weight: 
    45
    Attribute Type: 
    Topics
  • Removes fields pending for deletion to uninstall a stuck module

    Context: 
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    DELETE FROM `field_config` WHERE `field_config`.`deleted` = 1;
  • Reading/setting Drupal config variables

    Context: 
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    <?php
    function organic_context_config_page(){
        $form = array();
        $form['onthisdate_maxdisp'] = array(
            '#type' => 'textfield',
            '#title' => t('Maximum number of links'),
            '#default_value' => variable_get('onthisdate_maxdisp', 3),
            '#size' => 2,
            '#maxlength' => 2,
            '#description' => t("The maximum number of links to display in the block."),
            '#required' => TRUE,
        );
        return system_settings_form($form);
    }
    ?>
  • Migrates multigroups in D6 to field collections in D7

    Context: 
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    <?php
    
    /////////////////// PAGE DEFINITIONS ///////////////////
    
    
    function migrate_groups_menu(){
        $menu["migrate_groups"] = array(
            "title" => "Migrate grps",
            "description" => "....",
            "page callback" => "migrate_multigroup_to_collections",
            "access callback" => TRUE,
        );
        return $menu;
    }
    
    
    
    /*function migrate_multigroup_to_collections() {
      $content_type = 'thing';
      $collection_field = 'field_context';
      $multigroup_fields = array(
        'field_connection',
        'field_title_in_context',
      );
    
      // Get all the nodes that have value in the multigroup.
      $query = db_select('field_data_' . $multigroup_fields[0])
        ->condition('entity_type', 'node')
        ->condition('bundle', $content_type);
      $query->addExpression('DISTINCT entity_id', 'nid');
      $query->addExpression('revision_id', 'vid');
      $nodes_result = $query->execute();
    
      foreach ($nodes_result as $node) {
        // Construct the legacy multigroup for the node from the individual fields.
        $multigroup_data = array();
        foreach ($multigroup_fields as $field) {
          $field_result = db_select('field_data_' . $field, 'field')
            ->fields('field')
            ->condition('entity_type', 'node')
            ->condition('entity_id', $node->nid)
            ->execute();
    
          foreach ($field_result as $field_item) {
            $multigroup_data[$field_item->delta][$field] = $field_item;
          }
    
        }
    
        // Step through the reconstructed multigroups, which are collections from now.
        foreach ($multigroup_data as $delta => $data) {
          // Create entry in field_collection_item table.
          $id = db_insert('field_collection_item')
            ->fields(array('field_name' => $collection_field))
            ->execute();
    
          // Attach collection field data to the node.
          db_insert('field_data_' . $collection_field)
            ->fields(array(
              'entity_type' => 'node',
              'bundle' => $content_type,
              'entity_id' => $node->nid,
              'revision_id' => $node->vid,
              'language' => 'und',
              'delta' => $delta,
              $collection_field . '_value' => $id,
            ))
            ->execute();
    
          // Go through all the fields in the multigroup.
          foreach ($data as $multigroup_field => $field_data) {
            // Reassign the fields in the multigroup from the node to the collection field instance.
            db_update('field_data_' . $multigroup_field)
              ->fields(array(
                'entity_type' => 'field_collection_item',
                'bundle' => $collection_field,
                'entity_id' => $id,
                'revision_id' => $id,
                'delta' => 0,
              ))
              ->condition('entity_type', 'node')
              ->condition('entity_id', $node->nid)
              ->condition('delta', $delta)
              ->execute();
    
          }
        }
      }
      return "FINISHED";
    }*/
    
    
    
    function migrate_multigroup_to_collections($content_type='page',$collection_field='field_context',$multigroup_fields=array('field_connection','field_weight','field_notes')) {
    
      // Get all the nodes that have value in the multigroup.
      $query = db_select('field_data_' . $multigroup_fields[0])
        ->condition('entity_type', 'node')
        ->condition('bundle', $content_type);
      $query->addExpression('DISTINCT entity_id', 'nid');
      $query->addExpression('revision_id', 'vid');
      $nodes_result = $query->execute();
    
      foreach ($nodes_result as $node) {
        // Construct the legacy multigroup for the node from the individual fields.
        $multigroup_data = array();
        foreach ($multigroup_fields as $field) {
          $field_result = db_select('field_data_' . $field, 'field')
            ->fields('field')
            ->condition('entity_type', 'node')
            ->condition('entity_id', $node->nid)
            ->execute();
    
          foreach ($field_result as $field_item) {
            $multigroup_data[$field_item->delta][$field] = $field_item;
          }
    
        }
    
        $id = 0;
        // Step through the reconstructed multigroups, which are collections from now.
        foreach ($multigroup_data as $delta => $data) {
          // Create entry in field_collection_item table.
          $id = db_insert('field_collection_item')
            ->fields(array('field_name' => $collection_field, 'revision_id' => 0, 'archived' => 0))
            ->execute();
    
          $revid = db_insert('field_collection_item_revision')
            ->fields(array('item_id' => $id))
            ->execute();
    
          db_update('field_collection_item')
              ->fields(array('revision_id' => $revid))
              ->condition('item_id', $id)
              ->execute();
    
    
          // Attach collection field data to the node.
          db_insert('field_data_' . $collection_field)
            ->fields(array(
              'entity_type' => 'node',
              'bundle' => $content_type,
              'entity_id' => $node->nid,
              'revision_id' => $node->vid,
              'language' => 'und',
              'delta' => $delta,
              $collection_field . '_value' => $id,
              $collection_field . '_revision_id' => $revid,
            ))
            ->execute();
    
          // Attach collection field data to the node.
          db_insert('field_revision_' . $collection_field)
            ->fields(array(
              'entity_type' => 'node',
              'bundle' => $content_type,
              'entity_id' => $node->nid,
              'revision_id' => $node->vid,
              'language' => 'und',
              'delta' => $delta,
              $collection_field . '_value' => $id,
              $collection_field . '_revision_id' => $revid,
            ))
            ->execute();
    
          // Go through all the fields in the multigroup.
          foreach ($data as $multigroup_field => $field_data) {
            // Reassign the fields in the multigroup from the node to the collection field instance.
            db_update('field_data_' . $multigroup_field)
              ->fields(array(
                'entity_type' => 'field_collection_item',
                'bundle' => $collection_field,
                'entity_id' => $id,
                'language' => 'und',
                'revision_id' => $revid,
                'delta' => 0,
              ))
              ->condition('entity_type', 'node')
              ->condition('entity_id', $node->nid)
              ->condition('delta', $delta)
              ->execute();
    
           db_delete('field_revision_' . $multigroup_field)
              ->condition('entity_type', 'node')
              ->condition('entity_id', $node->nid)
            ->execute();
          $qry = "INSERT INTO field_revision_$multigroup_field SELECT * FROM field_data_$multigroup_field WHERE entity_id = $id AND entity_type = 'field_collection_item' AND bundle = '$collection_field'";
          db_query($qry);
    
          }
        }
      }
      return "DONE";
    }
    
    ?>
  • Google

    Context: 
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    Connection: 
    Attribute Type: 
    Types
  • Organic Connectivity Module

    Context: 
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Weight: 
    45
    Attribute Type: 
    Topics
    Connection: 
    Weight: 
    45
    Attribute Type: 
    Topics
    Connection: 
    Weight: 
    30
    Attribute Type: 
    Content Strategy
    Installation URL: 
    http://connectivity.orgnsm.org
    Images: 
  • Drupal DB Query to find Children (Recursively)

    Context: 
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    <?php
    function loadchildrens($context){
    	$sql_children = "SELECT node.nid AS nid,
       node.vid AS node_vid,
       node.title AS node_title
     FROM node node 
     LEFT JOIN content_field_connection node_data_field_connection ON node.vid = node_data_field_connection.vid
     WHERE (node.type in ('category')) AND (node_data_field_connection.field_connection_nid = ".$context.")
       ORDER BY node_title ASC";
    
    	$db_query_children = db_query( $sql_children );
    
    	while( $row = db_fetch_array($db_query_children) ){
    		$context_tree[ $row["nid"] ] = array();
    		if( $row["nid"] != "517" )
    			$context_tree[ $row["nid"] ] = loadchildrens( $row["nid"] );
    	}
    	return $context_tree;
    }
    ?>
    <?php
    
    $node = node_load(arg(1));
    
    $spheres_via_path = array();
    
    $sql_spheres_via_project = "SELECT node.title AS node_title, node.nid AS nid, node.type AS node_type
    FROM {node} node
    LEFT JOIN {field_data_field_project} field_data_field_project ON node.nid = field_data_field_project.entity_id
    WHERE (node.type in ('note')) AND (field_data_field_project.field_project_nid = '".arg(1)."')";
    
    $db_query_spheres_via_project = db_query( $sql_spheres_via_project );
    
    if( $db_query_spheres_via_project->rowCount() ){
    	$return = "<h3>Notes</h3>\n";
    	$return .= "<ul>\n";
    	foreach( $db_query_spheres_via_project as $sphere ){
    		if( isset($sphere->nid) ) $spheres_via_project[ $sphere->nid ] = $sphere;
    		$return .= "<li><a href=\"/node/".$sphere->nid."\">".$sphere->node_title."</a></li>\n";
    	}
    	$return .= "</ul>\n";
        return $return;
    }
    
    return '<div><strong>Associated Notes:</strong></div>';
    ?>
        // Obtain sphere nodes
        $query=new EntityFieldQuery();
        $query->entityCondition('entity_type','node')
              ->entityCondition('bundle','sphere');
        $sephiroths=$query->execute();
        if(array_key_exists('node',$sephiroths))
            $sephiroths=entity_load('node',array_keys($sephiroths['node']));
    
    
        // Obtain path nodes
        $query=new EntityFieldQuery();
        $query->entityCondition('entity_type','node')
              ->entityCondition('bundle','path');
        $paths=$query->execute();
        if(array_key_exists('node',$paths))
            $paths=entity_load('node',array_keys($paths['node']));
    
  • Similar by Taxonomy

    Context: 
    Connection: 
    Attribute Type: 
    Types
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    Connection: 
    Weight: 
    100
    Attribute Type: 
    Topics
    <ul class="item-list">
    <?php
    
    $terms_nood = taxonomy_node_get_terms_by_vocabulary($node,6);
    
    $terms = taxonomy_get_tree(6);
    
    foreach($terms as $term){
    
    	//$tagged = taxonomy_term_count_nodes($term->tid);
    
    	if( $term->name == arg(1) || array_key_exists( $term->tid,$terms_nood ) ){
    		echo("<li class=\"collapsed tag-category-".$popularityCategory."\">");
    		echo("<a href=\"/visual/".$term->name."\" class=\"active\">".$term->name."</a>");
    		echo("</li>\n");
    	}
    
    }
    
    ?>
    </ul>
    
    
    <?php
    if(arg(0)=='node'&&isset($node)){
        $vocabularies = taxonomy_get_vocabularies();
        foreach( $vocabularies as $vocabulary ){
            if( $vocabularies ){
                $terms = taxonomy_node_get_terms_by_vocabulary($node,$vocabulary->vid);
                if( $terms ){
                    echo('<div>');
                    $links = array();
                    echo('<h3>' . $vocabulary->name . '</h3>');
                    foreach( $terms as $term ){
                        $term_uri = taxonomy_term_uri($term);
                        $links[] = l($term->name,$term_uri['path'],array('rel'=>'tag','title'=>strip_tags($term->description)));
                    }
                    echo(implode(', ', $links));
                    echo('</div>');
                }
            }
        }
    }
    ?>
    
    
    <?php #if ($terms): ?>
    <?php
    $vocabularies = taxonomy_get_vocabularies();
    foreach( $vocabularies as $vocabulary ){
    	if( $vocabularies ){
    		$terms = taxonomy_node_get_terms_by_vocabulary($node, $vocabulary->vid);
    		if( $terms ){
    			echo("<div>\n");
    			$links = array();
    			echo( "<h3>" . $vocabulary->name . "</h3>\n" );
    			foreach( $terms as $term )
    				$links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => strip_tags($term->description)));
    			echo( implode(', ', $links) );
    			echo("</div>\n");
    		}
    	}
    }
    ?>

Table

items_table.tpl.php

ID Images/Body Types Title Subjects Attributes Edit
124 jQuery(window).load(function(){ jQuery('.flexslider').flexslider( { pauseOnHover: true, controlsContainer: ".flex-container", slideshowSpeed: 8000, before: function(slider){ var currentSlide = slider.slides.eq(slider.currentSlide); jQuery(currentSlide).find('.flex-caption').animate({'opacity':'0','right':'30px'},700); }, after: function(slider){ var currentSlide = slider.slides.eq(slider.currentSlide); jQuery(currentSlide).find('.fle Using jQuery flexslider with animated captions callback
EDIT
1 Topics
EDIT
122 MySQL
EDIT
121 DELETE FROM `field_config` WHERE `field_config`.`deleted` = 1;
Removes fields pending for deletion to uninstall a stuck module
EDIT
120 <?php function organic_context_config_page(){ $form = array(); $form['onthisdate_maxdisp'] = array( '#type' => 'textfield', '#title' => t('Maximum number of links'), '#default_value' => variable_get('onthisdate_maxdisp', 3), '#size' => 2, '#maxlength' => 2, '#description' => t("The maximum number of links to display in the block."), '#required' => TRUE, ); return system_settings_form($form); } ?> Reading/setting Drupal config variables
EDIT
119 <?php /////////////////// PAGE DEFINITIONS /////////////////// function migrate_groups_menu(){ $menu["migrate_groups"] = array( "title" => "Migrate grps", "description" => "....", "page callback" => "migrate_multigroup_to_collections", "access callback" => TRUE, ); return $menu; } /*function migrate_multigroup_to_collections() { $content_type = 'thing'; $collection_field = 'field_context'; $multigroup_fields = array( 'field_connection', 'field_title_ Migrates multigroups in D6 to field collections in D7
EDIT
116 Google
EDIT
115 Organic Connectivity Module
  • :112
EDIT
114 <?php function loadchildrens($context){ $sql_children = "SELECT node.nid AS nid, node.vid AS node_vid, node.title AS node_title FROM node node LEFT JOIN content_field_connection node_data_field_connection ON node.vid = node_data_field_connection.vid WHERE (node.type in ('category')) AND (node_data_field_connection.field_connection_nid = ".$context.") ORDER BY node_title ASC"; $db_query_children = db_query( $sql_children ); while( $row = db_fetch_array($db_query_children) ){ $context_tree[ $row["nid"] ] = array(); Drupal DB Query to find Children (Recursively)
EDIT
113 <ul class="item-list"> <?php $terms_nood = taxonomy_node_get_terms_by_vocabulary($node,6); $terms = taxonomy_get_tree(6); foreach($terms as $term){ //$tagged = taxonomy_term_count_nodes($term->tid); if( $term->name == arg(1) || array_key_exists( $term->tid,$terms_nood ) ){ echo("<li class=\"collapsed tag-category-".$popularityCategory."\">"); echo("<a href=\"/visual/".$term->name."\" class=\"active\">".$term->name."</a>"); echo("</li>\n"); } } ?> </ul> Similar by Taxonomy
EDIT

Rotator

items_cinema.tpl.php

Calendar

date_overview.tpl.php

Start date

  • After Christ (Era Vulgaris)
  • New Aeon
Total Items

RSS

items_syndicate.tpl.php




    

        Organic Interfaces

        http://interfaces.orgnsm.org/syndicate

        Recent Web Design & Info Code

        en

        Thu, 04 Sep 2014 17:45:54 -1000

        


 Using jQuery flexslider with animated captions callback
 http://interfaces.orgnsm.org/node/124
 jQuery(window).load(function(){



    jQuery('.flexslider').flexslider( {

        pauseOnHover: true,
        controlsContainer: ".flex-container",
    	slideshowSpeed: 8000,

        before: function(slider){
            var currentSlide = slider.slides.eq(slider.currentSlide);
            jQuery(currentSlide).find('.flex-caption').animate({'opacity':'0','right':'30px'},700);
        },
        after: function(slider){
            var currentSlide = slider.slides.eq(slider.currentSlide);
            jQuery(currentSlide).find('.flex-caption').animate({'opacity':'1','right':'0'},700);
        },
        start: function(slider){
            var currentSlide = slider.slides.eq(slider.currentSlide);
            jQuery(currentSlide).find('.flex-caption').animate({'opacity':'1','right':'0'},700);
        },

    } );



} );
.flex-container .flexslider ul.slides li a p.flex-caption{
    background-color: rgba(255,255,255,.9);
    color: rgba(55,55,55,.98);
    font-size: 20px;
    position: absolute;
    bottom: 0;
    right: 0;
    right: 30px;
    left: auto;
    z-index: 1;
    padding: 15px;
    width: 33.3%;
    font-style: italic;
    margin: 0;
    opacity: 0;
}
]]> 124 Thu, 04 Sep 2014 17:45:54 -1000 Topics http://interfaces.orgnsm.org/node/1 ]]> 1 Thu, 17 Jul 2014 01:42:57 -1000 http://interfaces.orgnsm.org/sites/interfaces.orgnsm.org/files/styles/large-landscape-or-portrait/public/Mind_Map_Template_Mulit_Rounded.jpg?itok=A9z-BipE MySQL http://interfaces.orgnsm.org/node/122 122 Sun, 13 Jul 2014 19:38:09 -1000 Removes fields pending for deletion to uninstall a stuck module http://interfaces.orgnsm.org/node/121 DELETE FROM `field_config` WHERE `field_config`.`deleted` = 1; ]]> 121 Sun, 13 Jul 2014 19:37:35 -1000 Reading/setting Drupal config variables http://interfaces.orgnsm.org/node/120 <?php function organic_context_config_page(){ $form = array(); $form['onthisdate_maxdisp'] = array( '#type' => 'textfield', '#title' => t('Maximum number of links'), '#default_value' => variable_get('onthisdate_maxdisp', 3), '#size' => 2, '#maxlength' => 2, '#description' => t("The maximum number of links to display in the block."), '#required' => TRUE, ); return system_settings_form($form); } ?> ]]> 120 Sun, 13 Jul 2014 19:23:23 -1000 Migrates multigroups in D6 to field collections in D7 http://interfaces.orgnsm.org/node/119 <?php /////////////////// PAGE DEFINITIONS /////////////////// function migrate_groups_menu(){ $menu["migrate_groups"] = array( "title" => "Migrate grps", "description" => "....", "page callback" => "migrate_multigroup_to_collections", "access callback" => TRUE, ); return $menu; } /*function migrate_multigroup_to_collections() { $content_type = 'thing'; $collection_field = 'field_context'; $multigroup_fields = array( 'field_connection', 'field_title_in_context', ); // Get all the nodes that have value in the multigroup. $query = db_select('field_data_' . $multigroup_fields[0]) ->condition('entity_type', 'node') ->condition('bundle', $content_type); $query->addExpression('DISTINCT entity_id', 'nid'); $query->addExpression('revision_id', 'vid'); $nodes_result = $query->execute(); foreach ($nodes_result as $node) { // Construct the legacy multigroup for the node from the individual fields. $multigroup_data = array(); foreach ($multigroup_fields as $field) { $field_result = db_select('field_data_' . $field, 'field') ->fields('field') ->condition('entity_type', 'node') ->condition('entity_id', $node->nid) ->execute(); foreach ($field_result as $field_item) { $multigroup_data[$field_item->delta][$field] = $field_item; } } // Step through the reconstructed multigroups, which are collections from now. foreach ($multigroup_data as $delta => $data) { // Create entry in field_collection_item table. $id = db_insert('field_collection_item') ->fields(array('field_name' => $collection_field)) ->execute(); // Attach collection field data to the node. db_insert('field_data_' . $collection_field) ->fields(array( 'entity_type' => 'node', 'bundle' => $content_type, 'entity_id' => $node->nid, 'revision_id' => $node->vid, 'language' => 'und', 'delta' => $delta, $collection_field . '_value' => $id, )) ->execute(); // Go through all the fields in the multigroup. foreach ($data as $multigroup_field => $field_data) { // Reassign the fields in the multigroup from the node to the collection field instance. db_update('field_data_' . $multigroup_field) ->fields(array( 'entity_type' => 'field_collection_item', 'bundle' => $collection_field, 'entity_id' => $id, 'revision_id' => $id, 'delta' => 0, )) ->condition('entity_type', 'node') ->condition('entity_id', $node->nid) ->condition('delta', $delta) ->execute(); } } } return "FINISHED"; }*/ function migrate_multigroup_to_collections($content_type='page',$collection_field='field_context',$multigroup_fields=array('field_connection','field_weight','field_notes')) { // Get all the nodes that have value in the multigroup. $query = db_select('field_data_' . $multigroup_fields[0]) ->condition('entity_type', 'node') ->condition('bundle', $content_type); $query->addExpression('DISTINCT entity_id', 'nid'); $query->addExpression('revision_id', 'vid'); $nodes_result = $query->execute(); foreach ($nodes_result as $node) { // Construct the legacy multigroup for the node from the individual fields. $multigroup_data = array(); foreach ($multigroup_fields as $field) { $field_result = db_select('field_data_' . $field, 'field') ->fields('field') ->condition('entity_type', 'node') ->condition('entity_id', $node->nid) ->execute(); foreach ($field_result as $field_item) { $multigroup_data[$field_item->delta][$field] = $field_item; } } $id = 0; // Step through the reconstructed multigroups, which are collections from now. foreach ($multigroup_data as $delta => $data) { // Create entry in field_collection_item table. $id = db_insert('field_collection_item') ->fields(array('field_name' => $collection_field, 'revision_id' => 0, 'archived' => 0)) ->execute(); $revid = db_insert('field_collection_item_revision') ->fields(array('item_id' => $id)) ->execute(); db_update('field_collection_item') ->fields(array('revision_id' => $revid)) ->condition('item_id', $id) ->execute(); // Attach collection field data to the node. db_insert('field_data_' . $collection_field) ->fields(array( 'entity_type' => 'node', 'bundle' => $content_type, 'entity_id' => $node->nid, 'revision_id' => $node->vid, 'language' => 'und', 'delta' => $delta, $collection_field . '_value' => $id, $collection_field . '_revision_id' => $revid, )) ->execute(); // Attach collection field data to the node. db_insert('field_revision_' . $collection_field) ->fields(array( 'entity_type' => 'node', 'bundle' => $content_type, 'entity_id' => $node->nid, 'revision_id' => $node->vid, 'language' => 'und', 'delta' => $delta, $collection_field . '_value' => $id, $collection_field . '_revision_id' => $revid, )) ->execute(); // Go through all the fields in the multigroup. foreach ($data as $multigroup_field => $field_data) { // Reassign the fields in the multigroup from the node to the collection field instance. db_update('field_data_' . $multigroup_field) ->fields(array( 'entity_type' => 'field_collection_item', 'bundle' => $collection_field, 'entity_id' => $id, 'language' => 'und', 'revision_id' => $revid, 'delta' => 0, )) ->condition('entity_type', 'node') ->condition('entity_id', $node->nid) ->condition('delta', $delta) ->execute(); db_delete('field_revision_' . $multigroup_field) ->condition('entity_type', 'node') ->condition('entity_id', $node->nid) ->execute(); $qry = "INSERT INTO field_revision_$multigroup_field SELECT * FROM field_data_$multigroup_field WHERE entity_id = $id AND entity_type = 'field_collection_item' AND bundle = '$collection_field'"; db_query($qry); } } } return "DONE"; } ?> ]]> 119 Wed, 09 Jul 2014 00:20:20 -1000 Google http://interfaces.orgnsm.org/node/116 116 Mon, 12 May 2014 20:57:24 -1000 Organic Connectivity Module http://interfaces.orgnsm.org/node/115 ]]> 115 Mon, 12 May 2014 20:44:44 -1000 http://interfaces.orgnsm.org/sites/interfaces.orgnsm.org/files/styles/large-landscape-or-portrait/public/organic_gallery_viewer_icons.png?itok=iOeTFnuv Drupal DB Query to find Children (Recursively) http://interfaces.orgnsm.org/node/114 <?php function loadchildrens($context){ $sql_children = "SELECT node.nid AS nid, node.vid AS node_vid, node.title AS node_title FROM node node LEFT JOIN content_field_connection node_data_field_connection ON node.vid = node_data_field_connection.vid WHERE (node.type in ('category')) AND (node_data_field_connection.field_connection_nid = ".$context.") ORDER BY node_title ASC"; $db_query_children = db_query( $sql_children ); while( $row = db_fetch_array($db_query_children) ){ $context_tree[ $row["nid"] ] = array(); if( $row["nid"] != "517" ) $context_tree[ $row["nid"] ] = loadchildrens( $row["nid"] ); } return $context_tree; } ?>
<?php

$node = node_load(arg(1));

$spheres_via_path = array();

$sql_spheres_via_project = "SELECT node.title AS node_title, node.nid AS nid, node.type AS node_type
FROM {node} node
LEFT JOIN {field_data_field_project} field_data_field_project ON node.nid = field_data_field_project.entity_id
WHERE (node.type in ('note')) AND (field_data_field_project.field_project_nid = '".arg(1)."')";

$db_query_spheres_via_project = db_query( $sql_spheres_via_project );

if( $db_query_spheres_via_project->rowCount() ){
	$return = "<h3>Notes</h3>\n";
	$return .= "<ul>\n";
	foreach( $db_query_spheres_via_project as $sphere ){
		if( isset($sphere->nid) ) $spheres_via_project[ $sphere->nid ] = $sphere;
		$return .= "<li><a href=\"/node/".$sphere->nid."\">".$sphere->node_title."</a></li>\n";
	}
	$return .= "</ul>\n";
    return $return;
}

return '<div><strong>Associated Notes:</strong></div>';
?>
    // Obtain sphere nodes
    $query=new EntityFieldQuery();
    $query->entityCondition('entity_type','node')
          ->entityCondition('bundle','sphere');
    $sephiroths=$query->execute();
    if(array_key_exists('node',$sephiroths))
        $sephiroths=entity_load('node',array_keys($sephiroths['node']));


    // Obtain path nodes
    $query=new EntityFieldQuery();
    $query->entityCondition('entity_type','node')
          ->entityCondition('bundle','path');
    $paths=$query->execute();
    if(array_key_exists('node',$paths))
        $paths=entity_load('node',array_keys($paths['node']));
]]>
114 Fri, 09 May 2014 01:21:13 -1000
Similar by Taxonomy http://interfaces.orgnsm.org/node/113 <ul class="item-list"> <?php $terms_nood = taxonomy_node_get_terms_by_vocabulary($node,6); $terms = taxonomy_get_tree(6); foreach($terms as $term){ //$tagged = taxonomy_term_count_nodes($term->tid); if( $term->name == arg(1) || array_key_exists( $term->tid,$terms_nood ) ){ echo("<li class=\"collapsed tag-category-".$popularityCategory."\">"); echo("<a href=\"/visual/".$term->name."\" class=\"active\">".$term->name."</a>"); echo("</li>\n"); } } ?> </ul> <?php if(arg(0)=='node'&&isset($node)){ $vocabularies = taxonomy_get_vocabularies(); foreach( $vocabularies as $vocabulary ){ if( $vocabularies ){ $terms = taxonomy_node_get_terms_by_vocabulary($node,$vocabulary->vid); if( $terms ){ echo('<div>'); $links = array(); echo('<h3>' . $vocabulary->name . '</h3>'); foreach( $terms as $term ){ $term_uri = taxonomy_term_uri($term); $links[] = l($term->name,$term_uri['path'],array('rel'=>'tag','title'=>strip_tags($term->description))); } echo(implode(', ', $links)); echo('</div>'); } } } } ?> <?php #if ($terms): ?> <?php $vocabularies = taxonomy_get_vocabularies(); foreach( $vocabularies as $vocabulary ){ if( $vocabularies ){ $terms = taxonomy_node_get_terms_by_vocabulary($node, $vocabulary->vid); if( $terms ){ echo("<div>\n"); $links = array(); echo( "<h3>" . $vocabulary->name . "</h3>\n" ); foreach( $terms as $term ) $links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => strip_tags($term->description))); echo( implode(', ', $links) ); echo("</div>\n"); } } } ?> ]]> 113 Mon, 28 Apr 2014 21:00:56 -1000

Global

items_map.tpl.php