Ignore:
Timestamp:
May 17, 2012, 8:38:07 PM (12 years ago)
Author:
gbo
Message:

2.4.B Compliance with Theme Stripped and plugin Piwishak

File:
1 edited

Legend:

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

    r14421 r15076  
    22/*
    33Plugin Name: Look_like_gbo2
    4 Version:  2.4.A
     4Version:  2.4.B
    55Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
    66Author: GBo
     
    99Add a border around  picture ......
    1010        2.4.A Compliance Piwigo 2.4 + jquery
     11        2.4.B Compliance Theme Stripped and plugin Piwishak 
    1112 */
    1213if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    1314
    1415global $conf;
    15 define ('LLGBO_INFO_VERSION','2.4.A');
     16define ('LLGBO_INFO_VERSION','2.4.B');
    1617if (!defined('LLGBO_PATH'))
    1718{define('LLGBO_PATH' ,get_root_url().'plugins/'.basename(dirname(__FILE__)) . '/');}
     
    6667{ global $template,$conf;
    6768$infofile = $template->get_template_vars('INFO_FILE');
     69//----------------------------------------------------   
     70//-------    Tooltip    Arrow Stripped   -------------   
     71//---------------------------------------------------- 
     72$prev = $template->get_template_vars('previous');
     73$next  = $template->get_template_vars('next');
     74$swtimg =   '||<img src=';     
     75// If (($conf['LLGBO_SETTINGS'][1]  == 'true' ) and ($conf['LLGBO_SETTINGS'] [2]  == 'true' ))//   tooltip 
     76// {   if (isset($prev)){$template->append('previous',  array('TITLE' =>  $prev['TITLE'].$swtimg.$prev['THUMB_SRC'].'>'),TRUE);}
     77//      if (isset($next)){$template->append('next',  array('TITLE' =>  $next['TITLE'].$swtimg.$next['THUMB_SRC'].'>'),TRUE);}
     78//      }
    6879// ---- Metadata ----------     
    6980$pictExt = substr($infofile,-3);
     
    109120//-----------------------------------------------------------------
    110121function llgbo_RenderContent($content,$element_info )
    111 {global $template,$conf,$user,$lang;   
     122{global $template,$conf,$user,$lang,$themeconf;
    112123$template->assign('LLGBO_PATH',LLGBO_PATH);
    113124include_once(LLGBO_PATH.'/css/sweettitles.css.php');
    114 include_once(LLGBO_PATH.'/css/gbolook.css.php');
    115125//-----------------------------------------------------------------
    116126// -----------  add CSS tooltip in footer --------------------
     
    133143
    134144function LLGBO_prefilter_Frame($content, &$smarty)
    135 { //  begin frame
     145{  global $themeconf;
     146// ------------------------
     147//  begin frame
    136148 $search = '<img src="';
    137   $replacement = '{if isset($llgbo.TITLE_FRAME)}'."\n".'<span  id="gboh2" style ="background:transparent;z-index:3;color:{$llgbo.TITLE_FRAME_COLOR}">{$llgbo.TITLE_FRAME}</span>';
    138   $replacement = $replacement."\n".'{/if}'."\n".'<div  id="gbo" {$llgbo.FRAME_SIZE}>'."\n".'{$llgbo.FRAME_BEGIN}'."\n".$search;
    139   $step1 = str_replace($search, $replacement, $content);
    140 //  End frame   
    141   $search = '{foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip}';
    142   $replacement = '{$llgbo.FRAME_END}'."\n"."</div> <!-- end GBO frame -->"."\n".$search;
    143     return str_replace($search, $replacement, $step1);
     149  $replacement = '{if isset($llgbo.TITLE_FRAME)}'."\n".'<span  id="llgboh2" style ="background:transparent;z-index:3;color:{$llgbo.TITLE_FRAME_COLOR}">{$llgbo.TITLE_FRAME}</span>';
     150  $replacement = $replacement."\n".'{/if}'."\n".'<div  id="llgbo" {$llgbo.FRAME_SIZE}>'."\n".'{$llgbo.FRAME_BEGIN}'."\n".$search;
     151  $content = str_replace($search, $replacement, $content);
     152// ------------------------
     153  //  End frame 
     154  $search = '{$ALT_IMG}{/if}">';
     155 if (( strpos(strtoupper($themeconf['name']) , 'STRIPPED') === 0) )
     156        {$search = 'class="hideTabs">';}
     157  $replacement =  $search."\n".'{$llgbo.FRAME_END}'."\n"."</div> <!-- end GBO frame -->";
     158  return str_replace($search, $replacement, $content);
    144159}
    145160
Note: See TracChangeset for help on using the changeset viewer.