]> gitweb.fluxo.info Git - drupal/nuvemdario.git/commitdiff
Custom common methods
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 29 Oct 2015 12:30:15 +0000 (10:30 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 29 Oct 2015 12:30:15 +0000 (10:30 -0200)
common_methods.php
drupal5_theme_methods.php
drupal6_theme_methods.php
drupal7_theme_methods.php
template.php

index 78306c6131adf87d3458e589b4c7ba66133c4ed3..958b4e2b86ff5991c9200bb93b2e9bbedd82d2b7 100644 (file)
@@ -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() : '&nbsp;|&nbsp;' . ob_get_clean();
   $result .= '<div class="b2-tags">' . render($terms) . '</div>';
   }
@@ -231,7 +231,7 @@ if (strpos ($key, "comment") !== FALSE) {
           $output .= '&nbsp;|&nbsp;';
         }
         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 .= '&nbsp|&nbsp';
         }
         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 .= '&nbsp;|&nbsp;';
     }
     $output .= ob_get_clean();
index 2cdd1e6079bdd47eddaa9f91d7914985e37d0bad..ae51c93c65c70b43d5f0ae60e0df7ad362cc5fe2 100644 (file)
@@ -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";
index 1fab4fd30f3fdf1dd3ea3527824cc0a15e2b8eb5..308f5cf59539512f719dbddeaa5e35385711fdab 100644 (file)
@@ -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";
index 293ba48a6db0ed8ca59c49fcf1d4fc22b25652df..eb0da4c4626447c4fc1b608920ee4a6a9287c43e 100644 (file)
@@ -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() : '&nbsp;|&nbsp;' . ob_get_clean();
   $result .= '<div class="b2-tags">' . render($terms) . '</div>';
   }
@@ -277,7 +277,7 @@ if (strpos ($key, "comment") !== FALSE) {
                  $output .= '&nbsp;|&nbsp;';
                }
                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 .= '&nbsp|&nbsp';
         }
         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++;
index 35c4f64050a836e2222df39a7c3e137717e8fbcc..96cf2f6e028773c53484d4f01702bc0844c18074 100644 (file)
@@ -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>