diff options
-rw-r--r-- | common_methods.php | 10 | ||||
-rw-r--r-- | drupal5_theme_methods.php | 6 | ||||
-rw-r--r-- | drupal6_theme_methods.php | 6 | ||||
-rw-r--r-- | drupal7_theme_methods.php | 6 | ||||
-rw-r--r-- | template.php | 12 |
5 files changed, 19 insertions, 21 deletions
diff --git a/common_methods.php b/common_methods.php index 78306c6..958b4e2 100644 --- a/common_methods.php +++ b/common_methods.php @@ -173,7 +173,7 @@ function nuvemdario_terms_worker($terms) { $terms = get_terms_D7($content); if (!empty($terms)) { ob_start();?> - <img class="b2-metadata-icon" src="<?php echo get_full_path_to_theme(); ?>/images/posttagicon.png" width="16" height="16" alt="" /> <?php + <img class="b2-metadata-icon" src="<?php echo nuvemdario_get_full_path_to_theme(); ?>/images/posttagicon.png" width="16" height="16" alt="" /> <?php $result .= ($result == '') ? ob_get_clean() : ' | ' . ob_get_clean(); $result .= '<div class="b2-tags">' . render($terms) . '</div>'; } @@ -231,7 +231,7 @@ if (strpos ($key, "comment") !== FALSE) { $output .= ' | '; } ob_start();?> - <img class="b2-metadata-icon" src="<?php echo get_full_path_to_theme(); ?>/images/postcommentsicon.png" width="16" height="16" alt="" /> <?php + <img class="b2-metadata-icon" src="<?php echo nuvemdario_get_full_path_to_theme(); ?>/images/postcommentsicon.png" width="16" height="16" alt="" /> <?php $output .= ob_get_clean(); $output .= $link_output; $index++; @@ -242,7 +242,7 @@ if ($index > 0 && !empty($link_output) && !empty($output)) { $output .= ' | '; } ob_start();?> - <img class="b2-metadata-icon" src="<?php echo get_full_path_to_theme(); ?>/images/postcategoryicon.png" width="16" height="16" alt="" /> <?php + <img class="b2-metadata-icon" src="<?php echo nuvemdario_get_full_path_to_theme(); ?>/images/postcategoryicon.png" width="16" height="16" alt="" /> <?php $output .= ob_get_clean(); $output .= $link_output; $index++; @@ -405,14 +405,14 @@ function nuvemdario_submitted_worker($date, $author) { $output = ''; if ($date != '') { ob_start();?> - <img class="b2-metadata-icon" src="<?php echo get_full_path_to_theme(); ?>/images/postdateicon.png" width="16" height="16" alt="" /> <?php + <img class="b2-metadata-icon" src="<?php echo nuvemdario_get_full_path_to_theme(); ?>/images/postdateicon.png" width="16" height="16" alt="" /> <?php $output .= ob_get_clean(); $output .= $date; } if ($author != '') { ob_start();?> - <img class="b2-metadata-icon" src="<?php echo get_full_path_to_theme(); ?>/images/postauthoricon.png" width="16" height="16" alt="" /> <?php if ($output != '') { + <img class="b2-metadata-icon" src="<?php echo nuvemdario_get_full_path_to_theme(); ?>/images/postauthoricon.png" width="16" height="16" alt="" /> <?php if ($output != '') { $output .= ' | '; } $output .= ob_get_clean(); diff --git a/drupal5_theme_methods.php b/drupal5_theme_methods.php index 2cdd1e6..ae51c93 100644 --- a/drupal5_theme_methods.php +++ b/drupal5_theme_methods.php @@ -219,9 +219,9 @@ function nuvemdario_img_assist_page($content, $attributes = NULL) { $path = drupal_get_path('module', 'img_assist') .'/img_assist_popup.css'; $output .= "<style type=\"text/css\" media=\"all\">@import \"". base_path() . $path ."\";</style>\n"; - $output .= '<link rel="stylesheet" href="'.get_full_path_to_theme().'/style.css" type="text/css" />'."\n"; - $output .= '<!--[if IE 6]><link rel="stylesheet" href="'.get_full_path_to_theme().'/style.ie6.css" type="text/css" /><![endif]-->'."\n"; - $output .= '<!--[if IE 7]><link rel="stylesheet" href="'.get_full_path_to_theme().'/style.ie7.css" type="text/css" /><![endif]-->'."\n"; + $output .= '<link rel="stylesheet" href="'.nuvemdario_get_full_path_to_theme().'/style.css" type="text/css" />'."\n"; + $output .= '<!--[if IE 6]><link rel="stylesheet" href="'.nuvemdario_get_full_path_to_theme().'/style.ie6.css" type="text/css" /><![endif]-->'."\n"; + $output .= '<!--[if IE 7]><link rel="stylesheet" href="'.nuvemdario_get_full_path_to_theme().'/style.ie7.css" type="text/css" /><![endif]-->'."\n"; $output .= "</head>\n"; $output .= '<body'. drupal_attributes($attributes) .">\n"; diff --git a/drupal6_theme_methods.php b/drupal6_theme_methods.php index 1fab4fd..308f5cf 100644 --- a/drupal6_theme_methods.php +++ b/drupal6_theme_methods.php @@ -171,9 +171,9 @@ function nuvemdario_img_assist_page($content, $attributes = NULL) { $path = drupal_get_path('module', 'img_assist') .'/img_assist_popup.css'; $output .= "<style type=\"text/css\" media=\"all\">@import \"". base_path() . $path ."\";</style>\n"; - $output .= '<link rel="stylesheet" href="'.get_full_path_to_theme().'/style.css" type="text/css" />'."\n"; - $output .= '<!--[if IE 6]><link rel="stylesheet" href="'.get_full_path_to_theme().'/style.ie6.css" type="text/css" /><![endif]-->'."\n"; - $output .= '<!--[if IE 7]><link rel="stylesheet" href="'.get_full_path_to_theme().'/style.ie7.css" type="text/css" /><![endif]-->'."\n"; + $output .= '<link rel="stylesheet" href="'.nuvemdario_get_full_path_to_theme().'/style.css" type="text/css" />'."\n"; + $output .= '<!--[if IE 6]><link rel="stylesheet" href="'.nuvemdario_get_full_path_to_theme().'/style.ie6.css" type="text/css" /><![endif]-->'."\n"; + $output .= '<!--[if IE 7]><link rel="stylesheet" href="'.nuvemdario_get_full_path_to_theme().'/style.ie7.css" type="text/css" /><![endif]-->'."\n"; $output .= "</head>\n"; $output .= '<body'. drupal_attributes($attributes) .">\n"; diff --git a/drupal7_theme_methods.php b/drupal7_theme_methods.php index 293ba48..eb0da4c 100644 --- a/drupal7_theme_methods.php +++ b/drupal7_theme_methods.php @@ -213,7 +213,7 @@ function nuvemdario_links_woker_D7($content) { $terms = get_terms_D7($content); if (!empty($terms)) { ob_start();?> - <img class="b2-metadata-icon" src="<?php echo get_full_path_to_theme(); ?>/images/posttagicon.png" width="16" height="16" alt="" /> <?php + <img class="b2-metadata-icon" src="<?php echo nuvemdario_get_full_path_to_theme(); ?>/images/posttagicon.png" width="16" height="16" alt="" /> <?php $result .= ($result == '') ? ob_get_clean() : ' | ' . ob_get_clean(); $result .= '<div class="b2-tags">' . render($terms) . '</div>'; } @@ -277,7 +277,7 @@ if (strpos ($key, "comment") !== FALSE) { $output .= ' | '; } ob_start();?> - <img class="b2-metadata-icon" src="<?php echo get_full_path_to_theme(); ?>/images/postcommentsicon.png" width="16" height="16" alt="" /> <?php + <img class="b2-metadata-icon" src="<?php echo nuvemdario_get_full_path_to_theme(); ?>/images/postcommentsicon.png" width="16" height="16" alt="" /> <?php $output .= ob_get_clean(); $output .= $link_output; $index++; @@ -288,7 +288,7 @@ if ($index > 0 && !empty($link_output) && !empty($output)) { $output .= ' | '; } ob_start();?> - <img class="b2-metadata-icon" src="<?php echo get_full_path_to_theme(); ?>/images/postcategoryicon.png" width="16" height="16" alt="" /> <?php + <img class="b2-metadata-icon" src="<?php echo nuvemdario_get_full_path_to_theme(); ?>/images/postcategoryicon.png" width="16" height="16" alt="" /> <?php $output .= ob_get_clean(); $output .= $link_output; $index++; diff --git a/template.php b/template.php index 35c4f64..96cf2f6 100644 --- a/template.php +++ b/template.php @@ -3,7 +3,7 @@ require_once("common_methods.php"); -switch (get_drupal_version()) { +switch (nuvemdario_get_drupal_version()) { case 5: require_once("drupal5_theme_methods.php"); break; @@ -19,22 +19,20 @@ switch (get_drupal_version()) { /* Common methods */ -/* -function get_drupal_version() { +function nuvemdario_get_drupal_version() { $tok = strtok(VERSION, '.'); //return first part of version number return (int)$tok[0]; } -function get_page_language($language) { +function nuvemdario_get_page_language($language) { if (get_drupal_version() >= 6) return $language->language; return $language; } -function get_full_path_to_theme() { +function nuvemdario_get_full_path_to_theme() { return base_path().path_to_theme(); } -*/ function get_nuvemdario_drupal_view() { if (get_drupal_version() == 7) @@ -55,7 +53,7 @@ class nuvemdario_view_drupal56 { $$name = & $vars[$name]; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo get_page_language($language); ?>" xml:lang="<?php echo get_page_language($language); ?>" <?php if (isset($language->dir)) { echo 'dir="'.$language->dir.'"'; }?> > +<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo nuvemdario_get_page_language($language); ?>" xml:lang="<?php echo nuvemdario_get_page_language($language); ?>" <?php if (isset($language->dir)) { echo 'dir="'.$language->dir.'"'; }?> > <head> <?php echo $head; ?> <title><?php if (isset($head_title )) { echo $head_title; } ?></title> |