Example #1
0
 public function meta()
 {
     if ($this->routerView == 'article') {
         $h = new Html();
         $article = new Article();
         $article->content($this->routerId);
         $images = json_decode($article->images);
         $metadata = json_decode($article->metadata);
         $h->b('meta', 0, 1, '', '{"charset":"utf-8"}');
         $h->b('meta', 0, 1, '', '{"http-equiv":"X-UA-Compatible", "content":"IE=edge"}');
         $h->b('meta', 0, 1, '', '{"name":"viewport", "content":"width=device-width, initial-scale=1"}');
         $h->b('meta', 0, 1, '', '{"name":"keywords", "content":"' . $article->metakey . '"}');
         $h->b('meta', 0, 1, '', '{"name":"robots", "content":"' . $metadata->robots . '"}');
         $h->b('meta', 0, 1, '', '{"name":"revised", "content":"' . $article->modified . '"}');
         $h->b('meta', 0, 1, '', '{"name":"reply-to", "content":"' . $this->routerMailFrom . '"}');
         $h->b('meta', 0, 1, '', '{"name":"pagename", "content":"' . $article->title . '"}');
         $h->b('meta', 0, 1, '', '{"name":"description", "content":"' . $article->metadesc . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:url", "content":"' . $this->routerInstance . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:type", "content":"' . $this->routerView . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:title", "content":"' . $article->title . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:description", "content":"' . $article->metadesc . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:image", "content":"' . $this->routerBase . $images->image_intro . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:site_name", "content":"' . $this->routerSiteName . '"}');
         $h->b('meta', 0, 1, '', '{"property":"article:author", "content":"' . $metadata->xreference . '"}');
         $h->b('title', 0, 1);
         $h->e(1, $article->title . ' - ' . $this->routerSiteName);
         $h->b('title', 1, 1);
     }
     if ($this->routerView == 'category') {
         $h = new Html();
         $category = new Category();
         $category->categoryContent($this->routerId);
         $params = json_decode($category->params);
         $metadata = json_decode($category->metadata);
         $h->b('meta', 0, 1, '', '{"charset":"utf-8"}');
         $h->b('meta', 0, 1, '', '{"http-equiv":"X-UA-Compatible", "content":"IE=edge"}');
         $h->b('meta', 0, 1, '', '{"name":"viewport", "content":"device-width, initial-scale=1"}');
         $h->b('meta', 0, 1, '', '{"name":"keywords", "content":"' . $category->metakey . '"}');
         $h->b('meta', 0, 1, '', '{"name":"robots", "content":"' . $metadata->robots . '"}');
         $h->b('meta', 0, 1, '', '{"name":"revised", "content":"' . $category->modified_time . '"}');
         $h->b('meta', 0, 1, '', '{"name":"reply-to", "content":"' . $this->routerMailFrom . '"}');
         $h->b('meta', 0, 1, '', '{"name":"pagename", "content":"' . $category->title . '"}');
         $h->b('meta', 0, 1, '', '{"name":"description", "content":"' . $category->metadesc . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:url", "content":"' . $this->routerInstance . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:type", "content":"' . $this->routerView . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:title", "content":"' . $category->title . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:description", "content":"' . $category->metadesc . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:image", "content":"' . $this->routerBase . $params->image . '"}');
         $h->b('meta', 0, 1, '', '{"property":"og:site_name", "content":"' . $this->routerSiteName . '"}');
         $h->b('meta', 0, 1, '', '{"property":"article:author", "content":"' . $category->description . '"}');
         $h->b('title', 0, 1);
         $h->e(1, $category->title . ' - ' . $this->routerSiteName);
         $h->b('title', 1, 1);
     }
 }
Example #2
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 . '"}';