New automatic installer
[estigi.git] / skins / bluebreeze / bluebreeze.template
blobe15e4f4ff4f4e71fe81f29c3b1e572e611cbfa89
1 <?php
2 /**
3  * ABOUT
4  *
5  *  The .template file is one of the most useful files when creating or modifying esTigi themes.
6  *  You can add new regions for block content, modify or override Drupal's theme functions, 
7  *  intercept or make additional variables available to your theme, and create custom PHP logic.
8  *  For more information, please visit the Theme Developer's Guide on Drupal.org:
9  *  http://drupal.org/node/509
10  */
12 /**
13  * Skin boot function
14  * @todo
15  *  This is going to go away and boot will be used as a hook
16  *
17  */
18 function bluebreeze_boot(){
20         global $skin;
22         $skin['regions'] = array('header', 'footer', 'left', 'right', 'content', 'content_top', 'content_bottom', 'bottom', 'primary', 'secondary');
26 /**
27  * Implementation of hooks calling function
28  *
29  * @todo
30  *  Add avatar display on a per node type basis
31  */
32 function bluebreeze_hooksinyou($hook){
34         switch($hook){
35                 case 'node_display':{
36                         if(core_variable_get('display_avatar_teaser', '1', 'bluebreeze') || core_variable_get('display_avatar_full_node', '1', 'bluebreeze'))
37                                 bluebreeze_format_avatar_nodes();
38                         break;
39                 }
40                 case 'user_display':{
41                         if(core_variable_get('display_avatar_profile', '1', 'bluebreeze'))
42                                 bluebreeze_format_avatar_profiles();
43                         break;
44                 }
45         }
49 /**
50  * Formats a user avatar in nodes
51  *
52  * @todo
53  *  This should not really go here
54  * @todo
55  *  Add avatar display on a per node type basis
56  */
57 function bluebreeze_format_avatar_nodes(){
59         global $skin, $node_view_mode, $node_content, $loaded_nodes;
61         $avatar_size = core_variable_get('avatar_def', '50x50', 'bluebreeze');
63         $avatar_dims = explode("x", $avatar_size);
65         foreach($node_content as $this_node => $node){
66                 $node_content[$this_node]['picture_skinned'] = skin_image($node['picture'], $alt = $node['autor'] . "'s Picture", $title = 'Visit ' . $node['autor'] . '\'s Profile', 'width="' . $avatar_dims[0] . '" heigth="' . $avatar_dims[1].'"');
67         }
71 /**
72  * Formats a user avatar in profiles
73  *
74  * @todo
75  *  This should not really go here
76  * @todo
77  *  Add avatar display on users profiles
78  */
79 function bluebreeze_format_avatar_profiles(){
81         global $skin, $user_profile;
83         $avatar_size = core_variable_get('avatar_def_profile', '50x50', 'bluebreeze');
85         $avatar_dims = explode("x", $avatar_size);
87         $user_profile['picture_skinned'] = skin_image($user_profile['picture'], $alt = $user_profile['name'] . "'s Picture", $title = $user_profile['name'] . '\'s Picture', 'width="' . $avatar_dims[0] . '" heigth="' . $avatar_dims[1].'"');