Beispiel #1
0
 function &_getFormatter()
 {
     if (!isset($GLOBALS['artx_log_default_formatter'])) {
         Artx::load('Artx_Log_Formatter');
         $GLOBALS['artx_log_default_formatter'] = new Artx_Log_Formatter();
     }
     return $GLOBALS['artx_log_default_formatter'];
 }
Beispiel #2
0
 function onAfterDispatch()
 {
     if (class_exists('Artx', true)) {
         Artx::load("Artx_Page");
         if (isset(ArtxPage::$inlineScripts)) {
             ArtxPage::$inlineScripts[] = '<script type="text/javascript">if(typeof jQuery != "undefined") window.artxJQuery = jQuery;</script>';
         }
     }
 }
Beispiel #3
0
<?php

defined('_JEXEC') or die;
Artx::load("Artx_Content_ListItem");
class ArtxContentCategoryArticle extends ArtxContentListItem
{
    function __construct($component, $componentParams, $article, $articleParams)
    {
        parent::__construct($component, $componentParams, $article, $articleParams);
        $this->category = $this->_articleParams->get('show_category') ? $this->_article->category_title : '';
        $this->categoryLink = $this->_articleParams->get('link_category') ? JRoute::_(ContentHelperRoute::getCategoryRoute($this->_article->catid)) : '';
        $this->parentCategory = $this->_articleParams->get('show_parent_category') && $this->_article->parent_id != 1 ? $this->_article->parent_title : '';
        $this->parentCategoryLink = $this->_articleParams->get('link_parent_category') ? JRoute::_(ContentHelperRoute::getCategoryRoute($this->_article->parent_id)) : '';
    }
}
Beispiel #4
0
<?php

Artx::load('Artx_Data_CategoryMapper');
Artx::load('Artx_Data_ContentMapper');
Artx::load('Artx_Data_ExtensionMapper');
Artx::load('Artx_Data_MenuItemMapper');
Artx::load('Artx_Data_MenuMapper');
Artx::load('Artx_Data_ModuleMapper');
class Artx_Data_Mappers
{
    public static function errorCallback($callback, $get = false)
    {
        static $errorCallback;
        if (!$get) {
            $errorCallback = $callback;
        }
        return $errorCallback;
    }
    public static function get($name)
    {
        $className = 'Artx_Data_' . ucfirst($name) . 'Mapper';
        $mapper = new $className();
        return $mapper;
    }
    public static function error($error, $code)
    {
        $null = null;
        $callback = Artx_Data_Mappers::errorCallback($null, true);
        if (isset($callback)) {
            call_user_func($callback, $error, $code);
        }
Beispiel #5
0
<?php

defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'functions.php';
Artx::load("Artx_Content");
$component = new ArtxContent($this, $this->params);
echo $component->beginPageContainer('archive');
?>
<form id="adminForm" action="<?php 
echo JRoute::_('index.php');
?>
" method="post">
    <?php 
ob_start();
?>
    <fieldset class="filters">
    <legend class="hidelabeltxt"><?php 
echo JText::_('JGLOBAL_FILTER_LABEL');
?>
</legend>
    <div class="filter-search">
        <?php 
if ($this->params->get('filter_field') != 'hide') {
    ?>
        <label class="filter-search-lbl" for="filter-search"><?php 
    echo JText::_('COM_CONTENT_' . $this->params->get('filter_field') . '_FILTER_LABEL') . '&#160;';
    ?>
</label>
        <input type="text" name="filter-search" id="filter-search" value="<?php 
    echo $this->escape($this->filter);
Beispiel #6
0
<?php

defined('_JEXEC') or die;
/**
 *-------------------------------------------
 * Szablon został wypalony w  Diablodesign.
 * www.diablodesign.eu
 * biuro@diablodesign.eu
 * tel.666-977-944
 *-------------------------------------------
 */
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'functions.php';
$document = $this;
$templateUrl = $document->baseurl . '/templates/' . $document->template;
Artx::load("Artx_Page");
$view = $this->artx = new ArtxPage($this);
$view->componentWrapper();
JHtml::_('behavior.framework', true);
?>
<!DOCTYPE html>
<html dir="ltr" lang="<?php 
echo $document->language;
?>
">
<head>
    <jdoc:include type="head" />
      <!--scroling head-->
<script src="<?php 
echo $templateUrl;
?>
/js/scroling.js"></script>
Beispiel #7
0
<?php

define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);
define('JPATH_BASE', dirname(dirname(dirname(dirname(__FILE__)))) . DS . 'administrator');
require_once dirname(dirname(__FILE__)) . DS . 'library' . DS . 'Artx.php';
require_once JPATH_BASE . DS . 'includes' . DS . 'defines.php';
require_once JPATH_BASE . DS . 'includes' . DS . 'framework.php';
require_once JPATH_BASE . DS . 'includes' . DS . 'helper.php';
require_once JPATH_BASE . DS . 'includes' . DS . 'toolbar.php';
$app = JFactory::getApplication('administrator');
$app->initialise(array('language' => $app->getUserState('application.lang', 'lang')));
// checking user privileges
$user = JFactory::getUser();
$groups = $user->get("groups");
if (!(isset($groups["Super Users"]) || isset($groups[8])) && !(isset($groups["Administrator"]) || isset($groups[7]))) {
    exit('error:2:Installing content requires administrator privileges.');
}
Artx::load('Artx_Data_Loader');
$loader = new Artx_Data_Loader();
$loader->load('data.xml');
echo $loader->execute($_GET);
Beispiel #8
0
<?php

Artx::load('Artx_Data_Mapper');
class Artx_Data_MenuMapper extends Artx_Data_Mapper
{
    function __construct()
    {
        parent::__construct('MenuType', 'menu_types', 'id');
    }
    function find($filter = array())
    {
        $where = array();
        if (isset($filter['title'])) {
            $where[] = 'title = ' . $this->_db->Quote($this->_db->escape($filter['title'], true), false);
        }
        $result = $this->_loadObjects($where, isset($filter['limit']) ? (int) $filter['limit'] : 0);
        return $result;
    }
    function create()
    {
        $row = $this->_create();
        return $row;
    }
    function delete($id)
    {
        // Delete related records in the modules_menu table.
        // Start with checking whether this menu exists:
        $menu = $this->fetch($id);
        if (is_string($menu)) {
            return $this->_error($menu, 1);
        }
Beispiel #9
0
<?php

defined('_JEXEC') or die;
Artx::load("Artx_Content_Item");
abstract class ArtxContentListItem extends ArtxContentItem
{
    public $intro;
    protected function __construct($component, $componentParams, $article, $articleParams)
    {
        parent::__construct($component, $componentParams, $article, $articleParams);
        $this->isPublished = 0 != $this->_article->state;
        $this->titleLink = $this->_articleParams->get('link_titles') && $this->_articleParams->get('access-view') ? JRoute::_(ContentHelperRoute::getArticleRoute($this->_article->slug, $this->_article->catid)) : '';
        $this->intro = $this->_article->introtext;
        if ($this->_articleParams->get('show_readmore') && $this->_article->readmore) {
            if (!$this->_articleParams->get('access-view')) {
                $this->readmore = JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
            } elseif ($this->readmore = $this->_article->alternative_readmore) {
                if ($this->_articleParams->get('show_readmore_title', 0) != 0) {
                    $this->readmore .= JHtml::_('string.truncate', $this->_article->title, $this->_articleParams->get('readmore_limit'));
                }
            } elseif ($this->_articleParams->get('show_readmore_title', 0) == 0) {
                $this->readmore = JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
            } else {
                $this->readmore = JText::_('COM_CONTENT_READ_MORE') . JHtml::_('string.truncate', $this->_article->title, $this->_articleParams->get('readmore_limit'));
            }
            if ($this->_articleParams->get('access-view')) {
                $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->_article->slug, $this->_article->catid));
                $this->readmoreLink = $link;
            } else {
                $menu = JFactory::getApplication()->getMenu();
                $active = $menu->getActive();
Beispiel #10
0
<?php

defined('_JEXEC') or die;
Artx::load("Artx_Content_ArticleBase");
abstract class ArtxContentItem extends ArtxContentArticleBase
{
    public $isPublished;
    public $printIconVisible;
    public $emailIconVisible;
    public $editIconVisible;
    public $introVisible;
    public $readmore;
    public $readmoreLink;
    protected function __construct($component, $componentParams, $article, $articleParams)
    {
        parent::__construct($component, $componentParams, $article, $articleParams);
        $this->title = $this->_articleParams->get('show_title') ? $this->_article->title : '';
        $this->printIconVisible = $this->_articleParams->get('show_print_icon');
        $this->emailIconVisible = $this->_articleParams->get('show_email_icon');
        $this->editIconVisible = $this->_articleParams->get('access-edit');
        $this->introVisible = $this->_articleParams->get('show_intro');
        $this->images = $this->_buildImages($article, $articleParams);
    }
    private function _buildImages($article, $params)
    {
        $images = isset($this->_article->images) && is_string($this->_article->images) ? json_decode($this->_article->images) : null;
        return array('intro' => $this->_buildImageInfo('intro', $params, $images), 'fulltext' => $this->_buildImageInfo('fulltext', $params, $images));
    }
    private function _buildImageInfo($type, $params, $images)
    {
        $image = array('image' => '', 'float' => '', 'class' => '', 'caption' => '', 'alt' => '');
Beispiel #11
0
<?php

defined('_JEXEC') or die;
/**
 * Contains the article factory method and content component rendering helpers.
 */
Artx::load("Artx_Content_ArchivedArticle");
Artx::load("Artx_Content_SingleArticle");
Artx::load("Artx_Content_CategoryArticle");
Artx::load("Artx_Content_FeaturedArticle");
class ArtxContent
{
    protected $_component;
    protected $_componentParams;
    public $pageClassSfx;
    public $pageHeading;
    public function __construct($component, $params)
    {
        $this->_component = $component;
        $this->_componentParams = $params;
        $this->pageClassSfx = $component->pageclass_sfx;
        $this->pageHeading = $this->_componentParams->get('show_page_heading', 1) ? $this->_componentParams->get('page_heading') : '';
    }
    public function pageHeading($title = null)
    {
        return artxPost(array('header-text' => $this->_component->escape(null == $title ? $this->pageHeading : $title)));
    }
    public function article($view, $article, $params, $properties = array())
    {
        switch ($view) {
            case 'archive':