View
967
Download
1
Category
Preview:
DESCRIPTION
Jerome Jourquin presents how he adapted the main Vanderbilt University website template for use as a drupal theme on the Center for Cancer Systems Biology website - Oct. 28, 2010
Citation preview
What is bioinformatics?
Adapting the VU template to Drupal: the CCSB@V.
Jerome Jourquin, PhD MSQuaranta Lab
Center for Cancer Systems Biology at VanderbiltDepartment of Cancer Biology
jerome.jourquin@vanderbilt.edu
What is bioinformatics?
2
Why Drupal?
10/28/2010
http://vicbc.vanderbilt.edu/ccsb
“Collaborative website”
Center for Cancer Systems Biology at Vanderbilt (CCSB@V)
Vanderbilt Integrative Cancer Biology Center (VICBC)
Quaranta Lab
iTumor
Protein Expression User’s Club
What is bioinformatics?
3
The task at hands
10/28/2010
http://www.vanderbilt.edu/publicaffairs/webcomm/2010/05/vanderbilt-brand-bar/http://www.vanderbilt.edu/publicaffairs/webcomm/2010/05/simple-template-files-released/
What is bioinformatics?
4
Drupal theme engine
10/28/2010http://drupal.org/node/171194
What is bioinformatics?
5
10/28/2010
What is bioinformatics?
6
10/28/2010
What is bioinformatics?
7
name = CCSB Themedescription = Based on 960.gs, this theme was developed for the Center for Cancer Systems Biology at Vanderbilt University.screenshot = screenshot.pngcore = 6.xbase theme = ninesixty
stylesheets[all][] = ccsb_theme.cssstylesheets[all][] = featuredcontentglider.css
regions[firstlinks] = First Linksregions[secondlinks] = Second Linksregions[footer] = Footerregions[left] = Leftregions[right] = Rightregions[content] = Contentregions[account] = Accountregions[links] = Linksregions[pictures] = Picturesregions[over_text] = Over-Textregions[develp] = Developmentregions[calendar] = Mini Calendarregions[frontpagelinks] = Frontpage Linksregions[frontcontact] = Frontpage Contact
ccsb_theme.info
10/28/2010
What is bioinformatics?
8
10/28/2010
What is bioinformatics?
9
10/28/2010
menu
calendarviews
menu
site title, slogan, account
page
cck
What is bioinformatics?
10
Rendering the front page slideshow
10/28/2010
CCKImageFieldImageCache
ImageAPI
What is bioinformatics?
11
Rendering the front page slideshow
10/28/2010• CCK• ImageField• ImageCache
• ImageAPI
<div id="secslides" style="margin-top: -40px;"><div class="vslides"></div><script type="text/javascript" language="javascript">/* <![CDATA[ */$('.vslides').wwfvslides([<?php$slides = '';foreach ($images as $key=>$value) { $slides .= "{'backgroundImage': '".$images[$key]."', 'headline': '".$headlines[$key]."', 'thumbnail': '".$thumbnails[$key]."', 'href': '".$links[$key]."' },"; }print $slides;?>])/* ]]> */</script></div><!-- /secslides -->
// dimension images: main 650*311, thumbnail: 76*57$nodes = array();$result = db_query("SELECT nid FROM {node} WHERE type = '%s'", 'frontpage_image');while($row = db_fetch_object($result)) { $nodes[] = node_load($row->nid); }$images = array(); $headlines = array(); $thumbnails = array(); $links = array();foreach ($nodes as $object) {
$imagepath = $object->field_fpi_image[0]['filepath'];$image = 'files/ccsb/'.$object->field_fpi_image[0]['filename'].'-image.jpg';$thumbnail = 'files/ccsb/'.$object->field_fpi_image[0]['filename'].'-
thumbnail.jpg';$imageapi = imageapi_image_open($imagepath);imageapi_image_scale_and_crop($imageapi, '650', '311');imageapi_image_close($imageapi, $image);
$width = '0'; $height = '0';$imageapi = imageapi_image_open($imagepath);$width = $imageapi->info['width'];$height = $imageapi->info['height'] * 650 / $imageapi->info['width'];imageapi_image_scale($imageapi, '650');imageapi_image_crop($imageapi, '250', ($height/2), '76', '57');imageapi_image_close($imageapi, $thumbnail);
$images[] = $image; $thumbnails[] = $thumbnail;$headlines[] = $object->field_fpi_headline[0]['value'];$links[] = $object->field_fpi_link[0]['value'];
}
What is bioinformatics?
12
Drupal theme engine
10/28/2010
page-front.tpl.php
page.tpl.php
What is bioinformatics?
13
10/28/2010
http://pratul.in/drupal-makes-me-hapi
Recommended