Changeset 24010


Ignore:
Timestamp:
Jul 21, 2013, 2:13:42 PM (11 years ago)
Author:
mistic100
Message:

"Add banner" in album page make the user redirected to the same page after cropping

Location:
extensions/header_manager
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/header_manager/admin/add.php

    r22857 r24010  
    4040  pwg_set_session_var('added_banner', $_POST['picture_file']);
    4141 
    42   redirect(HEADER_MANAGER_ADMIN);
     42  if (!empty($_GET['redirect']))
     43  {
     44    redirect($_GET['redirect']);
     45  }
     46  else
     47  {
     48    redirect(HEADER_MANAGER_ADMIN);
     49  }
    4350}
    4451
     
    142149}
    143150
     151$template->assign('F_ACTION', HEADER_MANAGER_ADMIN . '-add' .(!empty($_GET['redirect']) ? '&redirect='.urlencode($_GET['redirect']) : ''));
     152
    144153$template->set_filename('header_manager', dirname(__FILE__).'/template/add.tpl');
    145154
  • extensions/header_manager/admin/album.php

    r22857 r24010  
    3030check_status(ACCESS_ADMINISTRATOR);
    3131
    32 check_input_parameter('cat_id', $_GET, false, PATTERN_ID);
     32check_input_parameter('cat_id', $_GET, false, PATTERN_ID, true);
    3333
    3434$admin_album_base_url = get_root_url().'admin.php?page=album-'.$_GET['cat_id'];
  • extensions/header_manager/admin/template/add.tpl

    r18711 r24010  
    3838{/footer_script}
    3939
    40 <form method="post" action="">
     40<form method="post" action="{$F_ACTION}">
    4141<fieldset>
    4242  <legend>{'Crop banner image'|@translate}</legend>
     
    8181{/literal}{/footer_script}
    8282
    83 <form method="post" action="" ENCTYPE="multipart/form-data">
     83<form method="post" action="{$F_ACTION}" ENCTYPE="multipart/form-data">
    8484  <fieldset>
    8585    <legend>{'Default banner size'|@translate}</legend>
     
    8787    <label>
    8888      {'Width'|@translate}:
    89       <input type="text" name="width" size="4" value="{$BANNER_WIDTH}">px
     89      <input type="text" name="width" size="4" value="{$BANNER_WIDTH}"> px
    9090    </label>
    9191    <br>
     
    9393    <label>
    9494      {'Height'|@translate}:
    95       <input type="text" name="height" size="4" value="{$BANNER_HEIGHT}">px
     95      <input type="text" name="height" size="4" value="{$BANNER_HEIGHT}"> px
    9696    </label>
    9797    <br>
     
    115115    <b>{'or choose a picture from the gallery'|@translate}</b>
    116116    <blockquote>
    117       {'Picture id.'|@translate} <a class="showInfo" title="{'The numeric identifier can be found on the picture edition page, near the thumbnail.'|@translate}">i</a>
     117      {'Picture id.'|@translate} <a class="icon-info-circled-1 showInfo" title="{'The numeric identifier can be found on the picture edition page, near the thumbnail.'|@translate}"></a>
    118118      <input type="text" name="picture_id" size="5">
    119119      <input type="submit" name="upload_gallery_image" value="{'Use'|@translate}" class="submit">
  • extensions/header_manager/admin/template/album.tpl

    r20169 r24010  
    2323    {/foreach}
    2424  {else}
    25     <p style="text-align:left;">
    26       {'No banner added yet'|@translate}<br>
    27       <a href="{$ADD_IMAGE_URL}">{'Add a banner'|@translate}</a>
    28     </p>
     25    <p style="text-align:left;">{'No banner added yet'|@translate}</p>
    2926  {/if}
     27 
     28  <p style="text-align:left;">
     29    <a href="{$ADD_IMAGE_URL}&redirect={$F_ACTION|urlencode}">{'Add a banner'|@translate}</a>
     30  </p>
    3031   
    3132  {if $banners}
  • extensions/header_manager/admin/template/style.css

    r20169 r24010  
    5252    }
    5353
    54 .showInfo {
    55   position:static;
    56   display:inline-block;
    57   padding:1px 6px;
    58   width:auto;
    59   font-size:0.8em;
    60 }
    61 
    6254#album_banners {
    6355  list-style:disc;
  • extensions/header_manager/main.inc.php

    r19841 r24010  
    44Version: auto
    55Description: Header Manager allows to simply manage gallery banners. You can upload a picture from your computer or use a picture already in the gallery.
    6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=608
     6Plugin URI: auto
    77Author: Mistic
    88Author URI: http://www.strangeplanet.fr
Note: See TracChangeset for help on using the changeset viewer.