source: extensions/LLGBO2/include/manage_picture_content.php @ 16145

Last change on this file since 16145 was 16145, checked in by gbo, 12 years ago

Fix: Tooltip not displayed according the option

File size: 3.0 KB
Line 
1<?php
2$prev = $template->get_template_vars('previous');
3$next  = $template->get_template_vars('next');
4$current  = $template->get_template_vars('current');
5$themeconf = $template->get_template_vars('themeconf');
6//print_r($next);
7$swtimg =   '||<img src=';     
8//----------------------------------------------------   
9//-------      Tooltip                   -------------   
10//----------------------------------------------------   
11If ($conf['LLGBO_SETTINGS'][1]  == 'true' )//   tooltip 
12{  if (isset($prev)){$template->append('previous',  array('TITLE' =>  $prev['TITLE'].$swtimg.$prev['THUMB_SRC'].'>'),TRUE);}
13   if (isset($next)){$template->append('next',  array('TITLE' =>  $next['TITLE'].$swtimg.$next['THUMB_SRC'].'>'),TRUE);}
14        $template->append('llgbo', array('tooltipCSS'  => $sweetcss), true); 
15        }       
16       
17//----------------------------------------------------   
18/*              HTML  frame                          */
19//----------------------------------------------------   
20If (($conf['LLGBO_SETTINGS'] [0] == 'true') ) //Frame
21        {       
22        $template->set_prefilter('default_content', 'LLGBO_prefilter_Frame');
23        // selected picture Size                       
24        $deriv_type = pwg_get_session_var('picture_deriv', IMG_LARGE);
25        $PictSizeWH  =  $element_info['derivatives'][$deriv_type]->get_size(); 
26        $frame_width  = $PictSizeWH[0];
27                $frame_height = $PictSizeWH[1];
28                $lastbrdpx = 0;
29                $frame_begin ='';
30                $frame_end='';
31                for ($x = 1   ;$x < 32  ; $x =$x +2)
32                {       if ((isset($conf['LLGBO_FRAME'][$x+1])) and  ($conf['LLGBO_FRAME'][$x+1] > 0))  // boder value > 0     
33                          { $bordpx= $conf['LLGBO_FRAME'][$x+1]; 
34                                $frame_width = $frame_width + ( 2* $lastbrdpx);                         
35                                $frame_height = $frame_height + ( 2* $lastbrdpx); 
36                            $bordcolor = $conf['LLGBO_FRAME'][$x];
37                            $frame_begin = '<div   id ="llgboframe'.$x.'" style="border:'.$bordpx.'px solid '.$bordcolor.';width:'.$frame_width.'px; height:'.$frame_height.'px;">'."\n".$frame_begin;
38                                $frame_end = $frame_end .'</div>';     
39                                $lastbrdpx = $bordpx;}
40                }
41        $csstheme = 'default';
42        $themeconf = $template->get_template_vars('themeconf');
43                $frame_width = $frame_width + ( 2* $lastbrdpx);                         
44                $frame_height = $frame_height + ( 2* $lastbrdpx); 
45                $frame_size = 'style="border:0 ;width:'.$frame_width.'px; height:'.$frame_height.'px;"';
46                $themestyle = $themeconf['parent'];
47                If ($themestyle == 'default')
48                   { $themestyle = $themeconf['id'];}
49                // print_r($themestyle);
50                 $template->append('llgbo', array(
51                         'FRAME_SIZE' => $frame_size,
52                         'FRAME_BEGIN' => $frame_begin,
53                          'FRAME_END' => $frame_end,
54                          'GBOCSS' => LLGBO_PATH."css/llgbo_content_".$themestyle.".css" ), true); 
55
56                         
57        If (($conf['LLGBO_SETTINGS'] [5]  == 'true' )  /* title on frame */ 
58        and ($conf['LLGBO_SETTINGS'] [0]  == 'true' ) )// frame
59                 {  $template->append('llgbo', array(
60                                 'TITLE_FRAME_COLOR' => $conf['LLGBO_FRAME'][0],
61                                 'TITLE_FRAME' => $current['name'] ), true);
62                        $template->assign('SHOW_PICTURE_NAME_ON_TITLE' , false); 
63       
64                        }
65} // end frame
66?>
Note: See TracBrowser for help on using the repository browser.