/**
  * Build the search row description.
  *
  * If there is a "result_description", run it thro token_replace.
  *
  * @param object $data
  *   An entity object that will be used in the token_place function.
  *
  * @see token_replace()
  */
 function buildDescription($data)
 {
     $description_array = array();
     //Get image info.
     $imageinfo = image_get_info($data->uri);
     if ($this->conf['image_extra_info']['thumbnail']) {
         $image = $imageinfo ? theme_image_style(array('width' => $imageinfo['width'], 'height' => $imageinfo['height'], 'style_name' => 'linkit_thumb', 'path' => $data->uri)) : '';
     }
     if ($this->conf['image_extra_info']['dimensions'] && !empty($imageinfo)) {
         $description_array[] = $imageinfo['width'] . 'x' . $imageinfo['height'] . 'px';
     }
     $description_array[] = parent::buildDescription($data);
     if ($this->conf['show_scheme']) {
         $description_array[] = file_uri_scheme($data->uri) . '://';
     }
     $description = (isset($image) ? $image : '') . implode('<br />', $description_array);
     return $description;
 }
<?php

$name = $fields['name']->content;
$job = $fields['field_job_position']->content;
$email = $fields['mail']->content;
$colour = $fields['field_colour']->content;
$uri = $fields['uri'];
$imageinfo = image_get_info($uri->raw);
$variables = array('style_name' => 'our_people', 'path' => $uri->raw, 'width' => $imageinfo['width'], 'height' => $imageinfo['height'], 'alt' => strip_tags($name));
$photo = theme_image_style($variables);
?>
<div class="teamBlock column <?php 
print $zebra;
?>
">
      <div class="teamImage" style="background-color:<?php 
print $colour;
?>
"><?php 
print $photo;
?>
        <div class="teamName">
        	<h2><?php 
print $name;
?>
</h2>
		    <h3><?php 
print $job;
?>
</h3>
		    <ul class="socialLinksTeam">
Ejemplo n.º 3
0
function nestor_image_style($variables)
{
    $resp_full_image_styles = array("blog_lg", "blog_sm", "portfolio_lg", "portfolio_sm", "image_full_width");
    $resp_image_styles = array("image_responsive", "user_picture");
    if (in_array($variables['style_name'], $resp_full_image_styles)) {
        $variables['attributes']['class'][] = 'img-responsive';
        $variables['attributes']['class'][] = 'img-full-width';
    }
    if (in_array($variables['style_name'], $resp_image_styles)) {
        $variables['attributes']['class'][] = 'img-responsive';
    }
    return theme_image_style($variables);
}
if ($rows) {
    ?>
    <div class="view-content">


        <div class="widget kopa-article-list-widget article-list-9">
            <ul class="clearfix">
                <?php 
    foreach ($results as $article) {
        ?>
                    <?php 
        $thumbnail_uri = $article->field_field_image[0]['rendered']['#item']['uri'];
        $image = '';
        if ($thumbnail_uri) {
            $variable = array('style_name' => 'content_carrousel_thumb', 'path' => $thumbnail_uri, 'width' => '', 'height' => '');
            $image = theme_image_style($variable);
        }
        ?>
                <li>
                    <article class="entry-item">
                        <div class="entry-thumb">
                            <a href="<?php 
        echo drupal_get_path_alias("node/" . $article->nid);
        ?>
"><?php 
        echo !empty($image) ? $image : '';
        ?>
</a>
                        </div>
                        <h4 class="entry-title">
                            <a itemprop="name" href="<?php 
                <ul class="team-masonry row clearfix" style="position: relative; height: 120px;">
                    <?php 
        foreach ($players as $player) {
            ?>
                        <li class="t-item col-md-6 col-sm-6 col-xs-6" style="position: absolute; left: 0px; top: 0px;">
                            <article class="entry-item">
                                <div class="entry-thumb">
                                    <a href="/<?php 
            echo drupal_get_path_alias('node/' . $player->nid);
            ?>
">
                                    <?php 
            if (!is_null($player->image)) {
                ?>
                                        <?php 
                echo theme_image_style(array('style_name' => 'squad_player', 'path' => $player->image, 'width' => '', 'height' => ''));
                ?>
                                    <?php 
            } else {
                ?>
                                        <img src="/<?php 
                echo $theme_path;
                ?>
/images/default_player_profile_small.png" width="190px" height="146px">
                                    <?php 
            }
            ?>
                                    </a>
                                    <div class="thumb-icon style3"><?php 
            echo $player->number;
            ?>
Ejemplo n.º 6
0
<?php

global $user;
if ($user->uid) {
    ?>
	<div class="log-w">
		<div class="pic-ct">
			<?php 
    if (isset($variables['user']->picture->uri)) {
        print theme_image_style(array('style_name' => 'thumbnail', 'path' => $variables['user']->picture->uri, 'attributes' => array('class' => 'avatar'), 'width' => NULL, 'height' => NULL, 'alt' => "img-" . $variables['user']->name));
    } else {
        ?>
	            	<img class="avatar" typeof="foaf:Image" src="<?php 
        print variable_get('user_picture_default');
        ?>
" alt="default-img">
	            <?php 
    }
    ?>
		</div>
		<div class="txt-ct">
			<div class="tit-log">Bienvenido
			</div>
			<div class="name-t">
				<?php 
    print $variables['user']->name;
    ?>
			</div>
		</div>
	</div>
<?php 
Ejemplo n.º 7
0
<div class="fotorama"
     data-width='100%'
     data-fit='contain'
     data-height="439"
     data-autoplay="true">

    <?php 
foreach ($node->field_title_image['und'] as $key => $value) {
    ?>
        <div id="image_slider">

            <?php 
    print theme_image_style(array('style_name' => 'photo_slider', 'path' => $node->field_image_gallery_['und'][$key]['uri'], 'alt' => $node->field_image_gallery_['und'][$key]['alt'], 'title' => $node->field_image_gallery_['und'][$key]['title'], 'width' => NULL, 'height' => NULL));
    ?>

            <?php 
    if (isset($node->field_title_image['und'][$key]['value'])) {
        ?>
                <div class="flexlider_background">

                    <div id="title_slider"> <?php 
        print $node->field_title_image['und'][$key]['value'];
        ?>
 </div>
                    <div id="text_slider"> <?php 
        print $node->field_image_text['und'][$key]['value'];
        ?>
 </div>

                </div>
            <?php 
<div class="media authorname">
    <?php 
if ($author->picture) {
    ?>
    <div class="pull-left">
        <?php 
    echo theme_image_style(array('style_name' => 'thumbnail', 'height' => '100', 'width' => '100', 'path' => $author->picture->uri, 'alt' => $author->name));
    ?>
    </div>
            <?php 
}
?>
    <div class="media-body">
        <h4 class="media-heading">
            <small>Written by</small><span itemprop="author" itemscope="" itemtype="http://schema.org/Person">
                <span itemprop="name">
                    <?php 
echo $author->name;
?>
                </span>
            </span>
            <time class="<?php 
echo $dateClass;
?>
" itemprop="datePublished">
                <span class="c-date_day"><?php 
echo date('j', $date);
?>
</span>
                <span class="c-date_month"><?php 
echo date('M', $date);
Ejemplo n.º 9
0
/**
 * Override or insert variables into the node template.
 */
function intranet_preprocess_node(&$variables)
{
    $node = $variables['node'];
    $field_items = field_get_items('node', $node, 'field_linktype');
    $link_type = $field_items[0]['value'];
    if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
        $variables['classes_array'][] = 'node-full';
    }
    if ($variables['type'] == 'cluster_of_links' && $link_type == 'All Applications') {
        $content_array = $variables['field_link_details'];
        $field_items1 = field_get_items('node', $node, 'field_link_details');
        foreach ($field_items1 as $key => $value) {
            $multifield = _multifield_field_item_to_entity('field_link_details', $value);
            $subfield_link = field_get_items('multifield', $multifield, 'field_link');
            $subfield_icon = field_get_items('multifield', $multifield, 'field_clustor_link_icon');
            $link_url = $subfield_link[0]['display_url'];
            $link_title = $subfield_link[0]['title'];
            $img_path = $subfield_icon[0]['uri'];
            $image = array('style_name' => 'all_application', 'path' => $img_path, 'alt' => '', 'title' => '');
            // link elements
            $text = theme('image_style', $image);
            // in your case it's an image
            $path = $link_url;
            $options = array('attributes' => array('target' => '_blank'), 'html' => true);
            $items[] = array('data' => l($text, $path, $options), 'id' => 'all_app_list_' . $key);
        }
        $attributes = array('id' => 'all-app-list');
        $links_html = theme_item_list(array('items' => $items, 'type' => 'ul', 'title' => '', 'attributes' => $attributes));
        $variables['all_applications_record'] = $links_html;
        $variables['theme_hook_suggestions'][] = 'node__teaser_all_app';
    }
    if ($variables['type'] == 'cluster_of_links' && $link_type == 'Quick Links' && ($variables['view_mode'] == 'teaser' || $variables['view_mode'] == 'full')) {
        $variables['theme_hook_suggestions'][] = 'node__teaser_quick_links';
    }
    if ($variables['type'] == 'cxo_messages' && $variables['view_mode'] == 'full') {
        $user = user_load($variables['user']->uid);
        if ($user->picture) {
            $variables['user_picture'] = theme_image_style(array('style_name' => 'cxo-message-user', 'path' => $user->picture->uri, 'attributes' => array('class' => 'avatar'), 'width' => "170", 'height' => "180"));
        } else {
            $variables['user_picture'] = theme_image_style(array('style_name' => 'cxo-message-user', 'path' => 'public://detail-user.png', 'attributes' => array('class' => 'avatar'), 'width' => "170", 'height' => "180"));
        }
        $variables['date'] = date("M j, Y", strtotime($variables['date']));
        $variables['submitted'] = t('!username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['date']));
    }
    //Applying cxo style to user image on award detail page for consistency.
    if ($variables['type'] == 'award' && $variables['view_mode'] == 'full') {
        if ($variables['field_user_identity'][0]['entity']->picture) {
            $variables['user_picture'] = theme_image_style(array('style_name' => 'cxo-message-user', 'path' => $variables['field_user_identity'][0]['entity']->picture->uri, 'attributes' => array('class' => 'avatar'), 'width' => "170", 'height' => "180"));
        } else {
            $variables['user_picture'] = theme_image_style(array('style_name' => 'cxo-message-user', 'path' => 'public://detail-user.png', 'attributes' => array('class' => 'avatar'), 'width' => "170", 'height' => "180"));
        }
    }
    if ($variables['type'] == 'units' && $variables['view_mode'] == 'full') {
        $variables['theme_hook_suggestions'][] = 'node__units';
    }
}
Ejemplo n.º 10
0
function viewAllNotifications()
{
    global $user;
    $UID = $user->uid;
    // create page header, table, and dismiss all notifications button
    $timezone = $user->timezone;
    $notifications = dbGetNotificationsForUser($user->uid);
    $markup = '<table><tr><td style="text-align:left"><h1><b>View All Notifications</b></h1></td>';
    $markup .= '<td style="text-align:right"><a href="?q=dismissAllNotifications"><button>';
    $markup .= 'Dismiss All</button></a></td></tr></table>';
    // if user has no notifications
    if (empty($notifications)) {
        $markup .= '<table class="infoTable"><th></th><tr><td style="text-align:center" colspan="10"><em>No New Notifications!</em></td></tr></table>';
        $_SESSION['notificationNIDsShown'] = array();
    } else {
        // if user has notifications
        $markup .= '<table class="infoTable"><tr><th>Associated Picture</th><th>Notification Content</th><th></th></tr>';
        foreach ($notifications as $notification) {
            // used to prevent lack of page refresh issues
            $_SESSION['notificationNIDsShown'][] = $notification['NID'];
            $rawDate = $notification['dateTargeted'];
            $rawDate = dbDateSQL2PHP($rawDate);
            $date = date(TIME_FORMAT, $rawDate);
            $markup .= "<tr><td>";
            // generates picture for notification
            if (!empty($notification['FID'])) {
                $FID = $notification['FID'];
                $file = file_load($FID);
                $uri = $file->uri;
                $variables = array('style_name' => 'all_notifications', 'path' => $uri, 'width' => '150', 'height' => '150');
                $image = theme_image_style($variables);
                $markup .= $image;
            }
            $markup .= '</td><td style="width:50% . "text-align:center">';
            $markup .= '<br><b>' . $date . "</b><br>";
            $markup .= '<i>' . $notification['message'] . "</i><br><br></td>";
            $markup .= '<td>';
            // buttons for viewing or dismissing a notification
            if ($notification['bttnLink'] != null && $notification['bttnTitle'] != null) {
                $markup .= "<a href=\"{$notification['bttnLink']}\">";
                $markup .= '<button type="button">' . $notification['bttnTitle'] . '</button>';
            }
            $markup .= '<a href="?q=dismissNotification/' . $notification['NID'] . '&allnote">';
            $markup .= '<button type="button"><img class="trashIcon" src="/images/icons/trashWhite.png"></button></a>' . '&nbsp' . '&nbsp';
            $markup .= '</td></tr>';
        }
        $markup .= '</td></tr></table>';
    }
    $retArray = array();
    $retArray['#markup'] = $markup;
    return $retArray;
}
<div class="o-media authorname">
    <?php 
if ($author->picture) {
    ?>
    <div class="o-media_left">
        <?php 
    echo theme_image_style(array('style_name' => 'thumbnail', 'height' => '100', 'width' => '100', 'path' => $author->picture->uri, 'alt' => $author->name, 'attributes' => array('class' => 'circle')));
    ?>
    </div>
            <?php 
}
?>
    <div class="o-media_body">
        <?php 
if ($author && $author->name != '') {
    ?>
        <h4 class="c-title c-title-small">
            <small>Written by</small><span itemprop="author" itemscope="" itemtype="http://schema.org/Person">
                <span itemprop="name">
                    <?php 
    echo $author->name;
    ?>
                </span>
            </span>
            <time class="<?php 
    echo $dateClass;
    ?>
" itemprop="datePublished">
                <span class="c-date_day"><?php 
    echo date('j', $date);
    ?>
Ejemplo n.º 12
0
/**
 * @param $style
 * @param $imageEntity
 * @return string
 */
function footmali_output_image($style, $imageEntity)
{
    $variable = array('style_name' => $style, 'path' => $imageEntity[LANGUAGE_NONE][0]['uri'], 'width' => $imageEntity[LANGUAGE_NONE][0]['width'], 'height' => $imageEntity[LANGUAGE_NONE][0]['height']);
    return theme_image_style($variable);
}
?>

<?php 
global $theme_path;
$position = taxonomy_term_load($field_position[0]['tid']);
$height = '';
if (!empty($field_height[0]['value'])) {
    $formatted_number = number_format($field_height[0]['value'], 2);
    $height = explode('.', $formatted_number);
    $height = $height[0] . 'm ' . $height[1];
}
$player_squad = footmali_get_player_squad($nid);
$default_player_profile = '/' . $theme_path . '/images/default_player_profile.png';
$player_profile = '<img src="' . $default_player_profile . '" width="300px" height="350px">';
if (count($field_image) > 0) {
    $player_profile = theme_image_style(array('style_name' => 'player', 'path' => $field_image[0]['uri'], 'width' => '', 'height' => ''));
}
?>
<h1><?php 
echo $title;
?>
</h1>
<div class="row">
    <div id="player-image" class="col-md-6 col-sm-6 col-xs-12">
        <?php 
echo $player_profile;
?>
    </div>
    <div id="player-profile" class="col-md-6 col-sm-6 col-xs-12">
        <div class="player-profile" style="width: 100%">
            <h3><?php 
Ejemplo n.º 14
0
 *
 * @ingroup themeable
 */
?>
<li class="<?php 
print $classes;
?>
"<?php 
print $attributes;
?>
>
<?php 
if ($node->type == "product") {
    ?>
  <span class="search-image"><?php 
    print theme_image_style(array('path' => $node->field_blog_thumbnail['und']['0']['uri'], 'style_name' => 'thumbnail'));
    ?>
</span>
<?php 
}
if (isset($content) && isset($content['field_products:product:field_normal_price'])) {
    print $content['field_products:product:field_normal_price'][0]['#markup'];
}
?>
  <?php 
print render($title_prefix);
?>
  <h3 class="title"<?php 
print $title_attributes;
?>
>
Ejemplo n.º 15
0
<?php

if (isset($node->field_image_header['und'][0]['uri'])) {
    ?>
    <div id="content_header">
        <div id="image_header"><?php 
    print theme_image_style(array('style_name' => 'image_header', 'path' => $node->field_image_header['und'][0]['uri'], 'width' => NULL, 'height' => NULL, 'alt' => $node->field_image_header['und'][0]['alt'], 'title' => $node->field_image_header['und'][0]['title'], 'attributes' => array('class' => 'img-responsive')));
    ?>
</div>
        <div id="title_header"><?php 
    print $node->title;
    ?>
</div>
    </div>
<?php 
} else {
    ?>
    <div class="title_blue_one"><?php 
    print $node->title;
    ?>
</div>
<?php 
}
Ejemplo n.º 16
0
function teamSummary($form, &$form_state)
{
    global $user;
    $UID = $user->uid;
    $team = getCurrentTeam();
    $teams = dbGetTeamsForUser($UID);
    $form = array();
    if (isset($params["UID"])) {
        $UID = $params["UID"];
    } else {
        $UID = $user->uid;
    }
    if (isset($params['TID'])) {
        $TID = $params['TID'];
        $team = dbGetTeam($TID);
        $teamNumber = $team['number'];
    } else {
        $team = getCurrentTeam();
        $TID = $team['TID'];
        $team = dbGetTeam($TID);
        $teamNumber = $team['number'];
    }
    // if team is not empty
    if (!empty($teams)) {
        $TID = $team['TID'];
        if (count($teams) != 1) {
            // if user has multiple teams then able to change team
            $multiple = true;
            $choices = array();
        } else {
            // if user has one team then display team number
            $multiple = false;
        }
        foreach ($teams as $userTeam) {
            $choices[$userTeam['TID']] = $userTeam['number'];
        }
        $markup = '<table id="teamPageSummary" style="margin:112px 0px 0px 0px; padding:0px"><tr style="text-align:center"><td ';
        if (!$multiple) {
            $markup .= 'colspan="2" style="text-align:center;';
        } else {
            $markup .= 'style="text-align:right;';
        }
        $markup .= ' width:50%; padding:0px"><h2>' . $team['type'] . ' ';
        $form['fields']['header'] = array('#markup' => $markup);
        if ($multiple) {
            $form['fields']['team'] = array('#prefix' => '</h2></td><td style="width:50%;padding:0px">', '#type' => 'select', '#default_value' => $TID, '#options' => $choices, '#chosen' => true, '#attributes' => array('onChange' => 'document.getElementById("teamsummary").submit();'), '#suffix' => '</td></tr>');
        } else {
            $form['fields']['team'] = array('#markup' => $team['number'] . '</h2></td></tr>');
        }
        if (!empty($team['FID'])) {
            $FID = $team['FID'];
            $file = file_load($FID);
            $uri = $file->uri;
            $variables = array('style_name' => 'profile', 'path' => $uri, 'width' => '150', 'height' => '150');
            $image = theme_image_style($variables);
            $form['fields']['FID'] = array('#prefix' => '<tr><td colspan="2" style="text-align:center">', '#type' => 'item', '#markup' => $image, '#suffix' => '</td></tr>');
        } else {
            // if team does not have a picture, then displays default pic
            $form['fields']['FID'] = array('#prefix' => '<tr><td colspan="2" style="text-align:center">', '#markup' => '<img src="/images/defaultPics/team.png" style="max-width:200px; width:auto; height:auto; padding: 15px 0px 15px 0px">', '#suffix' => '</td></tr>');
        }
        $form['fields']['markupOne'] = array('#markup' => '<tr><td style="text-align:left"><a href="?q=viewTeam&TID=' . $TID . '"><div class="help tooltip4"><button type="button">Team Info</button><span id="helptext"; class="helptext tooltiptext4">Click here to view/edit your team info or to enter old team hours.</span></div></a></td>');
        if (hasPermissionForTeam('manageOutreachTags', $TID)) {
            $form['fields']['markupTwo'] = array('#markup' => '<td colspan="2" style="text-align:right"><a href="?q=teamOutreachSettings"><div class="help tooltip3"><button type="button">Settings</button><span id="helptext"; class="helptext tooltiptext3">If you have permission, click here to manage your teams outreach tags and outreach visibilities.</span></div></a></td></tr></table>');
        } else {
            $form['fields']['markupTwo'] = array('#markup' => '<td colspan="2" style="text-align:right"><div class="help tooltip3"><button type="button" disabled>Settings</button><span id="helptext"; class="helptext tooltiptext3">If you have permission, click here to manage your teams outreach tags and outreach visibilities.</span></div></td></tr></table>');
        }
        if ($multiple) {
            $form['fields']['submit'] = array('#type' => 'submit', '#value' => 'Update', '#attributes' => array('style' => array('display: none;')));
        }
    }
    return $form;
}
Ejemplo n.º 17
0
<!--			--><?php 
//print $links;
?>
<!--		</div>-->
<!--	--><?php 
//endif;
?>
	<?php 
print flag_create_link('favorites', $node->nid);
?>
	<?php 
print render($content['comments']);
?>
	<?php 
if (!empty($node->field_picture)) {
    ?>
	<div class="cloud-picture">
		<div class="clip"></div>
		<div class="cloud-picture-wrapper">
			<?php 
    print theme_image_style(array('style_name' => 'cloud_picture_small', 'path' => $node->field_picture['und'][0]['uri']));
    ?>
		</div>
	</div>
	<?php 
}
?>
	</div>

</div>
      <?php 
    }
    ?>
    </header>
  <?php 
}
?>

  <?php 
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
if ($view_mode == 'full') {
    print render($content['title_field']);
    // Display thumbnail
    if (isset($content['field_thumbnail'])) {
        print render($content['field_thumbnail']);
    } elseif (isset($content['field_image'])) {
        print theme_image_style(array('style_name' => 'medium', 'path' => $content['field_image']['#items'][0]['uri'], 'height' => NULL, 'width' => 220));
    }
    print render($content['body']);
    print render($content['field_image']);
    print render($content['field_file']);
    print render($content['field_twin_infographics']);
} elseif ($view_mode == 'teaser' || $view_mode == 'osha_resources') {
    print render($content);
}
?>

</article>
 * - $footer: The view footer
 * - $rows: The results of the view query, if any
 * - $empty: The empty text to display if the view is empty
 * - $pager: The pager next/prev links to display, if any
 * - $exposed: Exposed widget form/info to display
 * - $feed_icon: Feed icon to display, if any
 * - $more: A link to view more, if any
 *
 * @ingroup views_templates
 */
?>
<div id="top_image_blog"> 
    <?php 
$nodo_config = node_load(98);
//die(var_dump($nodo_config));
print theme_image_style(array('style_name' => 'top_image_events', 'path' => $nodo_config->field_blog_image_top['und'][0]['uri'], 'alt' => $nodo_config->field_blog_image_top['und'][0]['alt'], 'title' => $nodo_config->field_blog_image_top['und'][0]['title']));
?>
</div>
<div class="<?php 
print $classes;
?>
">
    <?php 
print render($title_prefix);
?>
    <?php 
if ($title) {
    ?>
        <?php 
    print $title;
    ?>
Ejemplo n.º 20
0
<?php

$account = user_load(arg(1));
if (!empty($account->picture)) {
    $pic = theme_image_style(array('style_name' => 'prodile_big_avatar', 'path' => $account->picture->uri));
} else {
    $pic = '<img src="' . $GLOBALS['base_path'] . drupal_get_path('theme', 'thinkloud_adaptive') . '/images/default-user-150.png">';
}
?>

<?php 
echo $pic;
Ejemplo n.º 21
0
<?php

if (isset($_GET['test-files'])) {
    print_r(get_defined_vars());
    exit;
}
$extension = pathinfo($filename, PATHINFO_EXTENSION);
$hfilesize = atento_get_human_size($filesize);
$view = file_create_url($uri);
$file = $elements['#file'];
$uri_download = file_entity_download_uri($file);
$download = url($uri_download['path'], $uri_download['options']);
$file_thumbnail = '&nbsp;';
if ($type == 'image') {
    $vars = array('style_name' => 'file_preview', 'path' => $uri, 'width' => $width, 'height' => $height);
    $file_thumbnail = theme_image_style($vars);
    $vars2 = $vars;
    $vars2['style_name'] = 'full';
    $dimensions = array('width' => $vars2['width'], 'height' => $vars2['height']);
    image_style_transform_dimensions($vars2['style_name'], $dimensions);
    $vars2['width'] = $dimensions['width'];
    $vars2['height'] = $dimensions['height'];
    $vars2['path'] = image_style_url($vars2['style_name'], $vars2['path']);
    $view = $vars2['path'];
    $data_size = "{$vars2['width']}x{$vars2['height']}";
} else {
    // Get Image for Extension
    $file_thumbnail = atento_get_extension_image($extension);
}
$filename_print = check_plain($filename);
if (isset($file->description) && !empty($file->description)) {
Ejemplo n.º 22
0
  <?php 
    print $node->field_url['und'][0]['value'];
    ?>

  <?php 
    print $node->field_description['und'][0]['value'];
    ?>


<?php 
} else {
    ?>
  <div class="portfolio" style="clear:both;">
    <?php 
    print theme_image_style(array('style_name' => 'portfolio-thumbnail', 'path' => $node->field_screenshot['und'][0]['uri'], 'height' => null, 'width' => null, 'attributes' => array('style' => 'float: left; margin-right: 10px;')));
    ?>
    <h3 style="margin-bottom: 0px;"><a href="<?php 
    print $node->field_url['und'][0]['value'];
    ?>
"><?php 
    print $node->title;
    ?>
</a></h3>
    <p style="margin: 5px 0;">
      <a href="<?php 
    print $node->field_url['und'][0]['value'];
    ?>
"><?php 
    print $node->field_url['und'][0]['value'];
    ?>
"><?php 
print $title;
?>
</a>
      <table class="table-member-toolkit">
    <?php 
$i = 0;
foreach ($node->field_member_toolkit['und'] as $key => $value) {
    $nodo = node_load($node->field_member_toolkit['und'][$key]['nid']);
    if ($i % 2 == 0) {
        print "<tr><td class='odd'>";
    } else {
        print "<td>";
    }
    if (!empty($nodo->field_image_header)) {
        print "<div class='field-member-toolkit-picture'><a href='/" . drupal_get_path_alias('node/' . $nodo->nid) . "'>" . theme_image_style(array('style_name' => 'member_toolkit', 'path' => $nodo->field_image_header['und'][0]['uri'], 'width' => NULL, 'height' => NULL, 'alt' => $nodo->field_image_header['und'][0]['alt'], 'title' => $nodo->field_image_header['und'][0]['title'])) . "</a></div>";
    }
    print "<div class='field-member-toolkit-title'><a href='/" . drupal_get_path_alias('node/' . $nodo->nid) . "'>" . $nodo->title . "</a></div>";
    print "<div class='field-member-toolkit-description'>" . $nodo->field_short_description['und'][0]['safe_value'] . "</div>";
    print "<div class='field-member-toolkit-readmore'><a href='/" . drupal_get_path_alias('node/' . $nodo->nid) . "'>Learn More ></a></div>";
    print "</td>";
    if ($i % 2 == 1) {
        print "</tr>";
    }
    $i++;
}
?>
      
    </table>
  </div>
Ejemplo n.º 24
0
    $user_id = $variables['user']->uid;
    $user = user_load($user_id);
    $user_url = $base_url . '/user/' . $user->uid;
    $user_image_alt = isset($user->picture) ? $user->picture->alt : '';
    ?>
  <div class="container-fluid">
      <div class="header-account">
          <div class="header-account-avatar">
              <a href="<?php 
    print $user_url;
    ?>
" title="">
                <?php 
    if ($user->picture) {
        $picture_path = $user->picture->uri;
        print $user_picture = theme_image_style(array('style_name' => 'avatar_thumb', 'path' => $picture_path, 'attributes' => array('class' => 'img-circle user-avatar', 'alt' => $user_image_alt), 'width' => 62, 'height' => 62));
    } else {
        echo '<img src="' . $base_url . '/' . drupal_get_path('module', 'md_block_custom') . '/add/img/user_not_verified.png" class="img-circle user-avatar" style="width:62px"/>';
    }
    ?>
              </a>
          </div>
          <div class="header-account-username">
              <h4><a href="<?php 
    print $user_url;
    ?>
"><?php 
    print ucfirst($user->name);
    ?>
</a></h4>
          </div>
Ejemplo n.º 25
0
}
?>
        <div id="widgets_cutting">

            <?php 
$i = 0;
foreach ($node->field_widgets['und'] as $key => $value) {
    if ($i % 2 == 0) {
        $class = "even";
    } else {
        $class = "odd";
    }
    $item = field_collection_item_load($value['value']);
    //dsm($item);
    print "<a class ='" . $class . "' href='" . $item->field_link_widget_cutting['und'][0]['url'] . "'>";
    print theme_image_style(array('style_name' => 'cutting_widget_block', 'path' => $item->field_image_widget_cutting['und'][0]['uri'], 'width' => NULL, 'height' => NULL, 'alt' => $item->field_image_widget_cutting['und'][0]['alt'], 'title' => $item->field_image_widget_cutting['und'][0]['alt']));
    print "<div class='title_link'>" . $item->field_link_widget_cutting['und'][0]['title'] . "</div>";
    print "</a>";
    $i++;
}
?>
        </div>
        <div id="body_cutting">
            <?php 
print $node->body['und'][0]['value'];
?>
        </div>
    </div>

</div>
Ejemplo n.º 26
0
/**
 * Detects if the given extension is located in the 
 */
function atento_get_extension_image_item($fcid, $extension)
{
    if (!($fc = entity_load('field_collection_item', array($fcid)))) {
        return false;
    }
    $fc = $fc[$fcid];
    if (!(isset($fc->field_extension_icon_ext[LANGUAGE_NONE][0]['value']) && !empty($fc->field_extension_icon_ext[LANGUAGE_NONE][0]['value']))) {
        return false;
    }
    $fc_exts = str_replace(' ', ',', $fc->field_extension_icon_ext[LANGUAGE_NONE][0]['value']);
    $fc_exts = explode(',', $fc_exts);
    // Clean Extensions.
    foreach ($fc_exts as $fc_ext) {
        $fc_ext = trim($fc_ext, ' ,.');
        $fc_ext = strtolower($fc_ext);
        if ($fc_ext == $extension) {
            $image_item = $fc->field_extension_icon_image[LANGUAGE_NONE][0];
            $vars = array('style_name' => 'file_cover', 'path' => $image_item['uri'], 'width' => $image_item['width'], 'height' => $image_item['height']);
            return theme_image_style($vars);
        }
    }
    return false;
}
Ejemplo n.º 27
0
>
        <div class="field_custom_body"><?php 
print $node->body['und'][0]['value'];
?>
</div>
        <table class="table-directors">
            <?php 
$i = 0;
foreach ($node->field_directors_reference['und'] as $key => $value) {
    $nodo = node_load($node->field_directors_reference['und'][$key]['nid']);
    if ($i % 2 == 0) {
        print "<tr><td class='odd'>";
    } else {
        print "<td>";
    }
    print "<div class='field-director-picture'><a href='/" . drupal_get_path_alias('node/' . $nodo->nid) . "'>" . theme_image_style(array('style_name' => 'directors_picture', 'path' => $nodo->field_director_picture['und'][0]['uri'], 'width' => NULL, 'height' => NULL, 'alt' => $nodo->field_director_picture['und'][0]['alt'], 'title' => $nodo->field_director_picture['und'][0]['title'])) . "</a></div>";
    print "<div class='field-director-name'><a href='/" . drupal_get_path_alias('node/' . $nodo->nid) . "'>" . $nodo->title . "</a></div>";
    print "<div class='field-director-title'><a href='/" . drupal_get_path_alias('node/' . $nodo->nid) . "'>" . $nodo->field_director_title['und'][0]['value'] . "</a></div>";
    print "<div class='field-director-description'>" . $nodo->field_director_short_description['und'][0]['safe_value'] . "</div>";
    print "<div class='field-director-readmore'><a href='/" . drupal_get_path_alias('node/' . $nodo->nid) . "'>Read More ></a></div>";
    print "</td>";
    if ($i % 2 == 1) {
        print "</tr>";
    }
    $i++;
}
?>
        </table>
    </div>
</div>
<?php

/**
 * @file
 * Image output for a Slick Slideshow slide.
*/
if ($item) {
    $image = array('path' => $item['uri'], 'width' => $item['width'], 'height' => $item['height'], 'alt' => $item['alt'], 'title' => $item['title'], 'attributes' => '');
    // If there's a style applied to the image (there should be), theme it with the style.
    if (function_exists('theme_image_style') && isset($image_style) && !empty($image_style)) {
        $image['style_name'] = $image_style;
        $slide = theme_image_style($image);
    } else {
        $slide = theme_image($image);
    }
    // Add image title as captions if setting is enabled.
    if ($captions) {
        $slide .= '<span class="slick-slide-caption">' . $image['title'] . '</span>';
    }
    // Link Widget support
    if (isset($item['link_url']) && isset($item['link_attributes'])) {
        $link_url = $item['link_url'];
        $link_options = array('attributes' => $item['link_attributes'], 'html' => TRUE);
        if (!empty($link_url) && !empty($link_options)) {
            // Print the image wrapped in a link.
            print l($slide, $link_url, $link_options);
        }
    } else {
        // Just print the default image
        print $slide;
    }
Ejemplo n.º 29
0
?>
>

    <div id="title_event" class="title_blue_one"><?php 
print $title;
?>
</div>

    <?php 
if (!aaap_event_registration($node->nid)) {
    ?>
        <div id="header_event">
            <div id="content_header_event">
                <?php 
    if (!empty($node->field_imagen_event)) {
        print theme_image_style(array('style_name' => 'event_full_view', 'path' => $node->field_imagen_event['und'][0]['uri'], 'width' => NULL, 'height' => NULL, 'alt' => $node->field_imagen_event['und'][0]['alt'], 'title' => $node->field_imagen_event['und'][0]['alt']));
    }
    ?>

                <div id="custom_text">Hold the Date!</div>
                <div
                    id="city_state"><?php 
    if (!empty($node->field_city) and !empty($node->field_state_province['und'][0]['value'])) {
        print $node->field_city['und'][0]['value'] . ", " . $node->field_state_province['und'][0]['value'];
    }
    ?>
</div>
                <div id='date_event'>
                    <?php 
    $date_to_print = date('l, M jS', strtotime($node->field_date['und'][0]['value']));
    if ($node->field_date['und'][0]['value'] != $node->field_date['und'][0]['value2']) {
Ejemplo n.º 30
0
										<p class="box-body">' . $box->field_footer_text['und'][0]['value'] . '</p>
										<p class="box-link"><a href="' . $box->field_url['und'][0]['value'] . '">READ MORE</a></p>
									</td>
									<td><a href="' . $box->field_url['und'][0]['value'] . '">' . theme_image_style(array('style_name' => 'services', 'path' => $box->field_top_image['und'][0]['uri'], 'alt' => $box->field_top_image['und'][0]['alt'], 'title' => $box->field_top_image['und'][0]['title'])) . '</a></td>
								</tr>
							</table>
						</div>';
        } else {
            print '<div class="boxes-wrapper">
							<table>
								<tr>
									<td>
										<h2 class="box-title">' . $box->field_title['und'][0]['value'] . '</h2>
										<p class="box-body">' . $box->field_footer_text['und'][0]['value'] . '</p>
									</td>
									<td>' . theme_image_style(array('style_name' => 'services', 'path' => $box->field_top_image['und'][0]['uri'], 'alt' => $box->field_top_image['und'][0]['alt'], 'title' => $box->field_top_image['und'][0]['title'])) . '</td>
								</tr>
							</table>
						</div>';
        }
    }
}
?>
       <?php 
global $base_url;
?>
      <div class="back-link"><a href="<?php 
print $base_url;
?>
/content/news">Back to News &rsaquo;</a></div>
  </div>