Changeset 4482


Ignore:
Timestamp:
Dec 13, 2009, 9:29:39 PM (14 years ago)
Author:
vdigital
Message:

[Update] For Juza - Minor changes for plg

Pendings:

  • Configuration (On going, just first steps have been done)
  • Exception management
  • Menubar
Location:
extensions/Juza
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/Juza/js/juzascript.js

    r4474 r4482  
    66    $(this).addClass('bigImg').attr('src', $(this).attr('src').replace('thumbnail/TN-', ''));
    77  });
     8        $('.thumbnailCategories li').addClass('Juza-cat');
     9        $('.description li').removeClass('Juza-cat');
     10  $nav = $('#content .navigationBar').html();
     11        if ($nav == null) $nav = '';
     12        $('#content .navigationBar').hide();
     13        $('div.titrePage h2').after('<div id="Juza-Thumbs"></div>'+$nav);
     14  $reltag = $('#menubar #mbTags').html();
     15        if ($reltag == null) $reltag = '';
     16        $reltag = '<div id="relTag">' + $reltag + '</div>';
     17        $('#copyright').before('<div id="jquery_local_img">' + $reltag + '</div>');
     18  $('span.wrap2 a img').click(function() {
     19    $scr = $(this).attr('src').replace('thumbnail/TN-', '');
     20    $href = $(this).parent('a').attr('href');
     21    $alt = $(this).attr('alt');
     22    $(this).parent('h3 a').attr('href', '#Juza-Thumbs');
     23    $temp = $href.substr($href.indexOf('/')+1);
     24    $temp = $temp.substr(0,$temp.indexOf('/'));
     25    $title = $('#ix-desc .Thumb-'+$temp).attr('title');
     26    $('#jquery_local_img').fadeOut("slow").replaceWith('<div id="jquery_local_img"><img usemap="#picturetop" title="'+$title+'" alt="'+$alt+'" src="'+$scr+'"/><map name="picturetop"><area href="#" coords="0,0,1024,300" shape="rect" title="Index"/><area href="'+$href+'" coords="0,301,1024,600" shape="rect" title="'+$title+'"/></map><br/>'+ $title +' - <a href="#Juza-Thumbs"><em>Index</em></a>' + $reltag + '</div>').fadeIn("slow");
     27          $(this).hover(function() { },function() {
     28            $(this).parent('h3 a').eq(0).attr('href', $href);
     29          });
     30});
     31
     32        if ($reltag == '') $('#jquery_local_img').hide();
    833  $('.thumbnailCategory .description h3 a').each(function() {
    934    $cat_url = $(this).attr('href');
    1035    $cat_tree = $('#menubar #mbCategories dd ul li a[href="'+$cat_url+'"]').next('.menuInfoCatByChild').next().html();
    1136    if ($cat_tree == null) $cat_tree = '';
    12     $(this).parent('h3').next('.text').after('<ul>'+$cat_tree+'</ul>');
     37    $(this).parent('h3').eq(0).next('.text').after('<ul>'+$cat_tree+'</ul>');
    1338  });
    14         $('.thumbnailCategories li').addClass('Juza-cat');
    15         $('.description li').removeClass('Juza-cat');
    16   $reltag = $('#menubar #mbTags').html();
    17         if ($reltag == null) $reltag = '';
    18         $reltag = '<div id="relTag">' + $reltag + '</div>';
    19         $('#copyright').before('<div id="jquery_local_img">' + $reltag + '</div>');
    20   $reltag = $('#content .navigationBar').html();
    21         if ($reltag == null) $reltag = '';
    22         $('#content .navigationBar').css('display','none');
    23         $('div.titrePage h2').after('<div id="Juza-Thumbs"></div>'+$reltag);
    24   $('span.wrap2 a img').click(function() {
    25     $scr = $(this).attr('src').replace('thumbnail/TN-', '');
    26     $href = $(this).parent('a').attr('href');
    27     $alt = $(this).attr('alt');
    28     $(this).parent('a').attr('href', '#Juza-Thumbs');
    29     $temp = $href.substr($href.indexOf('/')+1);
    30     $temp = $temp.substr(0,$temp.indexOf('/'));
    31     $title = $('#ix-desc .Thumb-'+$temp).attr('title');
    32     $('#jquery_local_img').fadeOut("slow").replaceWith('<div id="jquery_local_img"><img usemap="#picturetop" title="'+$title+'" alt="'+$alt+'" src="'+$scr+'"/><map name="picturetop"><area href="#" coords="0,0,1024,300" shape="rect" title="Index"/><area href="'+$href+'" coords="0,301,1024,600" shape="rect" title="'+$title+'"/></map><br/>'+ $title +' - <a href="#Juza-Thumbs"><em>Index</em></a>' + $reltag + '</div>').fadeIn("slow");
    33   });
    34   $('span.wrap2 a img').hover(function() { },function() {
    35     $(this).parent('a').attr('href', $href);
    36   });
    37         if ($reltag == '') $('#jquery_local_img').hide();
    3839});
  • extensions/Juza/script.tpl

    r4461 r4482  
    2222</div>
    2323{/if}
     24{php}
     25  global $template;
     26  if ( is_admin() )
     27    $template->append('footer_elements', ' - Juza Theme <a title="Juza Configuration" href="index.php?&Juza_config=true">' . l10n('Configuration') .'</a>');
     28  if ( isset($_GET['Juza_config']) ) $this->assign('Juza_config', true);
     29{/php}
     30{if isset($Juza_config)}
     31<form id="Juza_config" method="post" class="properties" action="index.php?&Juza_config=true&Juza_viewed=true">
     32<fieldset id="Juza_config_fs">
     33  <ul>
     34    <li>
     35      <label>
     36        <span class="property">{'Activate Juza handlers'|@translate}</span>
     37        <input type="checkbox" name="Juza_handlers" {$Juza_handlers} />
     38        <span class="range">{'Browser refresh is needed on new value'|@translate}</span>
     39     </label>
     40    </li>
     41    <li>
     42      <span class="property">
     43        <label for="Width">{'Index picture max-width'|@translate}</label>
     44      </span>
     45      <input type="text" size="4" maxlength="4" name="Juza_width" id="Juza_width" value="{$Juza_width}" />
     46      <span class="range">{'[300:885]'|@translate}</span>
     47    </li>
     48    <li>
     49      <span class="property">
     50        <label for="Height">{'Index picture cropping-height'|@translate}</label>
     51      </span>
     52      <input type="text" size="4" maxlength="4" name="Juza_height" id="Juza_height" value="{$Juza_height}" />
     53       <span class="range">{'[110:400]'|@translate}</span>
     54   </li>
     55    <li>
     56      <span class="property">
     57        <label for="Shift">{'Index picture top-shift'|@translate}</label>
     58      </span>
     59      <input type="text" size="4" maxlength="4" name="Juza_shift" id="Juza_height" value="{$Juza_shift}" />
     60      <span class="range">{'[-320:0]'|@translate}</span>
     61    </li>
     62    <li>
     63      <label>
     64        <span class="property">{'Auto cropping and shifting'|@translate}</span>
     65        <input type="checkbox" name="Juza_Auto_CS" {$Juza_Auto_CS} />
     66      </label>
     67    </li>
     68  </ul>
     69</fieldset>
     70  <p>
     71    <input class="submit" type="submit" name="Juza_submit" value="{'Submit'|@translate}">
     72  </p>
     73</form>
     74{/if}
  • extensions/Juza/theme.css

    r4474 r4482  
    2121
    2222.content div.titrePage ul.categoryActions { display: none; }
    23 .content div.thumbnailCategory div.description { height:155px !important; position:relative; width:100%; z-index:10; top:-252px; overflow: visible; }
    24 .bigImg { left:265px; position:relative; top:-160px; width:885px !important; }
     23.content div.thumbnailCategory div.description { height:565px !important; position:relative; width:100%; z-index:10; top:-252px; overflow: hidden; }
     24.bigImg { position:relative; top:-160px; width:885px !important; }
    2525.content ul.thumbnails span, .content ul.thumbnails label, .content div.thumbnailCategory div.illustration { width:135px; }
    2626.content { margin:0 3em !important; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:10pt; }
    2727div.illustration { overflow: hidden; }
    2828div.illustration img { border: 0; margin-left: 0px; }
    29 .maxIllustration a { max-height: 240px; height: 240px; overflow: hidden; display: block; position:relative; z-index:12; }
     29.maxIllustration a { max-height: 240px; height: 240px; overflow: hidden; display: block; position:relative; z-index:12; float:right; width:885px; }
    3030.maxIllustration { left:20px; margin-bottom:35px; max-width:100% !important; position:relative; top:30px; width:100% !important; }
    31 .content .thumbnailCategory { border: 0 solid #383838 !important; border-top-width: 0.5px !important; margin-bottom:15px; height:155px; min-height:280px; }
    32 .content div.thumbnailCategory div.description h3 { position:relative; top:10px; }
     31.content .thumbnailCategory { border: 0 solid #383838 !important; border-top-width: 0.5px !important; margin-bottom:15px; /* height:155px; min-height:280px;*/ }
     32.content div.thumbnailCategory div.description h3 { position:relative; top:10px; z-index:11; }
    3333.content div.thumbnailCategory div.description ul { margin: 10px 5px 5px 30px; }
    3434
    3535.content ul.thumbnailCategories li { width:100%; }
    36 .content ul.thumbnailCategories li.Juza-cat { max-height:295px; height:295px; }
     36.content ul.thumbnailCategories li.Juza-cat { margin:0 0 20px; height:295px; min-height:295px; }
     37
    3738a.home { position: absolute; left: 20px; top: 20px; font-size:9px; }
    3839.content ul.thumbnails span.wrap1 { background-color: #000 !important; width: 140px; height: 140px; min-width: 140px; min-height: 140px; max-width: 140px; max-height: 140px; margin:0 2px 2px 0; border: 1px solid #444; }
     
    4243.content ul.thumbnails span.wrap2 { -moz-border-radius: 0; border-radius: 0; }
    4344.content ul.thumbnails span.wrap2 img.thumbnail { margin:auto; border: 1px solid #111; }
    44 #jquery_local_img { text-align: center; margin-top: 5px; min-height: 850px; height: 850px; }
     45#jquery_local_img { text-align: center; margin-top: 5px; min-height: 600px; height: 600px; /* linked to Area Mapping */ }
    4546input[type="text"], input[type="password"], input[type="button"], input[type="submit"], input[type="reset"], input[type="file"] {
    4647  background-color:#D3D3D3 !important; }
     
    5455#imageToolBar  .randomButtons img[alt="slideshow"] { display: inline; }
    5556div.description div.text p.Nb_images { border-width: 0; }
    56 #copyright { margin-top: 200px; }
     57#Juza_config input[type="text"], #Juza_config input[type="checkbox"] { float:left; margin:6px auto auto 4px; }
     58#Juza_config input[type="submit"] { margin:10px auto 15px;  }
     59#Juza_config .range { text-align: left; float: left; margin-left: 10px; font-style:italic; }
     60#copyright { margin-top: 885px; }
    5761#copyright * { color: #383838; }
  • extensions/Juza/themeconf.inc.php

    r4474 r4482  
    11<?php
     2/*
     3Plugin Name: Juza
     4Version: 2.0.1
     5Description: Juza is an advanced theme of Piwigo
     6Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=auto
     7Author: Piwigo team
     8Author URI: http://www.vdigital.org
     9*/
     10define('JUZA_VER', '2.0.1');
     11define('JUZA_DIR' , basename(dirname(__FILE__)));
     12define('JUZA_PATH' , 'template/yoga/theme/' . JUZA_DIR . '/');
    213$themeconf = array(
    314  'template' => 'yoga',
    4   'theme' => 'Juza',
    5   'icon_dir' => 'template/yoga/theme/Juza/icon',
     15  'theme' => JUZA_DIR,
     16  'icon_dir' => JUZA_PATH . 'icon',
    617  'admin_icon_dir' => 'template/yoga/icon/admin',
    7   'mime_icon_dir' => 'template/yoga/theme/Juza/icon/mimetypes/',
    8   'local_head' => '
    9 <!--[if IE]>
    10   <link rel="stylesheet" href="template/yoga/theme/Juza/theme-ie.css" type="text/css">
    11 <![endif]-->
    12   ',
    13   'juza-handler' => create_function('$arg', 'global $template, $themeconf;
    14     $template->set_filenames(array("juza"=>"theme/Juza/script.tpl"));
    15     $template->parse("juza");
    16     return $arg;'),
     18  'mime_icon_dir' => JUZA_PATH . 'icon/mimetypes/',
     19  'local_head' => '',
    1720);
    18 global $user;
     21global $user, $conf;
    1922$user["expand"] = true; /* Forced to assign subcategory links inside each category on index page */
    20 add_event_handler('loc_after_page_header', $themeconf['juza-handler']);
     23if (!isset($conf['Juza_active'])) $conf['Juza_active'] = true; /* Missing = active */
     24
     25/* No handlers at all or Open ? */
     26if ($conf['enable_plugins'] and $conf['Juza_active']) {
     27  include_once(JUZA_PATH.'include/functions.inc.php');
     28  add_event_handler('loc_after_page_header', 'Juza_hook', 20);
     29  if (isset($_GET['Juza_config'])) {
     30    add_event_handler('loc_after_page_header', 'Juza_admin', 10);
     31  }
     32}
    2133?>
Note: See TracChangeset for help on using the changeset viewer.