first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
class stSocialLinksBackendActions extends sfActions
{
public function executeIndex()
{
$i18n = $this->getContext()->getI18N();
$this->config = stConfig::getInstance('stSocialLinksBackend');
$this->config->setCulture($this->getRequestParameter('culture', stLanguage::getOptLanguage()));
if ($this->getRequest()->getMethod() == sfRequest::POST)
{
$this->config->set('enable', $this->getRequestParameter('sociallinks[enable]'));
$this->config->set('facebook', $this->getRequestParameter('sociallinks[facebook]'), true);
$this->config->set('twitter', $this->getRequestParameter('sociallinks[twitter]'), true);
$this->config->set('youtube', $this->getRequestParameter('sociallinks[youtube]'), true);
$this->config->set('google', null);
$this->config->set('instagram', $this->getRequestParameter('sociallinks[instagram]'), true);
$this->config->set('pinterest', $this->getRequestParameter('sociallinks[pinterest]'), true);
$this->config->set('allegro', $this->getRequestParameter('sociallinks[allegro]'), true);
$this->config->set('newsletter', $this->getRequestParameter('sociallinks[newsletter]'));
$this->config->save();
stFastCacheManager::clearCache();
$this->setFlash('notice', $i18n->__('Twoje zmiany zostały zapisane', null, 'stAdminGeneratorPlugin'));
$this->redirect('stSocialLinksBackend/index?culture=' . $this->getRequestParameter('culture', stLanguage::getOptLanguage()));
}
$this->config->load();
}
}

View File

@@ -0,0 +1,13 @@
<?php
class stSocialLinksBackendComponents extends sfComponents
{
public function executeListMenu()
{
}
}
?>

View File

@@ -0,0 +1,19 @@
<div class="list-menu">
<ul>
<li class="selected">
<?php echo link_to(__('Konfiguracja'),'stSocialLinksBackend/index')?>
</li>
<li>
<?php if (sfContext::getInstance()->getUser()->getCulture() == 'pl_PL'): ?>
<a href="https://www.sote.pl/docs/linki-spolecznosciowe" target="_blank"><?php echo __('Dokumentacja'); ?></a>
<?php else: ?>
<a href="https://www.soteshop.com/docs/social_links" target="_blank"><?php echo __('Documentation'); ?></a>
<?php endif; ?>
</li>
</ul>
</div>
<div class="clr"></div>

View File

@@ -0,0 +1,109 @@
<?php use_helper('I18N', 'stAdminGenerator', 'stJQueryTools') ?>
<?php echo st_get_admin_head('stSocialLinksPlugin', __('Konfiguracja'), array('culture' => $config->getCulture()), array('stAddThisPlugin')) ?>
<?php st_view_slot_start('application-menu') ?>
<?php st_include_component('stSocialLinksBackend', 'listMenu') ?>
<?php st_view_slot_end() ?>
<?php // use_stylesheet('backend/stSocialLinksPlugin.css'); ?>
<?php echo form_tag('stSocialLinksBackend/index?culture='.$config->getCulture(), array('id' => 'sf_admin_config_form', 'name' => 'sf_admin_config_form', 'class' => 'admin_form')) ?>
<?php st_include_partial('stAdminGenerator/message', array('i18n_catalogue' => 'stLukasBackend'));?>
<fieldset>
<div class="content">
<div class="row">
<label><?php echo __('Aktywuj');?></label>
<div class="field">
<?php echo st_admin_checkbox_tag('sociallinks[enable]',true,$config->get('enable')) ?>
</div>
<br class="st_clear_all" />
</div>
<div class="row">
<label><?php echo __('Facebook');?> <img style="margin: -5px 0px;"style="margin: -5px 0px;" src="/images/backend/stSocialLinksPlugin/fb.png" width="24" height="24" class="label_image" /></label>
<div class="field">
<?php echo input_tag("sociallinks[facebook]", $config->get('facebook', null, true),array("size"=>"60px"))?>
</div>
<br class="st_clear_all" />
</div>
<div class="row">
<label><?php echo __('Twitter');?> <img style="margin: -5px 0px;"src="/images/backend/stSocialLinksPlugin/tweet.png" width="24" height="24" class="label_image" /></label>
<div class="field">
<?php echo input_tag("sociallinks[twitter]", $config->get('twitter', null, true),array("size"=>"60px"))?>
</div>
<br class="st_clear_all" />
</div>
<div class="row">
<label><?php echo __('Youtube');?> <img style="margin: -5px 0px;"src="/images/backend/stSocialLinksPlugin/yt.png" width="24" height="24" class="label_image" /></label>
<div class="field">
<?php echo input_tag("sociallinks[youtube]", $config->get('youtube', null, true),array("size"=>"60px"))?>
</div>
<br class="st_clear_all" />
</div>
<div class="row">
<label>
<?php echo __('Instagram');?> <img style="margin: -5px 0px;"src="/images/backend/stSocialLinksPlugin/instagram.png" width="24" height="24" class="label_image" />
</label>
<div class="field">
<?php echo input_tag("sociallinks[instagram]", $config->get('instagram', null, true),array("size"=>"60px"))?>
<br class="st_clear_all" />
</div>
</div>
<div class="row">
<label>
<?php echo __('Pinterest');?> <img style="margin: -5px 0px;"src="/images/backend/stSocialLinksPlugin/pinterest.png" width="24" height="24" class="label_image" />
</label>
<div class="field">
<?php echo input_tag("sociallinks[pinterest]", $config->get('pinterest', null, true),array("size"=>"60px"))?>
<br class="st_clear_all" />
</div>
</div>
<div class="row">
<label>
<?php echo __('Allegro');?>
<img style="margin: -5px 0px;"src="/images/backend/stSocialLinksPlugin/allegro.png" width="24" height="24" class="label_image" />
</label>
<div class="field">
<?php echo input_tag("sociallinks[allegro]", $config->get('allegro', null, true),array("size"=>"60px"))?>
<br class="st_clear_all" />
</div>
</div>
<div class="row">
<label>
<?php echo __('Newsletter');?>
<img style="margin: -5px 0px;"src="/images/backend/stSocialLinksPlugin/newsletter.png" width="24" height="24" class="label_image" />
</label>
<div class="field">
<?php echo st_admin_checkbox_tag('sociallinks[newsletter]',true,$config->get('newsletter')) ?>
<br class="st_clear_all" />
</div>
</div>
</div>
</fieldset>
<br class="st_clear_all" />
<div id="edit_actions">
<?php echo st_get_admin_actions_head() ?>
<?php echo st_get_admin_action('save', __('Zapisz', null, 'stAdminGeneratorPlugin'), null, array('name' => 'save')) ?>
<?php echo st_get_admin_actions_foot() ?>
</div>
</form>
<script type="text/javascript">
jQuery(function($) {
$(document).ready(function() {
$('#edit_actions').stickyBox();
});
});
</script>
<br class="st_clear_all">
<?php echo st_get_admin_foot() ?>