function getAsset($item)
{
    if ($item->node_data_field_image_field_image_fid) {
        $file = field_file_load($item->node_data_field_image_field_image_fid);
        $filepath = $file['filepath'];
        return '<img src="/' . $filepath . '" alt="' . $item->node_title . '" />';
    }
    return $item->node_title;
}
                   if(!empty($state_link)){
                       $country_dataset_count++;
                   }
               }*/
             if (!empty($state_data_links['url'])) {
                 $country_dataset_count++;
             }
         }
     }
 }
 global $base_url;
 //var_dump($base_url);die();
 $country_path = $drupal_base_path . $node_data->path;
 $country_title = trim($row->node_title);
 $country_union_name = trim($row->node_data_field_website_header_image_field_union_govt_name_value);
 $flag_image = field_file_load($row->node_data_field_website_header_image_field_website_header_image_fid);
 if (variable_get('file_downloads', '') == 2) {
     //$flag_img = explode('/', $flag_image['filepath']);
     $flag_img = substr($flag_image['filepath'], strpos($flag_image['filepath'], "files/"));
     $country_header_image = $base_url . "/system/" . $flag_img;
     //$country_header_image = $base_url."/system/files/".$flag_image['filename'];
 } else {
     $country_header_image = trim($drupal_base_path . $flag_image['filepath']);
 }
 //$country_dataset_count = trim($row->flexifield_items_node_data_field_state_data_node_data_field_state_dataset_count_field_state_dataset_count_value);
 if ($country_dataset_count > 0) {
     $country_dataset_count_html = '<div class="type">' . $country_dataset_count . '</div>';
 } else {
     $country_dataset_count_html = '';
 }
 print '<div class="item"><ul><li><img alt="' . $country_union_name . '" title="' . $country_union_name . '" src="' . $country_header_image . '" border="0" class="imgflag" width="38" height="24"/></li><li class="countryname"><a title="' . $country_title . '" href="' . $country_path . '">' . $country_title . '</a>' . $country_dataset_count_html . '</li></ul></div>';
<?php

global $theme_path;
if (count($view->result) > 0) {
    ?>
	<div class="rule"></div>
	<h3 class="img-content-list">In the Spotlight</h3>
	<ul id="img-content-list">
	<?php 
    $count = 1;
    foreach ($view->result as $item) {
        $file = field_file_load($item->node_data_field_image_field_image_fid);
        $filepath = $file['filepath'];
        ?>
		
			<li<?php 
        if ($count == 3) {
            ?>
 class="last"<?php 
        }
        ?>
>
			<?php 
        if ($item->node_data_field_url_field_url_value) {
            ?>
				<a href="<?php 
            echo $item->node_data_field_url_field_url_value;
            ?>
" class="header"><img src="/<?php 
            echo $filepath;
            ?>
                   if(!empty($state_link)){
                       $country_dataset_count++;
                   }
               }*/
             if (!empty($state_data_links['url'])) {
                 $country_dataset_count++;
             }
         }
     }
 }
 global $base_url;
 //var_dump($base_url);die();
 $country_path = $drupal_base_path . $node_data->path;
 $country_title = trim($row->node_title);
 $country_union_name = trim($row->node_data_field_website_header_image_field_union_govt_name_value);
 $flag_image = field_file_load($row->node_data_field_country_dataset_link_field_website_header_image_fid);
 if (variable_get('file_downloads', '') == 2) {
     //$flag_img = explode('/', $flag_image['filepath']);
     $flag_img = substr($flag_image['filepath'], strpos($flag_image['filepath'], "files/"));
     $country_header_image = $base_url . "/system/" . $flag_img;
     //$country_header_image = $base_url."/system/files/".$flag_image['filename'];
 } else {
     $country_header_image = trim($drupal_base_path . $flag_image['filepath']);
 }
 //$country_dataset_count = trim($row->flexifield_items_node_data_field_state_data_node_data_field_state_dataset_count_field_state_dataset_count_value);
 if ($country_dataset_count > 0) {
     $country_dataset_count_html = '<div class="type">' . $country_dataset_count . '</div>';
 } else {
     $country_dataset_count_html = '';
 }
 ?>
<div id="node-photo_gallery.tpl.php" class="node-photo_gallery.tpl.php">
    <div class="item node-photo_gallery.tpl.php-item">
		<?php 
foreach ($node->field_photo_gallery_images as $item) {
    ?>
			<?php 
    $file = field_file_load($item['fid']);
    $img = theme('imagecache', 'photo_gallery_thumb', $file['filepath']);
    ?>
		    <a class="node-photo_gallery.tpl.php-image-link" href="<?php 
    print base_path() . $item['filepath'];
    ?>
" rel="shadowbox" title="<?php 
    if (!empty($item['data']['description'])) {
        print 'DESCRIPTION: ' . $item['data']['description'];
    }
    if (!empty($item['data']['alt'])) {
        print '. ' . $item['data']['alt'];
    }
    ?>
"> 
		    	<?php 
    print $img;
    ?>
        
		    </a>    
		<?php 
}
?>
    </div>
</div>
Exemplo n.º 6
0
	
<?php 
} else {
    ?>
	<?php 
    if (count($view->result) > 0) {
        ?>
		<h3 class="img-content-list"><?php 
        echo $view->display['default']->display_options['title'];
        ?>
</h3>
		<ul id="media-content-list">
		<?php 
        $count = 1;
        foreach ($view->result as $item) {
            $file = field_file_load($item->node_data_field_thumbnail_field_thumbnail_fid);
            $filepath = $file['filepath'];
            ?>
				<li<?php 
            if ($count % 3 == 0) {
                ?>
 class="last"<?php 
            }
            ?>
>
					<a href="<?php 
            echo drupal_get_path_alias('node/' . $item->nid);
            ?>
?nid=<?php 
            echo $item->nid;
            ?>