• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Adapting the VU template to drupal

on

  • 1,178 views

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

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

Statistics

Views

Total Views
1,178
Views on SlideShare
1,178
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Adapting the VU template to drupal Adapting the VU template to drupal Presentation Transcript

    • Adapting the VU template to Drupal: the CCSB@V.
      Jerome Jourquin, PhD MS
      Quaranta Lab
      Center for Cancer Systems Biology at Vanderbilt
      Department of Cancer Biology
      jerome.jourquin@vanderbilt.edu
    • Why Drupal?
      2
      http://vicbc.vanderbilt.edu/ccsb
      Center for Cancer Systems Biology at Vanderbilt (CCSB@V)
      Protein Expression User’s Club
      iTumor
      Quaranta Lab
      “Collaborative website”
      10/28/2010
      Vanderbilt Integrative Cancer Biology Center (VICBC)
    • The task at hands
      3
      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/
    • Drupal theme engine
      4
      10/28/2010
      http://drupal.org/node/171194
    • 5
      10/28/2010
    • 6
      10/28/2010
    • ccsb_theme.info
      7
      name = CCSB Theme
      description = Based on 960.gs, this theme was developed for the Center for Cancer Systems Biology at Vanderbilt University.
      screenshot = screenshot.png
      core = 6.x
      base theme = ninesixty
      stylesheets[all][] = ccsb_theme.css
      stylesheets[all][] = featuredcontentglider.css
      regions[firstlinks] = First Links
      regions[secondlinks] = Second Links
      regions[footer] = Footer
      regions[left] = Left
      regions[right] = Right
      regions[content] = Content
      regions[account] = Account
      regions[links] = Links
      regions[pictures] = Pictures
      regions[over_text] = Over-Text
      regions[develp] = Development
      regions[calendar] = Mini Calendar
      regions[frontpagelinks] = Frontpage Links
      regions[frontcontact] = Frontpage Contact
      10/28/2010
    • 8
      10/28/2010
    • 9
      site title, slogan, account
      menu
      cck
      calendar
      views
      menu
      page
      10/28/2010
    • Rendering the front page slideshow
      10
      CCK
      ImageField
      ImageCacheImageAPI
      10/28/2010
    • Rendering the front page slideshow
      11
      • 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'];
      }
      10/28/2010
    • Drupal theme engine
      12
      page-front.tpl.php
      page.tpl.php
      10/28/2010
    • 13
      10/28/2010
      http://pratul.in/drupal-makes-me-hapi