Browse Source

Bootstrap adaptations

pull/2/head
Mark (ilosuna) 12 years ago
parent
commit
26edf98216
8 changed files with 99 additions and 75 deletions
  1. BIN
      cms/data/content.sqlite
  2. BIN
      cms/data/userdata.sqlite
  3. +0
    -1
      cms/includes/filemanager.inc.php
  4. +3
    -3
      cms/lang/english.admin.lang.php
  5. +1
    -1
      cms/lang/german.admin.lang.php
  6. +1
    -1
      cms/lang/spanish.admin.lang.php
  7. +74
    -55
      cms/templates/admin/subtemplates/filemanager_upload.inc.tpl
  8. +20
    -14
      cms/templates/subtemplates/search.inc.tpl

BIN
cms/data/content.sqlite View File


BIN
cms/data/userdata.sqlite View File


+ 0
- 1
cms/includes/filemanager.inc.php View File

@ -87,7 +87,6 @@ if(isset($_SESSION[$settings['session_prefix'].'user_id']))
// create thumbnail:
if(isset($_POST['create_thumbnail']) && $upload->isImage)
{
if($thumbnail_resize_xy=='x')
{
$thumbnail_x = $thumbnail_resize;


+ 3
- 3
cms/lang/english.admin.lang.php View File

@ -390,10 +390,10 @@ $lang['upload_file_link'] = 'Upload file';
$lang['upload_file_label'] = 'File:';
$lang['upload_directory_label'] = 'Upload to:';
$lang['overwrite_file'] = 'overwrite file with same name';
$lang['image_options'] = 'Options for images';
$lang['image_options'] = 'Images options';
$lang['upload_file_submit'] = 'Upload file';
$lang['filename_on_server'] = 'Filename on server:';
$lang['filename_server_same'] = '(blank if unchanged)';
$lang['filename_server_same'] = 'leave blank if unchanged';
$lang['upload_file_exists'] = 'There\'s already a file with this name';
$lang['error_no_file'] = 'No file to upload specified';
$lang['upload_ok'] = 'File successfully uploaded';
@ -407,7 +407,7 @@ $lang['manipulate_image'] = 'Modify image:';
$lang['resize'] = 'Resize:';
$lang['resize_width'] = 'width';
$lang['resize_height'] = 'height';
$lang['compression'] = 'Compression:';
$lang['compression'] = 'compression';
$lang['compression_jpg_only'] = '(only for JPG images)';
$lang['image_name_on_server'] = 'Image name on server:';
$lang['image_name_server_same'] = '(blank if unchanged)';


+ 1
- 1
cms/lang/german.admin.lang.php View File

@ -407,7 +407,7 @@ $lang['manipulate_image'] = 'Bild bearbeiten:';
$lang['resize'] = 'Größe ändern:';
$lang['resize_width'] = 'Breite';
$lang['resize_height'] = 'Höhe';
$lang['compression'] = 'Kompression:';
$lang['compression'] = 'Kompression';
$lang['compression_jpg_only'] = '(nur für JPG-Bilder)';
$lang['image_name_on_server'] = 'Bildname auf dem Server:';
$lang['image_name_server_same'] = '(leer, falls nicht geändert wird)';


+ 1
- 1
cms/lang/spanish.admin.lang.php View File

@ -410,7 +410,7 @@ $lang['manipulate_image'] = 'Modificar la imagen:';
$lang['resize'] = 'Cambiar de tamaño:';
$lang['resize_width'] = 'anchura';
$lang['resize_height'] = 'altura';
$lang['compression'] = 'Compresión:';
$lang['compression'] = 'compresión';
$lang['compression_jpg_only'] = '(sólo para imágenes JPG)';
$lang['image_name_on_server'] = 'Nombre de la imagen en el servidor:';
$lang['image_name_server_same'] = '(en blanco si desea mantener el mismo nombre)';


+ 74
- 55
cms/templates/admin/subtemplates/filemanager_upload.inc.tpl View File

@ -7,60 +7,79 @@
<?php include('errors.inc.tpl'); ?>
<form action="<?php echo basename($_SERVER['PHP_SELF']); ?>" method="post" enctype="multipart/form-data">
<div>
<input type="hidden" name="mode" value="filemanager" />
<input type="hidden" name="upload_file_submit" value="true">
<fieldset style="width:400px; border:1px solid #c0c0c0;"><legend style="font-size:11px;"><?php echo $lang['file_legend']; ?></legend>
<p style="margin-top:20px;"><?php echo $lang['upload_file_label']; ?><br />
<input type="file" name="file" size="25" /></p>
<p><?php echo $lang['upload_directory_label']; ?><br />
<select size="1" name="directory">
<option value="<?php echo $media_dir ?>"<?php if($directory==$media_dir) { ?> selected="selected"<?php } ?>><?php echo $media_dir ?></option>
<option value="<?php echo $file_dir ?>"<?php if($directory==$file_dir) { ?> selected="selected"<?php } ?>><?php echo $file_dir ?></option>
</select></p>
<p><?php echo $lang['filename_on_server']; ?><br />
<input type="text" name="file_name" value="<?php if(isset($file_name)) echo htmlspecialchars(stripslashes($file_name)); ?>" size="25" /> <span class="smallx"><?php echo $lang['filename_server_same']; ?></span></p>
<p><input id="overwrite_file" type="checkbox" name="overwrite_file" value="true"><label for="overwrite_file"><?php echo $lang['overwrite_file']; ?></label></p>
</fieldset>
<fieldset style="width:400px; margin-top:20px; border:1px solid #c0c0c0;"><legend style="font-size:11px;"><?php echo $lang['image_options']; ?></legend>
<table border="0">
<tr>
<td><input id="upload_mode_1" type="radio" name="upload_mode" value="1"<?php if(isset($upload_mode) && $upload_mode==1 || empty($upload_mode)) { ?> checked="checked"<?php } ?>></td>
<td><label for="upload_mode_1"><?php echo $lang['dont_manipulate_image']; ?></label></td>
</tr>
<tr>
<td><input id="upload_mode_2" type="radio" name="upload_mode" value="2"<?php if(isset($upload_mode) && $upload_mode==2) { ?> checked="checked"<?php } ?>></td>
<td><label for="upload_mode_2"><?php echo $lang['manipulate_image']; ?></label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><?php echo $lang['resize']; ?> <select name="resize_xy" size="1"><option value="x"<?php if((isset($resize_xy) && $resize_xy=='x') || (empty($resize_xy) && $settings['resize_xy']=='x')) { ?> selected="selected"<?php } ?>><?php echo $lang['resize_width']; ?></option>
<option value="y"<?php if((isset($resize_xy) && $resize_xy=='y') || (empty($resize_xy) && $settings['resize_xy']=='y')) { ?> selected="selected"<?php } ?>><?php echo $lang['resize_height']; ?></option></select> <input type="text" name="resize" value="<?php if(isset($resize)) echo intval($resize); else echo $settings['resize']; ?>" size="3" /> px</td>
<tr>
<tr>
<td>&nbsp;</td>
<td><?php echo $lang['compression']; ?> <input type="text" name="compression" value="<?php if(isset($compression)) echo intval($compression); else echo $settings['compression']; ?>" size="3" /> % <span class="smallx"><?php echo $lang['compression_jpg_only']; ?></span></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td><input id="create_thumbnail" type="checkbox" name="create_thumbnail" value="1"<?php if(isset($create_thumbnail) && $create_thumbnail==1) { ?> checked="checked"<?php } ?>></td>
<td><label for="create_thumbnail"><?php echo $lang['create_thumbnail']; ?></label></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><?php echo $lang['resize']; ?> <select name="thumbnail_resize_xy" size="1"><option value="x"<?php if((isset($thumbnail_resize_xy) && $thumbnail_resize_xy=='x') || (empty($thumbnail_resize_xy) && $settings['thumbnail_resize_xy']=='x')) { ?> selected="selected"<?php } ?>><?php echo $lang['resize_width']; ?></option>
<option value="y"<?php if((isset($thumbnail_resize_xy) && $thumbnail_resize_xy=='y') || (empty($thumbnail_resize_xy) && $settings['thumbnail_resize_xy']=='y')) { ?> selected="selected"<?php } ?>><?php echo $lang['resize_height']; ?></option></select> <input type="text" name="thumbnail_resize" value="<?php if(isset($thumbnail_resize)) echo intval($thumbnail_resize); else echo $settings['thumbnail_resize']; ?>" size="3" /> px</td>
<tr>
<tr>
<td>&nbsp;</td>
<td><?php echo $lang['compression']; ?> <input type="text" name="thumbnail_compression" value="<?php if(isset($thumbnail_compression)) echo intval($thumbnail_compression); else echo $settings['thumbnail_compression']; ?>" size="3" /> % <span class="smallx"><?php echo $lang['compression_jpg_only']; ?></span></td>
</tr>
</table>
</fieldset>
<div>
<input type="hidden" name="mode" value="filemanager" />
<input type="hidden" name="upload_file_submit" value="true">
<fieldset>
<legend><?php echo $lang['file_legend']; ?></legend>
<div class="form-group">
<label for="file" class="sr-only"><?php echo $lang['upload_file_label']; ?></label>
<input id="file" type="file" name="file">
</div>
<div class="form-group">
<label for="directory"><?php echo $lang['upload_directory_label']; ?></label>
<select id="directory" class="form-control form-control-default" name="directory" size="1">
<option value="<?php echo $media_dir ?>"<?php if($directory==$media_dir) { ?> selected="selected"<?php } ?>><?php echo $media_dir ?></option>
<option value="<?php echo $file_dir ?>"<?php if($directory==$file_dir) { ?> selected="selected"<?php } ?>><?php echo $file_dir ?></option>
</select>
</div>
<div class="form-group">
<label for="file_name"><?php echo $lang['filename_on_server']; ?></label>
<input id="file_name" class="form-control form-control-default" type="text" name="file_name" value="<?php if(isset($file_name)) echo htmlspecialchars(stripslashes($file_name)); ?>" placeholder="<?php echo $lang['filename_server_same']; ?>">
</div>
<div class="checkbox">
<label>
<input id="overwrite_file" type="checkbox" name="overwrite_file" value="true"> <?php echo $lang['overwrite_file']; ?>
</label>
</div>
</fieldset>
<fieldset>
<legend><?php echo $lang['image_options']; ?></legend>
<div class="form-group">
<div class="radio">
<label>
<input id="upload_mode_1" type="radio" name="upload_mode" value="1"<?php if(isset($upload_mode) && $upload_mode==1 || empty($upload_mode)) { ?> checked="checked"<?php } ?>>
<?php echo $lang['dont_manipulate_image']; ?>
</label>
</div>
<div class="radio">
<label>
<input id="upload_mode_2" type="radio" name="upload_mode" value="2"<?php if(isset($upload_mode) && $upload_mode==2) { ?> checked="checked"<?php } ?>>
<?php echo $lang['manipulate_image']; ?>
</label><br />
<input id="resize" class="form-control form-control-small form-control-inline" type="text" name="resize" value="<?php if(isset($resize)) echo intval($resize); else echo $settings['resize']; ?>" size="3" /> px
<select class="form-control form-control-small form-control-inline" name="resize_xy" size="1">
<option value="x"<?php if((isset($resize_xy) && $resize_xy=='x') || (empty($resize_xy) && $settings['resize_xy']=='x')) { ?> selected="selected"<?php } ?>><?php echo $lang['resize_width']; ?></option>
<option value="y"<?php if((isset($resize_xy) && $resize_xy=='y') || (empty($resize_xy) && $settings['resize_xy']=='y')) { ?> selected="selected"<?php } ?>><?php echo $lang['resize_height']; ?></option>
</select>,
<input id="compression" class="form-control form-control-small form-control-inline" type="text" name="compression" value="<?php if(isset($compression)) echo intval($compression); else echo $settings['compression']; ?>" size="3" /> % <?php echo $lang['compression']; ?> <?php echo $lang['compression_jpg_only']; ?>
</div>
</div>
<div class="checkbox">
<label>
<input id="create_thumbnail" type="checkbox" name="create_thumbnail" value="1"<?php if(isset($create_thumbnail) && $create_thumbnail==1) { ?> checked="checked"<?php } ?>> <?php echo $lang['create_thumbnail']; ?>
</label><br />
<input id="thumbnail_resize" class="form-control form-control-small form-control-inline" type="text" name="thumbnail_resize" value="<?php if(isset($thumbnail_resize)) echo intval($thumbnail_resize); else echo $settings['thumbnail_resize']; ?>" size="3" /> px
<select class="form-control form-control-small form-control-inline" name="thumbnail_resize_xy" size="1">
<option value="x"<?php if((isset($thumbnail_resize_xy) && $thumbnail_resize_xy=='x') || (empty($thumbnail_resize_xy) && $settings['thumbnail_resize_xy']=='x')) { ?> selected="selected"<?php } ?>><?php echo $lang['resize_width']; ?></option>
<option value="y"<?php if((isset($thumbnail_resize_xy) && $thumbnail_resize_xy=='y') || (empty($thumbnail_resize_xy) && $settings['thumbnail_resize_xy']=='y')) { ?> selected="selected"<?php } ?>><?php echo $lang['resize_height']; ?></option>
</select>,
<input id="thumbnail_compression" class="form-control form-control-small form-control-inline" type="text" name="thumbnail_compression" value="<?php if(isset($thumbnail_compression)) echo intval($thumbnail_compression); else echo $settings['thumbnail_compression']; ?>" size="3" /> % <?php echo $lang['compression']; ?> <?php echo $lang['compression_jpg_only']; ?>
</div>
</fieldset>
<button class="btn btn-primary" type="submit"><span class="glyphicon glyphicon-upload"></span> <?php echo $lang['upload_file_submit']; ?></button>
<div class="form-group">
<br /><button class="btn btn-primary btn-lg" type="submit"><span class="glyphicon glyphicon-upload"></span> <?php echo $lang['upload_file_submit']; ?></button>
</div>
</div>
</form>
</div>
</form>

+ 20
- 14
cms/templates/subtemplates/search.inc.tpl View File

@ -1,28 +1,34 @@
<form action="<?php echo BASE_URL.PAGE; ?>" method="post">
<p><input type="text" name="q" value="<?php if(isset($q)) echo $q; ?>" size="30" maxlength="200" /> <input type="submit" name="" value="<?php echo $lang['search_submit']; ?>" /></p>
<div class="input-group">
<input class="form-control" type="text" name="q">
<span class="input-group-btn">
<button class="btn btn-primary" type="submit"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</form>
<?php if(isset($results)): ?>
<p><strong><?php echo $lang['search_number_of_results']; ?></strong>
<p style="margin-top:20px;"><strong><?php echo $lang['search_number_of_results']; ?></strong>
<ul id="search">
<?php foreach($results as $result): ?>
<li><a href="<?php echo BASE_URL.$result['page']; ?>"><?php echo $result['title']; ?></a><?php if($result['type']==1): ?> <span class="smallx">- <?php echo $lang['search_photo']; ?></span><?php endif; ?><?php if($result['description']): ?> <span class="smallx">- <?php echo $result['description']; ?></span><?php endif; ?></li>
<?php endforeach; ?>
</ul>
<?php if($pagination): ?>
<p class="pagination"><?php echo $lang['pagination']; ?> [
<?php if($pagination['previous']): ?> <a href="<?php echo BASE_URL . PAGE; ?>,,<?php echo $q_encoded; if($pagination['previous']>1): ?>,<?php echo $pagination['previous']; endif; ?>">&laquo;</a> <?php endif; ?>
<?php foreach($pagination['items'] as $item): ?>
<?php if(empty($item)): ?> ..<?php elseif($item==$pagination['current']): ?> <span class="current"><?php echo $item; ?></span><?php else: ?> <a href="<?php echo BASE_URL . PAGE; ?>,,<?php echo $q_encoded; if($item>1): ?>,<?php echo $item; endif; ?>"><?php echo $item; ?></a><?php endif; ?>
<?php endforeach; ?>
<?php if($pagination['next']): ?> <a href="<?php echo BASE_URL . PAGE; ?>,,<?php echo $q_encoded; ?>,<?php echo $pagination['next']; ?>">&raquo;</a><?php endif; ?>
<p class="pagination"><?php echo $lang['pagination']; ?> [
<?php if($pagination['previous']): ?> <a href="<?php echo BASE_URL . PAGE; ?>,,<?php echo $q_encoded; if($pagination['previous']>1): ?>,<?php echo $pagination['previous']; endif; ?>">&laquo;</a> <?php endif; ?>
<?php foreach($pagination['items'] as $item): ?>
<?php if(empty($item)): ?> ..<?php elseif($item==$pagination['current']): ?> <span class="current"><?php echo $item; ?></span><?php else: ?> <a href="<?php echo BASE_URL . PAGE; ?>,,<?php echo $q_encoded; if($item>1): ?>,<?php echo $item; endif; ?>"><?php echo $item; ?></a><?php endif; ?>
<?php endforeach; ?>
<?php if($pagination['next']): ?> <a href="<?php echo BASE_URL . PAGE; ?>,,<?php echo $q_encoded; ?>,<?php echo $pagination['next']; ?>">&raquo;</a><?php endif; ?>
]</p>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<?php if(isset($q) && empty($results)): ?>
<p><em><?php echo $lang['search_no_results']; ?></em></p>
<?php endif; ?>
<?php endif; ?>

Loading…
Cancel
Save