Changeset 6549 for extensions/LLGBO2


Ignore:
Timestamp:
06/17/10 19:28:39 (9 years ago)
Author:
EXFTB
Message:

llgbo 2.1.e fix $confquestion_mark_in_urls = false

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/LLGBO2/main.inc.php

    r6450 r6549  
    22/* 
    33Plugin Name: Look_like_gbo2  
    4 Version:  2.1.d 
     4Version:  2.1.e 
    55Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251 
    66Author: Ex-Ftb   
     
    1111  2.1.b fix minor bugs in administration  
    1212  2.1.c compatibility with simple  
    13   2.1.d bug Css with IE6 & IE8   */ 
     13  2.1.d bug Css with IE6 & IE8  
     14  2.1.e fix bug   $conf['question_mark_in_urls']  */ 
    1415 
    1516if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
     
    1819global $conf;  
    1920 
    20 define ('LLGBO_INFO_VERSION','2.1.d'); 
     21define ('LLGBO_INFO_VERSION','2.1.e'); 
    2122if (!defined('LLGBO_PATH')) 
    22 {define('LLGBO_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');} 
     23{define('LLGBO_PATH' ,get_root_url().'plugins/'.basename(dirname(__FILE__)) . '/');} 
    2324          
    2425 $conf['LLGBO_SETTINGS'] =  explode("," , $conf['LLGBO']); 
     
    6970if ($conf['LLGBO_SETTINGS'] [6] = 'true' )  
    7071{$no_header = false; 
    71 if  (  $page_name == 'index') 
    72         {//  print_r($_GET.'----'.$page_name );  
    73         if ((count ($_GET)) == 0   and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// home 
    74          foreach($_GET as $cle =>$valeur) 
    75                 {//print_r($cle.'_'.$valeur);   
    76                         if ((strpos( $cle ,'categories') == true ) and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// categories 
    77                         if ((strpos( $cle ,'category') == true ) and ($conf['LLGBO_HEADER'][1] == 'false')) {$no_header = true;break;} 
    78                         if ((strpos( $cle ,'filter=') == true ) and ($conf['LLGBO_HEADER'][2] == 'false')) {$no_header = true;break;} 
    79                         if ((strpos( $cle ,'categories/flat') == true ) and ($conf['LLGBO_HEADER'][3] == 'false')) {$no_header = true;break;} 
    80                         if ((strpos( $cle ,'categories/posted-monthly-list') == true ) and ($conf['LLGBO_HEADER'][4] == 'false')) {$no_header = true;break;} 
    81                         if ((strpos( $cle ,'additional_page') == true ) and ($conf['LLGBO_HEADER'][6] == 'false')) {$no_header = true;break;} 
    82                         if ((strpos( $cle ,'most_visited') == true ) and ($conf['LLGBO_HEADER'][7] == 'false')) {$no_header = true;break;} 
    83                         if ((strpos( $cle ,'best_rated') == true ) and ($conf['LLGBO_HEADER'][8] == 'false')) {$no_header = true;break;} 
    84                         if ((strpos( $cle ,'list') == true ) and ($conf['LLGBO_HEADER'][9] == 'false')) {$no_header = true;break;} 
    85                         if ((strpos( $cle ,'recent_pics') == true ) and ($conf['LLGBO_HEADER'][10] == 'false')) {$no_header = true;break;} 
    86                         if ((strpos( $cle ,'tags') == true ) and ($conf['LLGBO_HEADER'][11] == 'false')) {$no_header = true;break;} 
    87                         if ((strpos( $cle ,'created-monthly-list') == true ) and ($conf['LLGBO_HEADER'][12] == 'false')) {$no_header = true;break;} 
    88                         if ((strpos( $cle ,'favorites') == true ) and ($conf['LLGBO_HEADER'][19] == 'false')) {$no_header = true;break;} 
    89                     if ((strpos( $cle ,'recent_cats') == true ) and ($conf['LLGBO_HEADER'][20] == 'false')) {$no_header = true;break;}  
    90                  } 
     72 
     73$input= $_SERVER['PHP_SELF']; 
     74if ($conf['question_mark_in_urls'] == true) 
     75 {      foreach($_GET as $cle  =>$valeur)  
     76                {$input= $input.$cle ;} 
     77} 
     78// print_r($input.'----'.$page_name );  
     79if  ( strpos( $input,'index') == true ) 
     80{                
     81                if ((strpos( $input,'index.php/') == false )  and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// home 
     82                if ((strpos( $input,'categories') == true ) and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// categories 
     83                if ((strpos( $input,'category') == true ) and ($conf['LLGBO_HEADER'][1] == 'false')) {$no_header = true; } 
     84                if ((strpos( $input,'filter=') == true ) and ($conf['LLGBO_HEADER'][2] == 'false')) {$no_header = true; } 
     85                if ((strpos( $input,'categories/flat') == true ) and ($conf['LLGBO_HEADER'][3] == 'false')) {$no_header = true ;} 
     86                if ((strpos( $input,'categories/posted-monthly-list') == true ) and ($conf['LLGBO_HEADER'][4] == 'false')) {$no_header = true ;} 
     87                if ((strpos( $input,'additional_page') == true ) and ($conf['LLGBO_HEADER'][6] == 'false')) {$no_header = true; } 
     88                if ((strpos( $input,'most_visited') == true ) and ($conf['LLGBO_HEADER'][7] == 'false')) {$no_header = true ;} 
     89                if ((strpos( $input,'best_rated') == true ) and ($conf['LLGBO_HEADER'][8] == 'false')) {$no_header = true; } 
     90                if ((strpos( $input,'list') == true ) and ($conf['LLGBO_HEADER'][9] == 'false')) {$no_header = true; } 
     91                if ((strpos( $input,'recent_pics') == true ) and ($conf['LLGBO_HEADER'][10] == 'false')) {$no_header = true ;} 
     92                if ((strpos( $input,'tags') == true ) and ($conf['LLGBO_HEADER'][11] == 'false')) {$no_header = true; } 
     93                if ((strpos( $input,'created-monthly-list') == true ) and ($conf['LLGBO_HEADER'][12] == 'false')) {$no_header = true;} 
     94                if ((strpos( $input,'favorites') == true ) and ($conf['LLGBO_HEADER'][19] == 'false')) {$no_header = true;} 
     95                if ((strpos( $input,'recent_cats') == true ) and ($conf['LLGBO_HEADER'][20] == 'false')) {$no_header = true;;}  
     96          
    9197        } 
    9298        //print_r($_GET.'----'.$page_name );  
    93  if ( $page_name == 'picture' and  $conf['LLGBO_HEADER'][5] == 'false')  {$no_header = true;}//picture page 
    94  if ( $page_name == 'tags' and  $conf['LLGBO_HEADER'][11] == 'false')  {$no_header = true;}//tags 
    95  if ( $page_name == 'search' and  $conf['LLGBO_HEADER'][13] == 'false')  {$no_header = true;}//search    
    96  if ( $page_name == 'comments' and  $conf['LLGBO_HEADER'][14] == 'false')  {$no_header = true;}//comments 
    97  if ( $page_name == 'about' and  $conf['LLGBO_HEADER'][15] == 'false')  {$no_header = true;}//about       
    98  if ( $page_name == 'notification' and  $conf['LLGBO_HEADER'][16] == 'false')  {$no_header = true;}//notification         
    99  if ( $page_name == 'register' and  $conf['LLGBO_HEADER'][17] == 'false')  {$no_header = true;} //notification    
    100  if ( $page_name == 'identification' and  $conf['LLGBO_HEADER'][18] == 'false')  {$no_header = true;}//about      
     99if  ( strpos( $input,'index') == false ) 
     100         {if ( $page_name == 'index'   and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// home 
     101         if ( $page_name == 'picture' and  $conf['LLGBO_HEADER'][5] == 'false')  {$no_header = true;}//picture page 
     102         if ( $page_name == 'tags' and  $conf['LLGBO_HEADER'][11] == 'false')  {$no_header = true;}//tags 
     103         if ( $page_name == 'search' and  $conf['LLGBO_HEADER'][13] == 'false')  {$no_header = true;}//search    
     104         if ( $page_name == 'comments' and  $conf['LLGBO_HEADER'][14] == 'false')  {$no_header = true;}//comments 
     105         if ( $page_name == 'about' and  $conf['LLGBO_HEADER'][15] == 'false')  {$no_header = true;}//about       
     106         if ( $page_name == 'notification' and  $conf['LLGBO_HEADER'][16] == 'false')  {$no_header = true;}//notification         
     107         if ( $page_name == 'register' and  $conf['LLGBO_HEADER'][17] == 'false')  {$no_header = true;} //notification    
     108         if ( $page_name == 'identification' and  $conf['LLGBO_HEADER'][18] == 'false')  {$no_header = true;}//about      
     109         } 
    101110 if ($no_header == true) 
    102111{$template->append('head_elements',"\n".' <STYLE type="text/css">#theHeader{display: none}</STYLE>');} 
     
    140149function MyPictureOptions($content ) 
    141150{global $template,$conf,$user,$lang;     
     151$llgbo_path = get_root_url().'plugins/'.basename(dirname(__FILE__)) . '/'; 
    142152$sweetcss = ' <! --- LLGBO tooltip css--> 
    143153<style type="text/css">  
     
    152162 If (($conf['LLGBO'][1]  == 'true' ) /*  tooltip  */  or  ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  /* exif under bt */  
    153163 or  ($conf['LLGBO_SETTINGS'] [4]  === 'true' ) /* usemap and Display Thumb  */) 
    154             {  $javacss = '<script type="text/javascript" charset="utf-8"  src="'.LLGBO_PATH;    
    155                   $linkcss = '<link rel="stylesheet" type="text/css" href="'.LLGBO_PATH; 
     164            {  $javacss = '<script type="text/javascript" charset="utf-8"  src="'.$llgbo_path; 
    156165              $sweetcss =  $sweetcss."\n".$javacss.'js/sweettitlesn.js"></script>'."\n";  
    157166                  $template->append('footer_elements',$sweetcss); } 
     
    200209/////////////////////////////////////////////////////////////////        
    201210If (($conf['LLGBO_SETTINGS'] [1]  == 'true' )/*  tooltip display  */  or ($conf['LLGBO_SETTINGS'] [0] == 'true') /*  frame  */  ) 
    202                         {$linkcss = '<link rel="stylesheet" type="text/css" href="'.LLGBO_PATH; 
     211                        { $linkcss = '<link rel="stylesheet" type="text/css" href="'.$llgbo_path; 
    203212                        $template->append('head_elements',$linkcss.'css/gbolook.css">'); 
    204213                         $template->append('head_elements',"\n".' <STYLE type="text/css">#theImage{margin:auto;overflow: hidden;}</STYLE>'); 
     
    241250        $related_cat = str_replace($conf['level_separator'],"-",$related_cat); 
    242251        }  
    243  $alt = $alt.' - ['.$related_cat.']';*/ 
     252 $alt = $alt.' - ['.$related_cat.']'; */ 
    244253//----------------------------------------------------------------- 
    245254$template->assign( array( 
Note: See TracChangeset for help on using the changeset viewer.