Changeset 104
- Timestamp:
- 03/05/07 03:56:52 (5 years ago)
- File:
-
- 1 edited
-
themes/yd/yd.theme (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
themes/yd/yd.theme
r79 r104 22 22 } 23 23 24 function yd_page($content ) {24 function yd_page($content, $show_blocks = TRUE) { 25 25 $language = $GLOBALS['locale']; 26 26 … … 28 28 drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="image/x-icon" />'); 29 29 } 30 31 drupal_add_css(path_to_theme() .'/common.css', 'theme'); 30 32 31 33 $title = drupal_get_title(); 34 35 // Get blocks before so that they can alter the header (JavaScript, Stylesheets etc.) 36 $blocks_left = theme_blocks('left'); 37 $blocks_right = theme_blocks('right'); 32 38 33 39 $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"; 34 40 $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\">\n"; 35 41 $output .= "<head>\n"; 36 $output .= " <title>". ($title ? strip_tags($title) ." | ". variable_get("site_name", " drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n";42 $output .= " <title>". ($title ? strip_tags($title) ." | ". variable_get("site_name", "Drupal") : variable_get("site_name", "Drupal") ." | ". variable_get("site_slogan", "")) ."</title>\n"; 37 43 $output .= drupal_get_html_head(); 38 $output .= theme('stylesheet_import', base_path() . path_to_theme() ."/common.css");39 $output .= theme_get_styles();44 $output .= drupal_get_css(); 45 $output .= drupal_get_js(); 40 46 $output .= "</head>"; 41 47 $output .= "<body>\n"; … … 57 63 $output .= "</div>\n"; 58 64 59 $primary_links = false; //theme('links', menu_primary_links());60 $secondary_links = false; //theme('links', menu_secondary_links());65 $primary_links = theme('links', menu_primary_links(), array('class' => 'links', 'id' => 'navlist')); 66 $secondary_links = theme('links', menu_secondary_links(), array('class' => 'links', 'id' => 'subnavlist')); 61 67 if (isset($primary_links) || isset($secondary_links)) { 62 68 $output .= ' <div class="navlinks">'; 63 69 if (isset($primary_links)) { 64 $output .= '<div class="primary">'. $primary_links .'</div>';70 // $output .= '<div class="primary">'. $primary_links .'</div>'; 65 71 } 66 72 if (isset($secondary_links)) { 67 $output .= '<div class="secondary">'. $secondary_links .'</div>';73 // $output .= '<div class="secondary">'. $secondary_links .'</div>'; 68 74 } 69 75 $output .= " </div>\n"; … … 74 80 $output .= " <tr>\n"; 75 81 76 if ($ blocks = theme_blocks("left")) {77 $output .= " <td id=\"sidebar-left\">$blocks </td>\n";82 if ($show_blocks && !empty($blocks_left)) { 83 $output .= " <td id=\"sidebar-left\">$blocks_left</td>\n"; 78 84 } 79 85 … … 95 101 $output .= "\n<!-- begin content -->\n"; 96 102 $output .= $content; 103 $output .= drupal_get_feeds(); 97 104 $output .= "\n<!-- end content -->\n"; 98 105 … … 103 110 $output .= " </td>\n"; 104 111 105 if ($ blocks = theme_blocks("right")) {106 $output .= " <td id=\"sidebar-right\">$blocks </td>\n";112 if ($show_blocks && !empty($blocks_right)) { 113 $output .= " <td id=\"sidebar-right\">$blocks_right</td>\n"; 107 114 } 108 115 … … 137 144 $output .= " </div>\n"; 138 145 139 $submitted = theme_get_setting("toggle_node_info_$node->type") ? array(t("By %author at %date", array('%author' => theme('username', $node), '%date' => format_date($node->created, 'small')))) : array(); 140 141 142 $digg = array("<a href='http://digg.com/submit?phase=2&url=".urlencode(url("node/".$node->nid, NULL, NULL, TRUE))."&title=".urlencode($node->title)."'>Digg this</a>"); 146 $submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array( 147 'title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small'))), 148 'html' => TRUE) : array(); 143 149 144 150 $terms = array(); 145 if (module_exist ('taxonomy')) {151 if (module_exists('taxonomy')) { 146 152 $terms = taxonomy_link("taxonomy terms", $node); 147 153 } 148 154 149 $links = array_merge($submitted, $ digg, $terms);155 $links = array_merge($submitted, $terms); 150 156 if ($node->links) { 151 157 $links = array_merge($links, $node->links); 152 158 } 153 159 if (count($links)) { 154 $output .= " <div class=\"links\">". theme('links', $links) ."</div>\n";160 $output .= '<div class="links">'. theme('links', $links, array('class' => 'links inline')) ."</div>\n"; 155 161 } 156 162 … … 161 167 162 168 function yd_comment($comment, $links = "") { 163 $submitted = array(t('By %author at %date', array('%author' => theme('username', $comment), '%date' => format_date($comment->timestamp. 'small')))); 164 169 $submitted['comment_submitted'] = array( 170 'title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))), 171 'html' => TRUE); 165 172 $output = "<div class=\"comment". ($comment->status == COMMENT_NOT_PUBLISHED ? ' comment-unpublished' : '') ."\">\n"; 166 173 $output .= " <h3 class=\"title\">". l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") ."</h3>\n";
Note: See TracChangeset
for help on using the changeset viewer.
