Ignore:
Timestamp:
Sep 14, 2010, 8:52:00 PM (14 years ago)
Author:
flop25
Message:

version 2.1.0 for pwg 2.1.x

Location:
extensions/adult_content
Files:
7 added
4 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/adult_content/class.inc.php

    r4080 r6921  
    5555  {
    5656    global $user, $template;
    57 
    58     $dir = $this->plugin_path.'template/';
    59     $theme_file = $dir.$user['template'].'/'.$user['theme'].'/'.$file;
    60     $template_file = $dir.$user['template'].'/'.$file;
    61 
    62     if (file_exists($theme_file))
    63     {
    64       return $theme_file;
    65     }
    66     elseif (file_exists($template_file))
    67     {
    68       return $template_file;
    69     }
    70     else
    71     {
    72       return $dir.'yoga/'.$file;
    73     }
     57        $r_theme_file=array();
     58        $dir = $this->plugin_path.'template/';
     59        $r_theme_file=($template->smarty->template_dir);
     60                foreach( $r_theme_file as $style)
     61                {
     62                        $theme_file = explode("/", $style);
     63                        $pos = count($theme_file) - 2 ;
     64                        $theme_file = $dir.$theme_file[$pos].'/'.$file;
     65                        if (file_exists($theme_file))
     66                        {
     67                                return $theme_file;
     68                        }
     69                        else
     70                        {
     71                                $theme_file=NULL;
     72                }
     73               
     74               
     75        }
     76        if (empty($theme_file))
     77        {
     78      return $dir.'default/'.$file;
     79        }
    7480  }
    7581
  • extensions/adult_content/main.inc.php

    r4078 r6921  
    22/*
    33Plugin Name: adult_content
    4 Version: 2.0.1
     4Version: 2.1.0
    55Description: manage adult content / Gerer du contenu adulte
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=141
Note: See TracChangeset for help on using the changeset viewer.