Ignore:
Timestamp:
Jun 13, 2011, 10:54:28 PM (13 years ago)
Author:
nikrou
Message:

Remove dependency to swfObject
Allow admin to use animation in main menu

Location:
extensions/pwgCumulus/template
Files:
3 added
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • extensions/pwgCumulus/template/admin.tpl

    r10991 r11344  
    11{combine_css path="$PWG_CUMULUS_PLUGIN_CSS/admin.css"}
    2 {combine_css path="$PWG_CUMULUS_PLUGIN_CSS/colorpicker.css"}
    3 
    4 {combine_script id="colorpicker" require="jquery" path="$PWG_CUMULUS_PLUGIN_JS/colorpicker.js"}
    5 {footer_script require="colorpicker"}{literal}
    6 $(function() {
    7 $('input.pwg-picker')
    8   .each(function() {
    9       if ($(this).val() !== undefined) {
    10         if ($(this).val().indexOf('#',0)==-1) {
    11            $(this).css('background-color', '#'+$(this).val());
    12         } else {
    13            $(this).css('background-color', $(this).val());
    14         }
    15       }
    16     })
    17   .ColorPicker({
    18     onSubmit: function(hsb, hex, rgb, el) {
    19         $(el).val(hex);
    20         $(el).ColorPickerHide();
    21         $(el).css('background-color', '#'+hex);
    22       },
    23     onBeforeShow: function () {
    24         $(this).ColorPickerSetColor(this.value);
    25       }
    26 })
    27 .bind('keyup', function(){
    28         $(this).ColorPickerSetColor(this.value);
    29 });
    30 });
    31 {/literal}{/footer_script}
    322
    333<div class="titrePage">
     
    355</div>
    366
    37 <p>
    38 {'That plugin display tags using a flash movie that rotates them in 3D. It works like a regular tags cloud but in a more amazing and exciting way.'|@translate}
    39 </p>
    40 
    41 <p>
    42 {'You can choose that mode for tags default display mode by adding (or changing) in the configuration file'|@translate}  <strong>include/config_local.inc.php</strong> :<p>
    43 <pre>
    44 $conf['tags_default_display_mode'] = 'cumulus';
    45 </pre>
    46 
    47 <form method="post" action="" class="general">
    48   <fieldset>
    49     <legend>{'Animation width and height'|@translate}</legend>
    50     <p class="field">
    51       <label>{'Width'|@translate}
    52         <input type="text" name="pwg_cumulus_width" value="{$PWG_CUMULUS_WIDTH}">
    53       </label>
    54     </p>
    55     <p class="field">
    56       <label>{'Height'|@translate}
    57       <input type="text" name="pwg_cumulus_height" value="{$PWG_CUMULUS_HEIGHT}">
    58       </label>
    59     </p>
    60   </fieldset>
    61  
    62   <fieldset>
    63     <legend>{'Tags size'|@translate}</legend>
    64     <p class="field">
    65       <label>{'Coefficient'|@translate}
    66         <input type="text" name="pwg_cumulus_coeff" value="{$PWG_CUMULUS_COEFF}">
    67       </label>     
    68     </p>
    69   </fieldset>
    70  
    71   <fieldset>
    72     <legend>{'Animation colors'|@translate}</legend>
    73     <div id="picker" style="float: right;"></div>
    74     <p class="field">
    75       <label>{'Color 1'|@translate}
    76         <input class="pwg-picker" type="text" name="pwg_cumulus_color1" value="{$PWG_CUMULUS_COLOR1}">
    77       </label>     
    78     </p>
    79     <p class="field">
    80     <label>{'Color 2'|@translate}
    81       <input class="pwg-picker" type="text" name="pwg_cumulus_color2" value="{$PWG_CUMULUS_COLOR2}">
    82     </label>     
    83     </p>
    84     <p class="field">
    85       <label>{'Mouseover color'|@translate}
    86         <input class="pwg-picker" type="text" name="pwg_cumulus_hicolor" value="{$PWG_CUMULUS_HICOLOR}">
    87       </label>     
    88     </p>
    89   </fieldset>
    90   <p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
    91 </form>
     7{include file="$PWG_CUMULUS_TAB_ACTION"}
  • extensions/pwgCumulus/template/admin_tags.tpl

    r11226 r11344  
    1 {combine_css path="$PWG_CUMULUS_PLUGIN_CSS/admin.css"}
    21{combine_css path="$PWG_CUMULUS_PLUGIN_CSS/colorpicker.css"}
    32
    43{combine_script id="colorpicker" require="jquery" path="$PWG_CUMULUS_PLUGIN_JS/colorpicker.js"}
    5 {footer_script require="colorpicker"}{literal}
    6 $(function() {
    7 $('input.pwg-picker')
    8   .each(function() {
    9       if ($(this).val() !== undefined) {
    10         if ($(this).val().indexOf('#',0)==-1) {
    11            $(this).css('background-color', '#'+$(this).val());
    12         } else {
    13            $(this).css('background-color', $(this).val());
    14         }
    15       }
    16     })
    17   .ColorPicker({
    18     onSubmit: function(hsb, hex, rgb, el) {
    19         $(el).val(hex);
    20         $(el).ColorPickerHide();
    21         $(el).css('background-color', '#'+hex);
    22       },
    23     onBeforeShow: function () {
    24         $(this).ColorPickerSetColor(this.value);
    25       }
    26 })
    27 .bind('keyup', function(){
    28         $(this).ColorPickerSetColor(this.value);
    29 });
    30 });
    31 {/literal}{/footer_script}
     4{combine_script id="colorpicker.instance" require="colorpicker" path="$PWG_CUMULUS_PLUGIN_JS/colorpicker.instance.js"}
    325
    33 <div class="titrePage">
    34   <h2>{'Cumulus Tags Cloud Plugin'|@translate}</h2>
    35 </div>
    36 
    37 <p>
    38 {'That plugin display tags using a flash movie that rotates them in 3D. It works like a regular tags cloud but in a more amazing and exciting way.'|@translate}
    39 </p>
    40 
    41 <p>
    42 {'You can choose that mode for tags default display mode by adding (or changing) in the configuration file'|@translate}  <strong>include/config_local.inc.php</strong> :<p>
    43 <pre>
    44 $conf['tags_default_display_mode'] = 'cumulus';
    45 </pre>
     6<p>{'Animation configuration : size, tags colors, tags size'|@translate}</p>
    467
    478<form method="post" action="" class="general">
     
    7233    <legend>{'Animation colors'|@translate}</legend>
    7334    <div id="picker" style="float: right;"></div>
     35   
     36    <p class="field">
     37      <label>{'Transparent mode for background'|@translate}
     38        <input type="checkbox" id="pwg_cumulus_mode_transparent" name="pwg_cumulus_mode_transparent" value="1"
     39               {if $PWG_CUMULUS_MODE_TRANSPARENT} checked="checked"{/if}>
     40      </label>
     41      <span class="info">({'Check the checkbox to use transparent mode for background'|@translate})</span>
     42    </p>
     43    <p class="field" id="pwg_cumulus_p_bgcolor">
     44      <label>{'Background color'|@translate}
     45        <input class="pwg-picker" type="text" name="pwg_cumulus_bgcolor" value="{$PWG_CUMULUS_BGCOLOR}">
     46      </label>     
     47    </p>
    7448    <p class="field">
    7549      <label>{'Color 1'|@translate}
     
    9064  <p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
    9165</form>
     66
  • extensions/pwgCumulus/template/tags.tpl

    r10954 r11344  
    33  <div class="titrePage">
    44    <ul class="categoryActions">
    5       {if $display_mode == 'letters'}
    6       <li>*
     5      {if $display_mode != 'cloud'}
     6      <li>
    77        <a href="{$U_CLOUD}" title="{'show tag cloud'|@translate}" class="pwg-state-default pwg-button">
    88          <span class="pwg-icon pwg-icon-cloud">&nbsp;</span><span class="pwg-button-text">{'cloud'|@translate}</span>
     
    1919      {/if}
    2020
    21       {if $display_mode == 'cloud'}
     21      {if $display_mode != 'letters'}
    2222      <li>
    2323        <a href="{$U_LETTERS}" title="{'group by letters'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     
    4545
    4646  {if $display_mode == 'cumulus'}
    47   <div id="flashcontent">This will be shown to users with no Flash or Javascript.</div>
    48 
    49   <script type="text/javascript">
    50     var so = new SWFObject("{$PWG_CUMULUS_SWF}/tagcloud.swf", "tagcloud", "{$PWG_CUMULUS_WIDTH}", "{$PWG_CUMULUS_HEIGHT}", "7", "#FFFFFF");
    51     so.addParam("wmode", "transparent");
    52     so.addVariable("tcolor", "{$PWG_CUMULUS_COLOR1}");
    53     so.addVariable("tcolor2", "{$PWG_CUMULUS_COLOR2}");
    54     so.addVariable("hicolor", "{$PWG_CUMULUS_HICOLOR}");
    55     so.addVariable("mode", "tags");
    56     so.addVariable("distr", "true");
    57     so.addVariable("tspeed", "100");
    58     so.addVariable("tagcloud",
    59     "<tags>{foreach from=$tags item=tag}<a href='{$tag.URL}' style='{$tag.size}pt'>{$tag.display_name}</a>{/foreach}</tags>");
    60     so.write("flashcontent");
    61   </script>
     47  <object data="{$PWG_CUMULUS_SWF}/tagcloud.swf" width="{$PWG_CUMULUS_WIDTH}" height="{$PWG_CUMULUS_HEIGHT}" type="application/x-shockwave-flash">
     48    <param name="movie" value="{$PWG_CUMULUS_SWF}/tagcloud.swf">
     49    <param name="allowScriptAccess" value="sameDomain">
     50    <param name="quality" value="high">
     51    {if ($PWG_CUMULUS_MODE_TRANSPARENT)}
     52    <param name="wmode" value="transparent">
     53    {else}
     54    <param name="bgcolor" value="#{$PWG_CUMULUS_BGCOLOR}">
     55    {/if}
     56    <param name="flashvars" value="mode=tags&tcolor={$PWG_CUMULUS_COLOR1}&tcolor2={$PWG_CUMULUS_COLOR2}&hicolor={$PWG_CUMULUS_HICOLOR}&tspeed=100&distr=true&tagcloud=<tags>{foreach from=$tags item=tag}<a href='{$tag.URL}' style='{$tag.size}pt'>{$tag.display_name}</a>{/foreach}</tags>">
     57  </object>
    6258  {/if}
    6359
Note: See TracChangeset for help on using the changeset viewer.