Template Gavick Pro

  • rutemberg
  • Avatar de rutemberg Autor do Tópico
  • Offline
  • JCB! Novato
  • JCB! Novato
Mais
6 anos 2 meses atrás #98627 por rutemberg
rutemberg created the topic: Template Gavick Pro
Gostaria de saber porque quando eu instalo o template GAVICKPRO dá erro nos módulos e não aparece na página. Segue print abaixo:

Please Entrar ou Registrar to join the conversation.


Mais
6 anos 2 meses atrás #98643 por Diego Lucca
Diego Lucca replied the topic: Re: Template Gavick Pro
ja checou os requisitos minimos de php, mysql que o tema precisa para funcionar corretamente? seu pacote esta completo?

Diego Lucca
DG Company - Companhia Digital
www.dgcompany.com.br

Please Entrar ou Registrar to join the conversation.

  • rutemberg
  • Avatar de rutemberg Autor do Tópico
  • Offline
  • JCB! Novato
  • JCB! Novato
Mais
6 anos 2 meses atrás #98658 por rutemberg
rutemberg replied the topic: Re: Template Gavick Pro
já chequei sim, ta dando erro de php eu já revisei e nada. Vou postar a programação pra vê se alguém pode me ajudar

<?php

/**
* This View is responsible for generating layout parts for the com_content data source
* @package News Show Pro GK5
* @Copyright (C) 2009-2013 Gavick.com
* @ All rights reserved
* @ Joomla! is Free Software
* @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version $Revision: GK5 1.3.3 $
**/

// access restriction
defined('_JEXEC') or die('Restricted access');

// load necessary K2 Route Helper
require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
//
class NSP_GK5_com_k2_View {
// header generator
static function header($config, $item) {
if($config != 'disabled') {
$class = ' t'.$config.' f'.$config;
$output = NSP_GK5_Utils::cutText(htmlspecialchars($item), $config, 'title_limit', '…');
$output = str_replace('"', """, $output);
// first word span wrap
if($config == 1) {
$output_temp = explode(' ', $output);
$first_word = $output_temp[0];
$output_temp[0] = '<span>'.$output_temp[0].'</span>';
$output = preg_replace('/' . $first_word . '/mi', $output_temp[0], $output, 1);
}

$link = NSP_GK5_com_k2_View::itemLink($item);
//
if($config == 1) {
return '<h4 class="nspHeader'.$class.'"><a href="'.$link.'" title="'.htmlspecialchars($item).'">'.$output.'</a></h4>';
} else {
return '<h4 class="nspHeader'.$class.'" title="'.htmlspecialchars($item).'">'.$output.'</h4>';
}
} else {
return '';
}
}
// article text generator
static function text($config, $item, $readmore) {
if($config != 'disabled') {
//
$item = NSP_GK5_Utils::cutText($item, $config, 'news_limit');
$link = NSP_GK5_com_k2_View::itemLink($item);
//
$item = ($config == 1) ? '<a href="'.$link.'">'.$item.'</a>' : $item;
$class = ' t'.$config.' f'.$config;
//
if($config == 'after') {
return '<p class="nspText'.$class.'">'.$item.' '.$readmore.'</p>';
} else {
return '<p class="nspText'.$class.'">'.$item.'</p>';
}
} else {
return '';
}
}
// article image generator
static function image($config, $item, $only_url = false, $pm = false, $links = false){
if($config != 'disabled' || $pm || $links) {
$IMG_SOURCE = '';
$item = str_replace('"', """, $item);
$uri = JURI::getInstance();
//
if(!$config) {
$config = 'Generic';
}
//
if(JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item).'_'.$config.'.jpg')){
$IMG_SOURCE = JURI::root().'media/k2/items/cache/'.md5("Image".$item).'_'.$config.'.jpg';
} else {
// set image to first in article content
if(preg_match('/\<img.*src=.*?\>/',$item)){
$imgStartPos = JString::strpos($item, 'src="');
if($imgStartPos) {
$imgEndPos = JString::strpos($item, '"', $imgStartPos + 5);
}
if($imgStartPos > 0) {
$IMG_SOURCE = JString::substr($item, ($imgStartPos + 5), ($imgEndPos - ($imgStartPos + 5)));
}
}
}
//
$full_size_img = $IMG_SOURCE;
//
if($config == 1 && $IMG_SOURCE != ''){
// try to override standard image
if(strpos($IMG_SOURCE, 'http://') == FALSE) {

$img_file = NSP_GK5_Thumbs::createThumbnail(str_replace(JURI::root() . 'media', 'media', $IMG_SOURCE), $config, true, false, '', $links);
if(is_array($img_file)) {
$IMG_SOURCE = $uri->root().'modules/mod_news_pro_gk5/cache/'.$img_file[1];
} elseif($config == 1) {
jimport('joomla.filesystem.file');
if(is_file(JPATH_ROOT.DS.'modules'.DS.'mod_news_pro_gk5'.DS.'cache'.DS.'default'.DS.'default'.$config.'.png')) {
$IMG_SOURCE = $uri->root().'modules/mod_news_pro_gk5/cache/default/default'.$config.'.png';
}
} else {
$IMG_SOURCE = '';
}
}
} elseif($config == 1) {
jimport('joomla.filesystem.file');

if(is_file(JPATH_ROOT.DS.'modules'.DS.'mod_news_pro_gk5'.DS.'cache'.DS.'default'.DS.'default'.$config.'.png')) {
$IMG_SOURCE = $uri->root().'modules/mod_news_pro_gk5/cache/default/default'.$config.'.png';
}
}

if($only_url) {
return $IMG_SOURCE;
} else {
//
if($IMG_SOURCE != '') {
$class = '';

if(!$links) {
$class = ' t'.$config.' f'.$config;
}

$size = '';
$margins = '';
//
if(!$links && $config == 1) {
$class .= ' gkResponsive';
}
//
if(!$links) {
if($config != 0 && !$config && $config == 0) $size .= 'width:'.$config.'px;';
if($config != 0 && !$config && $config == 0) $size .= 'height:'.$config.'px;';
if($config != '') $margins = ' style="margin:'.$config.';"';
} else {
if($config != 0 && !$config && $config == 0) $size .= 'width:'.$config.'px;';
if($config != 0 && !$config && $config == 0) $size .= 'height:'.$config.'px;';
if($config != '') $margins = ' style="margin:'.$config.';"';
}
//
if($config == 1 || $links) {
if($config == 1) {
return ($config == 'center' && !$links) ? '<div class="center'.$class.'"><a href="'.$full_size_img.'" class="modal nspImageWrapper'.$class.'"'.$margins.'><img class="nspImage" src="'.$IMG_SOURCE.'" alt="'.htmlspecialchars($item).'" style="'.$size.'" /></a></div>' : '<a href="'.$full_size_img.'" class="modal nspImageWrapper'.$class.'"'.$margins.'><img class="nspImage'.$class.'" src="'.$IMG_SOURCE.'" alt="'.htmlspecialchars($item).'" style="'.$size.'" /></a>';
} else {
$link = NSP_GK5_com_k2_View::itemLink($item);
return ($config == 'center' && !$links) ? '<div class="center'.$class.'"><a href="'.$link.'" class="nspImageWrapper'.$class.'"'.$margins.'><img class="nspImage" src="'.$IMG_SOURCE.'" alt="'.htmlspecialchars($item).'" style="'.$size.'" /></a></div>' : '<a href="'.$link.'" class="nspImageWrapper'.$class.'"'.$margins.'><img class="nspImage'.$class.'" src="'.$IMG_SOURCE.'" alt="'.htmlspecialchars($item).'" style="'.$size.'" /></a>';
}
} else {
return ($config == 'center' && !$links) ? '<div class="center'.$class.'"><span class="nspImageWrapper'.$class.'"'.$margins.'><img class="nspImage" src="'.$IMG_SOURCE.'" alt="'.htmlspecialchars($item).'" '.$size.' /></span></div>' : '<span class="nspImageWrapper'.$class.'"'.$margins.'><img class="nspImage'.$class.'" src="'.$IMG_SOURCE.'" alt="'.htmlspecialchars($item).'" style="'.$size.'" /></span>';
}
} else {
return '';
}
}
} else {
return '';
}
}
// ReadMore button generator
static function readMore($config, $item) {
//
if($config != 'disabled') {
$class = ' f'.$config;
$link = NSP_GK5_com_k2_View::itemLink($item);
//
if($config == 'after') {
return '<a class="readon inline" href="'.$link.'">'.((trim($config) != '') ? $config : JText::_('MOD_NEWS_PRO_GK5_NSP_READMORE')).'</a>';
} else {
return '<a class="readon '.$class.'" href="'.$link.'">'.((trim($config) != '') ? $config : JText::_('MOD_NEWS_PRO_GK5_NSP_READMORE')).'</a>';
}
} else {
return '';
}
}
// article information generator
static function info($config, $item, $num = 1) {
// %AUTHOR %DATE %HITS %CATEGORY
$news_info = '';
//
if($num == 1){
if($config != 'disabled') {
$class = 'nspInfo1 t'.$config.' f'.$config;
}
} else {
if($config != 'disabled') {
$class = 'nspInfo2 t'.$config.' f'.$config;
}
}
//
if(
($config != 'disabled' && $num == 1) ||
($config != 'disabled' && $num == 2)
) {
$news_info = '<p class="nspInfo '.$class.'">'.$config.'</p>';
//
$author = (trim(htmlspecialchars($item)) != '') ? htmlspecialchars($item) : htmlspecialchars($item);
$info_author = ($config == 1) ? '<span><img src="'.K2HelperUtilities::getAvatar($item, $item, $config).'" alt="'.$author.' - avatar" class="nspAvatar" width="'.$config.'" height="'.$config.'" /> '.$author.'</span>' : $author;
//
$info_date = JHTML::_('date', $item, $config);
//
$info_hits = JText::_('MOD_NEWS_PRO_GK5_NHITS').$item;

// case when there is no rates
if($item == 0) {
$item = 1;
}

$info_rate = ($item > 0) ? '<span class="nspRate">' . JText::_('MOD_NEWS_PRO_GK5_NSP_RATE') .' '. number_format($item / $item, 2) . '</span>': '';

$info_stars = '<span class="nsp-stars">';
$stars_count = floor($item / $item);
for($i = 0; $i < 5; $i++) {
$info_stars .= $i < $stars_count ? '<span class="nsp-star-1"></span>' : '<span class="nsp-star-0"></span>';
}
$info_stars .= '</span>';

$info_category = ($config == 1) ? '<a href="'.NSP_GK5_com_k2_View::categoryLink($item).'" >'.$item.'</a>' : $item;
$info_comments = JText::_('MOD_NEWS_PRO_GK5_NO_COMMENTS');
//
if(isset($item)) {
if($item == 1) {
$info_comments = JText::_('MOD_NEWS_PRO_GK5_1COMMENT');
} else if($item > 1 && $item < 5) {
$info_comments = $item . ' ' . JText::_('MOD_NEWS_PRO_GK5_MORECOMMENTS');
} else if($item >= 5) {
$info_comments = $item . ' ' . JText::_('MOD_NEWS_PRO_GK5_MUCHMORECOMMENTS');
}
}
//
$info_comments_short = '0';
$link = NSP_GK5_com_k2_View::itemLink($item);
//
if(isset($item)) {
$info_comments_short = $item;
}

$info_comments_short = '<a href="'.$link.'">'.$info_comments_short.'</a>';
//
$info_tags = '';
if(isset($item) && count($item) > 0) {
$i = 0;
foreach($item as $tag) {
$link = urldecode(JRoute::_(K2HelperRoute::getTagRoute($tag)));

if($i == 0) {
$info_tags .= '<a href="' . $link . '">' . $tag . '</a>';
} else {
$info_tags .= ', <a href="' . $link . '">' . $tag . '</a>';
}
//
$i++;
}
}
//
$news_info = str_replace('%AUTHOR', $info_author, $news_info);
$news_info = str_replace('%DATE', $info_date, $news_info);
$news_info = str_replace('%HITS', $info_hits, $news_info);
$news_info = str_replace('%CATEGORY', $info_category, $news_info);
$news_info = str_replace('%STARS', $info_stars, $news_info);
$news_info = str_replace('%RATE', $info_rate, $news_info);
$news_info = str_replace('%COMMENTS_SHORT', $info_comments_short, $news_info);
$news_info = str_replace('%COMMENTS', $info_comments, $news_info);
$news_info = str_replace('%TAGS', $info_tags, $news_info);
} else {
return '';
}
//
return $news_info;
}
// rest link list generator
static function lists($config, $item, $num) {
$odd = $num % 2;

if($config > 0) {
$text = '';
$title = '';
$image = '';

if($config > 0) {
$text = NSP_GK5_Utils::cutText(strip_tags(preg_replace("/\{.+?\}/", "", $item)), $config, 'list_text_limit', '…');
$text = preg_replace("/\{.+?\}/", "", $text);

if(JString::strlen($text) > 0) {
$text = '<p>'.$text.'</p>';
}
}

if($config > 0) {
$title = htmlspecialchars($item);
$title = NSP_GK5_Utils::cutText($title, $config, 'list_title_limit', '…');
$title = str_replace('"', """, $title);
$link = NSP_GK5_com_k2_View::itemLink($item);

if(JString::strlen($title) > 0) {
$title = '<h4><a href="'.$link.'" title="'.htmlspecialchars($item).'">'.$title.'</a></h4>';
}
}

if($config == 1) {
$image = NSP_GK5_com_k2_View::image($config, $item, false, false, true);
}
// creating rest news list
return '<li class="'.(($odd == 1) ? 'odd' : 'even').'">' . $image . (($image != '') ? '<div>' . $title . $text . '</div>' : ($title . $text)) . '</li>';
} else {
return '';
}
}
// article link generator
static function itemLink($item, $config = false) {
return urldecode(JRoute::_(K2HelperRoute::getItemRoute($item.':'.urlencode($item), $item.':'.urlencode($item))));
}
// category link generator
static function categoryLink($item) {
return urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($item.':'.urlencode($item))));
}
}

// EOF

Please Entrar ou Registrar to join the conversation.

Mais
6 anos 2 meses atrás #98659 por Diego Lucca
Diego Lucca replied the topic: Re: Template Gavick Pro
talvez isso não ajude muito, se tiver como eu ter acesso me adiciona no skype e amanhã damos uma olhada juntos skype diegomlucca

Diego Lucca
DG Company - Companhia Digital
www.dgcompany.com.br

Please Entrar ou Registrar to join the conversation.