first commit

This commit is contained in:
2024-12-17 13:43:22 +01:00
commit 8e6cd8b410
21292 changed files with 3514826 additions and 0 deletions

View File

@@ -0,0 +1,132 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file="helpers/form/form.tpl"}
{block name="input"}
{if $input.name == "tags"}
{if $languages|count > 1}
<div class="row">
{/if}
{foreach from=$languages item=language}
{literal}
<script type="text/javascript">
$().ready(function () {
var input_id = '{/literal}tags_{$language.id_lang}{literal}';
$('#'+input_id).tagify({delimiters: [13,44], addTagPrompt: '{/literal}{l s='Add tag' js=1}{literal}'});
$({/literal}'#{$table}{literal}_form').submit( function() {
$(this).find('#'+input_id).val($('#'+input_id).tagify('serialize'));
});
});
</script>
{/literal}
{if $languages|count > 1}
<div class="translatable-field lang-{$language.id_lang}">
<div class="col-lg-9">
{/if}
<input type="text" id="tags_{$language.id_lang}" class="tagify updateCurrentText" name="tags_{$language.id_lang}"
value="{$simpleblogpost->getTags($language.id_lang)}" />
{if $languages|count > 1}
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{$language.iso_code}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=language}
<li>
<a href="javascript:hideOtherLanguage({$language.id_lang|intval});">{$language.name}</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/if}
{/foreach}
{if $languages|count > 1}
</div>
{/if}
{elseif $input.name == "post_images"}
{include file="./post_images.tpl"}
{elseif $input.type == 'file' && $input.name == 'featured'}
{if isset($input.display_image) && $input.display_image}
{if isset($fields_value.featured) && $fields_value.featured}
<div id="image">
{$fields_value.featured}
<p align="center">{l s='File size'} {$fields_value.featured_size}kb</p>
<a class="btn btn-default" href="{$current}&{$identifier}={$form_id}&token={$token}&deleteFeatured=1">
<i class="icon-trash"></i> {l s='Delete' mod='ph_simpleblog'}
</a>
</div>
{/if}
{/if}
<input type="file" name="{$input.name}" {if isset($input.id)}id="{$input.id}"{/if} />
{elseif $input.type == 'file' && $input.name == 'cover'}
{if isset($input.display_image) && $input.display_image}
{if isset($fields_value.cover) && $fields_value.cover}
<div id="image">
{$fields_value.cover}
<p align="center">{l s='File size'} {$fields_value.cover_size}kb</p>
<a class="btn btn-default" href="{$current}&{$identifier}={$form_id}&token={$token}&deleteCover=1">
<i class="icon-trash"></i> {l s='Delete' mod='ph_simpleblog'}
</a>
</div>
{/if}
{/if}
<input type="file" name="{$input.name}" {if isset($input.id)}id="{$input.id}"{/if} />
{elseif $input.type == 'select_category'}
<select name="id_parent">
{$input.options.html}
</select>
{elseif $input.name == "link_rewrite"}
<script type="text/javascript">
{if isset($PS_ALLOW_ACCENTED_CHARS_URL) && $PS_ALLOW_ACCENTED_CHARS_URL}
var PS_ALLOW_ACCENTED_CHARS_URL = 1;
{else}
var PS_ALLOW_ACCENTED_CHARS_URL = 0;
{/if}
</script>
{$smarty.block.parent}
{else}
{$smarty.block.parent}
{/if}
{/block}
{block name="script"}
</script>
<script>
$(document).ready(function(){
hideOtherLanguage({$defaultFormLanguage});
$(".copyNiceUrl").live('keyup change',function(e){
if(!isArrowKey(e))
return copyNiceUrl();
});
});
function copyNiceUrl()
{
$('#link_rewrite_' + id_language).val(str2url($('#name_' + id_language).val().replace(/^[0-9]+\./, ''), 'UTF-8'));
}
</script>
{/block}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../../');
exit;

View File

@@ -0,0 +1,153 @@
{$image_uploader}
<table class="table tableDnD" id="imageTable">
<thead>
<tr class="nodrag nodrop">
<th class="fixed-width-lg"><span class="title_box">{l s='Image' mod='ph_simpleblog'}</span></th>
<th class="fixed-width-xs"><span class="title_box">{l s='Position' mod='ph_simpleblog'}</span></th>
<th></th>
</tr>
</thead>
<tbody id="imageList"></tbody>
</table>
<table id="lineType" style="display:none;">
<tr id="image_id">
<td>
<a href="{$module_dir}ph_simpleblog/galleries/image_filename.jpg" class="fancybox">
<img src="{$module_dir}ph_simpleblog/galleries/image_filename-thumb.jpg" alt="" title="" class="img-thumbnail" />
</a>
</td>
<td id="td_image_id" class="pointer dragHandle center positionImage">
image_position
</td>
<td>
<a href="#" class="delete_post_image pull-right btn btn-default">
<i class="icon-trash"></i> {l s='Delete this image' mod='ph_simpleblog'}
</a>
</td>
</tr>
</table>
<script type="text/javascript">
var upbutton = '{l s='Upload an image' mod='ph_simpleblog' js=1}';
var come_from = '{$table}';
var success_add = '{l s='The image has been successfully added.' mod='ph_simpleblog' js=1}';
var id_tmp = 0;
var ThickboxI18nImage = "{l s='Image' mod='ph_simpleblog' js=1}";
var ThickboxI18nOf = "{l s='of' mod='ph_simpleblog' js=1}";
var ThickboxI18nClose = "{l s='Close' mod='ph_simpleblog' js=1}";
var ThickboxI18nOrEscKey = "{l s='(or "Esc")' mod='ph_simpleblog' js=1}";
var ThickboxI18nNext = "{l s='Next >' mod='ph_simpleblog' js=1}";
var ThickboxI18nPrev = "{l s='< Previous' mod='ph_simpleblog' js=1}";
var tb_pathToImage = "../img/loadingAnimation.gif";
{literal}
function imageLine(id, filename, position)
{
line = $("#lineType").html();
line = line.replace(/image_id/g, id);
line = line.replace(/image_filename/g, filename);
line = line.replace(/image_position/g, position);
line = line.replace(/<tbody>/gi, "");
line = line.replace(/<\/tbody>/gi, "");
$("#imageList").append(line);
}
$(document).ready(function()
{
{/literal}
{foreach from=$images item=image}
imageLine({$image->id}, '{$image->image}', {$image->position});
{/foreach}
{literal}
var originalOrder = false;
$("#imageTable").tableDnD(
{ onDragStart: function(table, row) {
originalOrder = $.tableDnD.serialize();
},
onDrop: function(table, row) {
if (originalOrder != $.tableDnD.serialize()) {
current = $(row).attr("id");
stop = false;
image_up = "{";
$("#imageList").find("tr").each(function(i) {
$("#td_" + $(this).attr("id")).html(i + 1);
if (!stop || (i + 1) == 2)
image_up += '"' + $(this).attr("id") + '" : ' + (i + 1) + ',';
});
image_up = image_up.slice(0, -1);
image_up += "}";
updateImagePosition(image_up);
}
}
});
function afterDeletePostImage(data)
{
data = $.parseJSON(data);
if (data)
{
id = data.id;
if (data.status == 'ok'){
$("#" + id).remove();
}
refreshImagePositions($("#imageTable"));
showSuccessMessage(data.confirmations);
}
}
function refreshImagePositions(imageTable)
{
var reg = /_[0-9]$/g;
var up_reg = new RegExp("imgPosition=[0-9]+&");
imageTable.find("tbody tr").each(function(i,el) {
$(el).find("td.positionImage").html(i + 1);
});
imageTable.find("tr td.dragHandle a:hidden").show();
imageTable.find("tr td.dragHandle:first a:first").hide();
imageTable.find("tr td.dragHandle:last a:last").hide();
}
$('.delete_post_image').die().live('click', function(e)
{
e.preventDefault();
id = $(this).parent().parent().attr('id');
if (confirm("{/literal}{l s='Are you sure?' mod='ph_simpleblog' js=1}{literal}"))
doAdminAjax({
"action":"deletePostImage",
"id_simpleblog_post_image" : id,
"token" : "{/literal}{$token}{literal}",
"tab" : "AdminSimpleBlogPosts",
"ajax" : 1 }, afterDeletePostImage
);
});
function updateImagePosition(json)
{
doAdminAjax({
"action":"updateImagePosition",
"json":json,
"token" : "{/literal}{$token}{literal}",
"tab" : "AdminSimpleBlogPosts",
"ajax" : 1
});
}
function delQueue(id)
{
$("#img" + id).fadeOut("slow");
$("#img" + id).remove();
}
$('.fancybox').fancybox();
});
{/literal}
</script>

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../');
exit;

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../');
exit;

View File

@@ -0,0 +1,32 @@
{*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file="helpers/list/list_footer.tpl"}
{block name="after"}
{if Configuration::get('PH_BLOG_ADVERTISING')}
<iframe style="overflow:hidden;border:1px solid #f0f0f0;border-radius:10px;width:100%;height:175px;" src="https://api.prestahome.com/check_offer.php?from=ph_simpleblog" border="0"></iframe>
<small>{l s='You can disable this panel in the Settings' mod='ph_simpleblog'}</small>
{/if}
{/block}

View File

@@ -0,0 +1,35 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../');
exit;