Пример #1
0
 public function player($id)
 {
     $string = new String();
     $player = $this->getPart($id, 'player');
     $this->videoEmbedHtml = $player['items'][0]['player']['embedHtml'];
     $explode = $string->explode($this->videoEmbedHtml, '<');
     foreach ($explode as $key => $value) {
         $iframe = $string->explode($value, '=');
         foreach ($iframe as $iframeKey => $iframeValue) {
             if ($iframeKey == 1) {
                 $this->videoWidth = $string->between('"', '"', $iframe[$iframeKey]);
             }
             if ($iframeKey == 2) {
                 $this->videoHeight = $string->between('"', '"', $iframe[$iframeKey]);
             }
         }
     }
 }
Пример #2
0
 public function getCatergoryPath($articleId)
 {
     //Include String Class
     $string = new Framework\String();
     //Grab table names from Database Class
     $this->tables();
     //Grab the cat id based off the article id
     $results = $this->q("SELECT catid FROM {$this->content} WHERE id = '{$articleId}'");
     $articleCatId = $results[0]['catid'];
     //Grab the path based off the catid that was based off the article id
     $results = $this->q("SELECT path FROM {$this->categories} WHERE id = '{$articleCatId}'");
     $catPath = $results[0]["path"];
     //Explode the path by forward slash
     $results = $string->explode($catPath, '/');
     //Loop through the exploded path
     //Create a current object variable and assign it $result (which is each part of the $results array)
     foreach ($results as $key => $result) {
         $this->{'path_' . $key} = trim($result);
     }
 }
Пример #3
0
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$article = new Joomla\Article();
$string = new Framework\String();
$h = new Framework\Html();
$article->sectionContent($this->articleAlias, $this->sectionAlias);
$introtext = $string->breakExplode($article->introtext);
$h->b('div', 0, 1, '', '{"class":"row", "data-min-height":"70"}');
$h->b('div', 0, 1, '', '{"class":"vertical"}');
$h->b('div', 0, 1, '', '{"class":"col col-xs-12 bg-div", "data-min-height":"35"}');
$h->b('div', 0, 1, '', '{"class":"vertical"}');
$h->b('div', 0, 1, '', '{"class":"col col-center col-xs-8 div"}');
$h->b('ul', 0, 1, '', '{"class":"col col-xs-12 ul"}');
$string->breakByGroupSize(1, $introtext, __DIR__, 'logos');
$h->b('ul', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
Пример #4
0
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$menu = new Joomla\Menu();
$h = new Framework\Html();
$sch = new Framework\Sch();
$string = new Framework\String();
$menu->categoryBlog($this->catid, $this->id);
$menu->article($this->id, JRequest::getVar('Itemid'));
$text = $string->breakExplode($this->introtext);
$img = json_decode($this->images);
$link = 'index.php?option=com_content&view=article&id=' . $this->id . ':' . $this->alias . '&catid=' . $this->catid . '&Itemid=' . JRequest::getVar('Itemid');
//echo '<a href="'.$link.'">'.$this->title.'</a>';
//echo '<br>';
if ($resultsKey == 0) {
    $h->b('section', 0, 1, '{"class":"row section", "data-min-height":"80"}');
    $h->b('div', 0, 1, '', '{"class":"vertical"}');
    $h->b('div', 0, 1, '', '{"class":"col col-center col-xs-8", "data-mh":"audio-cat-div"}');
}
$h->b('article', 0, 1, '', '{"class":"col col-xs-12 col-sm-3 col-md-3 col-lg-3", "id":"article", "data-mh":"artists-catergory-article"}');
$h->b('a', 0, 1, '', '{"href":"' . $menu->articleLink . '", "class":"col col-xs-12 artists-a"}');
$h->b('figure', 0, 1, '', '{"class":"col col-xs-12 figure"}');
$h->b('img', 0, 1, '', '{"class":"col col-xs-12 image", "src":"' . $img->image_intro . '", "alt":"' . $img->image_intro_alt . '"}');
$h->b('div', 0, 1, '', '{"style":"background-image: url(' . $img->image_intro . ')", "class":"div-img"}');
$h->b('div', 1, 1);
$h->b('figure', 1, 1);
$h->b('a', 1, 1);
$h->b('a', 0, 1, '', '{"href":"' . $menu->articleLink . '", "class":"col col-xs-12 artists-a"}');
$h->b('hgroup', 0, 1, '{"id":"hgroup"}');
$h->b('h2', 0, 1);
Пример #5
0
<?php

//ARTICLE
//CONTACT
//SECTION #2
use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$article = new Joomla\Article();
$string = new Framework\String();
$h = new Framework\Html();
$article->sectionContent($this->articleAlias, $this->sectionAlias);
$introtext = $string->breakExplode($article->introtext);
$introtextSlice = array_slice($introtext, 2);
$row = '{"class":"row", "data-min-height":"70"}';
$vertical = '{"class":"vertical"}';
$container = '{"class":"col col-center col-xs-11 col-sm-10 col-md-9 col-lg-8"}';
$title = '{"class":"title col col-xs-12"}';
$content = '{"class":"content col col-xs-12"}';
$form = '{"class":"form row", "method":"post", "action":"/"}';
$list = '{"class":"list col col-xs-12"}';
$h->b('div', 0, 1, '', $row);
$h->b('div', 0, 1, '', $vertical);
$h->b('div', 0, 1, '', $container);
$h->b('h2', 0, 1, '', $title);
$h->e(1, $introtext[0]);
$h->b('h2', 1, 1);
$h->b('p', 0, 1, '', $content);
$h->e(1, $introtext[1]);
$h->b('p', 1, 1);
$h->b('form', 0, 1, '', $form);
$h->b('dl', 0, 1, '', $list);
Пример #6
0
<?php

//ARTICLE
//FAQ
//SECTION #1
use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$article = new Joomla\Article();
$string = new Framework\String();
$h = new Framework\Html();
$article->sectionContent($this->articleAlias, $this->sectionAlias);
$row = '{"class":"row", "data-min-height":"30"}';
$vertical = '{"class":"vertical"}';
$container = '{"class":"col col-center col-xs-11 col-sm-10 col-md-9 col-lg-8"}';
$h->b('div', 0, 1, '', $row);
$h->b('div', 0, 1, '', $vertical);
$h->b('div', 0, 1, '', $container);
$string->breakByGroupSize(2, $string->breakExplode($article->introtext), __DIR__, 'boxes');
$h->b('div', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
Пример #7
0
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$article = new Joomla\Article();
$db = new Joomla\Database();
$string = new Framework\String();
$h = new Framework\Html();
$article->sectionContent($this->articleAlias, $this->sectionAlias);
$wallop = '{"class":"Wallop"}';
$wallopList = '{"class":"Wallop-list"}';
$wallopNext = '{"class":"next fa fa-arrow-circle-o-right"}';
$wallopPervious = '{"class":"previous fa fa-arrow-circle-o-left"}';
$wallopPagination = '{"class":"Wallop-pagination"}';
$itemsArray = $string->breakExplode($article->introtext);
$h->b('div', 0, 1, '', $wallop);
$h->b('div', 0, 1, '', $wallopList);
$string->breakByGroupSize(3, $itemsArray, __DIR__, 'items');
$h->b('i', 0, 1, '', $wallopNext);
$h->b('i', 1, 1);
$h->b('i', 0, 1, '', $wallopPervious);
$h->b('i', 1, 1);
$h->b('div', 1, 1);
$h->b('ul', 0, 1, '', $wallopPagination);
$string->breakByGroupSize(3, $itemsArray, __DIR__, 'dots');
$h->b('ul', 1, 1);
$h->b('div', 1, 1);
Пример #8
0
<?php 
require_once 'templates/what/vendor/james-heinrich/getid3/getid3/getid3.php';
use Antfuentes\Titan\Framework;
$h = new Framework\Html();
$string = new Framework\String();
$fileExt = $string->getFileExt($this->content);
$getID3 = new getID3();
if (is_file(trim($this->content))) {
    $content = trim($this->content);
    $ID3 = $getID3->analyze(trim($this->content));
    $ID3_Title = $ID3["tags"]["id3v2"]["title"][0];
    $flag = $this->key / 3;
    if ($this->counter == 0) {
        $h->b('audio', 0, 1, '', '{"preload":"auto", "tabindex":"0", "controls":"controls", "type":"audio/mpeg", "id":"audio", "class":"col col-xs-12"}');
        $h->b('source', 0, 1, '', '{"type":"audio/mpeg", "src":"' . $content . '"}');
        $h->b('audio', 1, 1);
        $h->b('ul', 0, 1, '', '{"class":"col col-xs-12 playlist", "id":"playlist"}');
        $h->b('li', 0, 1, '', '{"class":"active", "id":"li"}');
        $h->b('i', 0, 1, '', '{"class":"fa fa-play-circle"}');
        $h->b('i', 1, 1);
        $h->b('a', 0, 1, '', '{"href":"' . $content . '", "id":"a"}');
        $h->e(1, $ID3_Title);
        $h->b('a', 1, 1);
        $h->b('li', 1, 1);
        $this->counter++;
    } else {
        if ($this->counter != 0 and $this->key != $this->count - 1) {
            if ($flag != 1) {
                $h->b('li', 0, 1, '', '{"id":"li"}');
                $h->b('i', 0, 1, '', '{"class":"fa fa-play-circle"}');
Пример #9
0
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$db = new Joomla\Database();
$article = new Joomla\Article();
$string = new Framework\String();
$h = new Framework\Html();
$article->content($this->routerId);
$introtext = $string->breakExplode($article->introtext);
$content = array_slice($introtext, 2);
$img = json_decode($article->images);
$article->getCatergoryPath($this->routerId);
$city = ucwords($string->replaceString('-', ' ', $article->path_1));
$artist = ucwords($article->path_2);
$h->b('section', 0, 1, '', '{"class":"row artists-article", "data-min-height":"50"}');
$h->b('div', 0, 1, '', '{"class":"vertical"}');
$h->b('div', 0, 1, '', '{"class":"col col-center col-xs-8"}');
$h->b('div', 0, 1, '', '{"class":"col col-xs-12 top"}');
$h->b('div', 0, 1, '', '{"class":"vertical"}');
$h->b('h1', 0, 1, '', '{"class":"h1"}');
$h->e(1, $city . ' / ' . $artist);
$h->b('h1', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 0, 1, '', '{"class":"col col-xs-4 left", "data-mh":"artists-article-div"}');
$h->b('div', 0, 1, '', '{"class":"vertical"}');
$h->b('figure', 0, 1, '', '{"class":"col col-xs-12"}');
$h->b('img', 0, 1, '', '{"class":"col col-xs-12 image", "src":"' . $img->image_fulltext . '", "alt":"' . $img->image_fulltext_alt . '"}');
$h->b('div', 0, 1, '', '{"style":"background-image: url(' . $img->image_fulltext . ')", "class":"div-img"}');
$h->b('div', 1, 1);
Пример #10
0
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$article = new Joomla\Article();
$string = new Framework\String();
$h = new Framework\Html();
$article->sectionContent($this->articleAlias, $this->sectionAlias);
$introtext = $string->breakExplode($article->introtext);
$h->b('div', 0, 1, '', '{"class":"row", "data-min-height":"70"}');
$h->b('div', 0, 1, '', '{"class":"vertical"}');
$h->b('div', 0, 1, '', '{"class":"col col-xs-12"}');
$h->b('ul', 0, 1, '', '{"class":"col col-xs-12"}');
$h->b('ul', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 0, 1, '', '{"class":"col col-xs-12"}');
$h->b('ul', 0, 1, '', '{"class":"col col-xs-12"}');
$h->b('ul', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
Пример #11
0
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$menu = new Joomla\Menu();
$db = new Joomla\Database();
$string = new Framework\String();
$h = new Framework\Html();
$h->b('ul', 0, 1);
$menu->build('mainmenu', 'li', 1);
$db->tables();
$result = $db->q("SELECT * FROM {$db->categories} WHERE id = '{$this->categoryParentId}'");
$cleanAlias = $string->replaceString('-', '', $result[0]['alias']);
$menu->build($cleanAlias, 'li', $this->routerId);
$h->b('ul', 1, 1);
Пример #12
0
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$article = new Joomla\Article();
$string = new Framework\String();
$article->sectionContent($this->articleAlias, $this->sectionAlias);
$breakArray = $string->breakExplode($article->introtext);
Пример #13
0
<?php

use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$article = new Joomla\Article();
$string = new Framework\String();
$article->sectionContent($this->articleAlias, $this->sectionAlias);
function breakExplode($string)
{
    //$results = explode('{BREAK}', $array);
    //below uses regex - can use {BREAK<anything>} in introtext
    $results = preg_split("/{BREAK(?:.*)}/i", $string);
    return $results;
}
$breakArray = breakExplode($article->introtext);
$title = trim($breakArray[0]);
$backgroundImageSrc = trim($breakArray[1]);
$content = array_slice($breakArray, 2);
//start
//$h->b(something)
$h->b('div', 0, 1, '', '{"class":"row", "data-min-height":"70", "style":"background-image:url(' . $backgroundImageSrc . ')"}');
$h->b('div', 0, 1, '', '{"class":"vertical"}');
$h->b('div', 0, 1, '', '{"class":"col col-sm-8 col-center"}');
$h->b('div', 0, 1, '', '{"class":"col col-sm-12", "style": "margin-bottom: 90px; margin-top: 140px; padding: 40px"}');
$h->b('h1', 0, 1, '', '{"class":"h1 col col-xs-12", "style":"padding-bottom: 20px; font-size: 4em;"}');
$h->e(1, $title);
$h->b('h1', 1, 1);
$h->b('div', 0, 1, '', '{"class":"left-img-col col col-xs-2", "data-mh":"home-section-2-col"}');
$h->b('div', 0, 1, '', '{"class":"left-img", "style":"", "data-mh":"home-section-2-col"}');
$h->b('div', 1, 1);
$h->b('div', 1, 1);
Пример #14
0
<?php

//ARTICLE
//AUDIO
use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
require_once 'templates/what/vendor/james-heinrich/getid3/getid3/getid3.php';
$db = new Joomla\Database();
$article = new Joomla\Article();
$menu = new Joomla\Menu();
$string = new Framework\String();
$h = new Framework\Html();
$article->content($this->routerId);
$audio = scandir(AUDIO_PATH . $article->alias);
$audio = array_slice($audio, 2);
$getID3 = new getID3();
$introtext = $string->breakExplode($article->introtext);
$content = array_slice($introtext, 2);
$img = json_decode($article->images);
$fbCommentsLink = $menu->link(JRequest::getVar('Itemid'));
$article->getCatergoryPath($this->routerId);
$city = ucwords($string->replaceString('-', ' ', $article->path_1));
$artist = ucwords($article->path_2);
$row = '{"class":"row", "id":"article-audio", "data-min-height":"80"}';
$vertical = '{"class":"vertical"}';
$container = '{"class":"col col-center col-xs-11 col-sm-10 col-md-9 col-lg-8"}';
$title = '{"class":"title col col-xs-12"}';
$imgCol = '{"class":"img-col col col-xs-6", "data-mh":"article-audio-col"}';
$imgVertical = '{"class":"vertical"}';
$imgContainer = '{"class":"col col-xs-12"}';
$img = '{"class":"img", "src":"' . $img->image_fulltext . '", "alt":"' . $img->image_fulltext_alt . '"}';
Пример #15
0
<?php

//ARTICLE
//FAQ
//SECTION #2
use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$article = new Joomla\Article();
$string = new Framework\String();
$h = new Framework\Html();
$article->sectionContent($this->articleAlias, $this->sectionAlias);
$string->breakExplodeVars($article->introtext);
$row = '{"class":"row", "data-min-height":"30"}';
$vertical = '{"class":"vertical"}';
$container = '{"class":"col col-center col-xs-11 col-sm-10 col-md-9 col-lg-8"}';
$title = '{"class":"title col-xs-12"}';
$article = '{"class":"article row"}';
$subTitle = '{"class":"sub-title col-xs-12"}';
$content = '{"class":"content col-xs-12"}';
$link = '{"class":"link col-xs-12", "href":"' . $string->text_3 . '"}';
$btn = '{"class":"btn"}';
$h->b('div', 0, 1, '', $row);
$h->b('div', 0, 1, '', $vertical);
$h->b('div', 0, 1, '', $container);
$h->b('h1', 0, 1, '', $title);
$h->e(1, $string->text_0);
$h->b('h1', 1, 1);
$h->b('article', 0, 1, '', $article);
$h->b('h1', 0, 1, '', $subTitle);
$h->e(1, $string->text_1);
$h->b('h1', 1, 1);
Пример #16
0
<?php

//ARTICLE
//FAQ
//SECTION #3
use Antfuentes\Titan\Joomla;
use Antfuentes\Titan\Framework;
$article = new Joomla\Article();
$string = new Framework\String();
$h = new Framework\Html();
$article->sectionContent($this->articleAlias, $this->sectionAlias);
$introtext = $string->breakExplode($article->introtext);
$content = array_slice($introtext, 1);
$row = '{"class":"row", "data-min-height":"50"}';
$vertical = '{"class":"vertical"}';
$container = '{"class":"col col-center col-xs-11 col-sm-10 col-md-9 col-lg-8"}';
$title = '{"class":"title col-xs-12"}';
$list = '{"class":"list acc-list"}';
$h->b('div', 0, 1, '', $row);
$h->b('div', 0, 1, '', $vertical);
$h->b('div', 0, 1, '', $container);
$h->b('h1', 0, 1, '', $title);
$h->e(1, $introtext[0]);
$h->b('h1', 1, 1);
$h->b('ul', 0, 1, '', $list);
$string->breakByGroupSize(2, $content, __DIR__, 'questions');
$h->b('ul', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
$h->b('div', 1, 1);
Пример #17
0
 public function stateCityLinkByAlias($routerId, $routerView, $alias)
 {
     $string = new Framework\String();
     $this->tables();
     if ($routerView == 'article') {
         $query = $this->q("SELECT catid FROM `{$this->content}` WHERE id = '{$routerId}'");
         $catId = $query[0]['catid'];
         $query = $this->q("SELECT path FROM `{$this->categories}` WHERE id = '{$catId}'");
         $path = $query[0]['path'];
     } else {
         $query = $this->q("SELECT path FROM `{$this->categories}` WHERE id = '{$routerId}'");
         $path = $query[0]['path'];
     }
     $pathExplode = $string->explode($path, '/');
     $state = $pathExplode[0];
     $city = $pathExplode[1];
     $pathMenu = $alias;
     $pathMenu .= '-';
     $pathMenu .= $city;
     $query = $this->q("SELECT id, link FROM `{$this->menu}` WHERE path = '{$pathMenu}'");
     $menuId = $query[0]['id'];
     $menuLink = $query[0]['link'];
     $link = $menuLink;
     $link .= '&Itemid=';
     $link .= $menuId;
     return $link;
 }