/** * Method to get a list of options for a list input. * * @return array An array of JHtml options. */ protected function getOptions() { JLoader::register('Bt_portfolioHelper', JPATH_ADMINISTRATOR . '/components/com_bt_portfolio/helpers/helper.php'); $options = Bt_portfolioHelper::getCategoryOptions(); $options = array_merge(parent::getOptions(), $options); return $options; }
/** * Setting the toolbar */ protected function addToolBar() { JToolBarHelper::addNew('portfolio.add'); JToolBarHelper::editList('portfolio.edit'); JToolBarHelper::custom('portfolios.rebuild', 'refresh.png', 'refresh_f2.png', 'COM_BT_PORTFOLIO_PORTFOLIOS_REBUILD_IMAGES', false); JToolBarHelper::divider(); JToolBarHelper::title(JText::_('COM_BT_PORTFOLIO_PORTFOLIOS_MANAGER'), 'portfolio.png'); JToolBarHelper::publish('portfolios.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('portfolios.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::custom('portfolios.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true); JToolBarHelper::divider(); JToolBarHelper::checkin('portfolios.checkin'); JToolBarHelper::deleteList('', 'portfolios.delete'); JToolBarHelper::preferences('com_bt_portfolio'); $this->sidebar = ''; Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel')); //added since 2.0 for j3.0 if (!$this->legacy) { JHtmlSidebar::setAction('index.php?option=com_bt_portfolio&view=portfolios'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published'), true)); JHtmlSidebar::addFilter(JText::_('COM_BT_PORTFOLIO_SELECT_FEATURED'), 'filter_featured', JHtml::_('select.options', Bt_portfolioHelper::getFeaturedOptions(), 'value', 'text', $this->state->get('filter.featured'), true)); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_catid', JHtml::_('select.options', Bt_portfolioHelper::getCategoryOptions(), 'value', 'text', $this->state->get('filter.catid'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'))); $this->sidebar = JHtmlSidebar::render(); } }
/** * Setting the toolbar */ protected function addToolBar() { JToolBarHelper::preferences('com_bt_portfolio'); $this->sidebar = ''; Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel')); //added since 2.0 for j3.0 if (!$this->legacy) { $this->sidebar = JHtmlSidebar::render(); } }
/** * Setting the toolbar */ protected function addToolBar() { JToolBarHelper::editList('comment.edit'); JToolBarHelper::divider(); JToolBarHelper::title(JText::_('COM_BT_PORTFOLIO_COMMENTS_MANAGER'), 'article.png'); JToolBarHelper::publish('comments.publish', 'JTOOLBAR_PUBLISH', true); JToolBarHelper::unpublish('comments.unpublish', 'JTOOLBAR_UNPUBLISH', true); JToolBarHelper::divider(); JToolBarHelper::deleteList('', 'comments.delete'); JToolBarHelper::preferences('com_bt_portfolio'); $this->sidebar = ''; Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel')); //added since 2.0 for j3.0 if (!$this->legacy) { JHtmlSidebar::setAction('index.php?option=com_bt_portfolio&view=comments'); JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published'), true)); JHtmlSidebar::addFilter(JText::_('COM_BT_PORTFOLIO_COMMENT_SELECT_AUTHOR'), 'filter_author', JHtml::_('select.options', Bt_portfolioHelper::getAuthorOptions(), 'value', 'text', $this->state->get('filter.author'), true)); $this->sidebar = JHtmlSidebar::render(); } }
?> "> <td ><?php echo JHtml::_('grid.id', $i, $item->id); ?> </td> <td><?php echo $this->escape($item->title); ?> </td> <td><a href="<?php echo JRoute::_('index.php?option=com_bt_portfolio&task=comment.edit&id=' . $item->id); ?> "> <?php echo $this->escape(Bt_portfolioHelper::substring($item->content, 100, '...', false)); ?> </a> </td> <td ><?php echo $this->escape($item->name); ?> </td> <td ><?php echo $item->email; ?> </td> <td ><?php echo $item->website; ?>
if ($this->params->get('allow_comment')) { ?> <br clear="all"> <div class="btp-comment"><a name="reviews"></a> <?php // Disqus comment if ($this->params->get('comment_system') == 'disqus') { echo Bt_portfolioHelper::getDisqusComment($this->params->get('disqus_shortname')); } else { //Facebook comment if ($this->params->get('comment_system') == 'facebook') { echo Bt_portfolioHelper::getFacebookComment($this->params->get('facebook_app_id'), $this->params->get('number_comments', 5), $this->params->get('commmentbox_width', 600)); } else { // JCOMMENT if ($this->params->get('comment_system') == 'jcomments') { if (Bt_portfolioHelper::checkComponent('com_jcomments')) { include_once JPATH_BASE . DS . 'components' . DS . 'com_jcomments' . DS . 'jcomments.php'; echo JComments::showComments($this->item->id, 'bt_portfolio', $this->item->title); } else { echo "jComments is not installed"; } } else { ?> <?php if (count($this->comment['data'])) { echo '<p class="review-form-title">' . JText::_('COM_BT_PORTFOLIO_REVIEW') . '</p>'; ?> <div id="btp-comment-list"> <?php foreach ($this->comment['data'] as $item) { ?>
<!-- Show list portfolios --> <?php if ($this->params->get('show_portcat', 1)) { ?> <div class="btp-grid-view"> <?php $i = 0; $total = count($this->items); foreach ($this->items as $item) { $i++; if ($i % $column == 1) { echo '<div class="btp-grid-row">'; } $img_url = Bt_portfolioHelper::getPathImage($item->id, 'thumb', $item->image, $item->category_id); $img_zoom_url = Bt_portfolioHelper::getPathImage($item->id, 'original', $item->image, $item->category_id); $link = JRoute::_('index.php?option=com_bt_portfolio&view=portfolio&id=' . $item->id . ':' . $item->alias . '&catid_rel=' . $item->category_id . ':' . $item->category_alias); ?> <div style="width:<?php echo $itemWidth; ?> %" class="btp-grid-item"> <h3 class="btp-item-title"> <a href="<?php echo $link; ?> "><?php echo $item->title; ?> </a> </h3>
<?php /** * @package bt_portfolio - BT Portfolio Component * @version 2.3.0 * @created Feb 2012 * @author BowThemes * @email support@bowthems.com * @website http://bowthemes.com * @support Forum - http://bowthemes.com/forum/ * @copyright Copyright (C) 2012 Bowthemes. All rights reserved. * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ // No direct access to this file defined('_JEXEC') or die('Restricted access'); // require helper file JLoader::register('Bt_portfolioHelper', dirname(__FILE__) . '/helpers/helper.php', true); JLoader::register('Bt_portfolioLegacyHelper', dirname(__FILE__) . '/helpers/legacy.php', true); JLoader::register('BTImageHelper', dirname(__FILE__) . '/helpers/images.php'); JLoader::register('BTView', JPATH_COMPONENT . '/views/view.php'); Bt_portfolioHelper::addAdminScript(); // import joomla controller library jimport('joomla.application.component.controller'); // Get an instance of the controller prefixed by Bt_portfolio $controller = Bt_portfolioLegacyHelper::getController(); // Perform the Request task $controller->execute(JFactory::getApplication()->input->get('task')); // Redirect if set by the controller $controller->redirect();
</div> <div class="bt-handles handles-pre"> <div class="prev"></div> </div> <?php } ?> <center> <div class="bt-footernav"> <div class="bt-navpipe"> <?php foreach ($this->images as $i => $row) { ?> <?php $src_image_original = Bt_portfolioHelper::getPathImage($row->item_id, 'original', $row->filename, $this->category->id); $src_image_thumb = Bt_portfolioHelper::getPathImage($row->item_id, 'ssthumb', $row->filename, $this->category->id); ?> <div <?php if (!$this->params->get('showthumb', 1)) { echo 'style="display:none"'; } ?> class="bt-nav <?php echo $i == 0 ? 'bt-nav-first' : ($i == count($this->images) - 1 ? 'bt-nav-last' : ''); ?> "> <?php if ($this->params->get('showthumb', 1)) { ?>
function viewimage() { Bt_portfolioHelper::showWmImage(); }
} ?> </div> <?php } ?> <div class="social_share"> <?php if ($this->params->get('show_social_share')) { Bt_portfolioHelper::getSocialShare($this->params->get('social_share_buttons')); } ?> <?php if ($this->params->get('show_print')) { echo Bt_portfolioHelper::getPrintButton(1, $this->item->id); } ?> </div> <div class="clr"></div> </div><!-- end vote-social-share --> <br clear="all"> <?php if (count($this->images)) { ?> <div class="btp-slideshow"> <?php switch ($this->params->get('enable-slideshow', 'skiterslide')) { case 'skiterslide': echo $this->loadTemplate('slideshow_skitter'); break;
public static function TreeTitle($data, $tree, $id = 0, $text = '') { foreach ($data as $key) { $show_text = $text . $key->text; if ($key->parent_id == $id) { $tree[$key->value] = $show_text; $tree = Bt_portfolioHelper::TreeTitle($data, $tree, $key->value, $text . " -- "); // » } } return $tree; }
/** * Method to get a list of options for a list input. * * @return array An array of JHtml options. */ protected function getOptions() { $options = Bt_portfolioHelper::getTypeOptions(); $options = array_merge(parent::getOptions(), $options); return $options; }
$comment[$i] .= '<div class="in-content-comment">'; $comment[$i] .= '<div class="comment-info">'; $comment[$i] .= '<span class="comment-author">' . $item->name . '</span>'; $comment[$i] .= '<span class="comment-created">' . JText::sprintf('COM_BT_PORTFOLIO_CREATED_ON', JHtml::_('date', $item->created, JText::_('F d, Y')), JHTML::_('date', $item->created, JText::_('g:i a'))) . '</span>'; $comment[$i] .= '</div>'; if ($this->params->get('show_title')) { $comment[$i] .= '<div class="comment-title"> ' . $item->title . '</div>'; } $comment[$i] .= '<div class="btp-comment-item-content">' . htmlspecialchars($item->content) . '</div>'; $comment[$i] .= '</div>'; $comment[$i] .= '</div>'; $comment[$i] .= '</div>'; $comment[$i] .= '</div>'; $comment[$i] .= '<div class="clr"></div>'; } $print_button = Bt_portfolioHelper::getPrintButton(0, $this->item->id); // Process layout $html = $print_button . $this->params->get('printing_layout'); $array_key = array('{PORTFOLIO_TITLE}', '{REVIEW_SUMMARY}', '{PORTFOLIO_IMAGE}', '{EXTRA_FIELDS}', '{DESCRIPTION}', '{COMMENT_1}', '{COMMENT_2}', '{COMMENT_3}', '{COMMENT_4}', '{COMMENT_5}'); $array_text = array(); $array_text[] = $this->item->title; $array_text[] = $review_summary; $array_text[] = '<img src="' . $default_image . '" />'; $array_text[] = $extra_fields; $array_text[] = $this->item->full_description; $array_text[] = $comment[1]; $array_text[] = $comment[2]; $array_text[] = $comment[3]; $array_text[] = $comment[4]; $array_text[] = $comment[5]; $html = str_replace($array_key, $array_text, $html);
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ // No direct access. defined('_JEXEC') or die; jimport('joomla.application.component.controller'); require_once JPATH_COMPONENT . '/helpers/helper.php'; require_once JPATH_COMPONENT . '/helpers/legacy.php'; JLoader::register('BtPortfolioController', JPATH_COMPONENT . '/controllers/controller.php'); JLoader::register('BTView', JPATH_COMPONENT . '/views/view.php'); JLoader::register('BtPortfolioModel', JPATH_COMPONENT . '/models/model.php'); $app = JFactory::getApplication(); $params = $app->getParams(); $theme = $params->get('theme', 'default'); $theme_url = ''; if (is_dir(JPATH_SITE . '/templates/' . $app->getTemplate() . '/html/com_bt_portfolio/' . $theme)) { $theme_url = JURI::root() . 'templates/' . $app->getTemplate() . '/html/com_bt_portfolio/' . $theme . '/'; } elseif (is_dir(JPATH_SITE . '/components/com_bt_portfolio/themes/' . $theme)) { $theme_url = JURI::root() . 'components/com_bt_portfolio/themes/' . $theme . '/'; } if ($theme_url == '') { return JError::raiseError(500, sprintf(JText::_('COM_BT_PORTFOLIO_THEME_NOT_FOUND'), $theme)); } if (!defined('COM_BT_PORTFOLIO_THEME_URL')) { define('COM_BT_PORTFOLIO_THEME_URL', $theme_url); } if (JRequest::getVar("format") != 'raw') { Bt_portfolioHelper::addSiteScript(); } $controller = Bt_portfolioLegacyHelper::getController(); $controller->execute(JFactory::getApplication()->input->get('task')); $controller->redirect();
<!-- Slide show --> <div class="box_skitter box_skitter_large" style="background:#<?php echo $this->params->get('ss_background', '000000'); ?> ;"> <ul> <?php foreach ($this->images as $i => $image) { $src_image_large = Bt_portfolioHelper::getPathImage($image->item_id, 'large', $image->filename, $this->category->id); $src_image_original = Bt_portfolioHelper::getPathImage($image->item_id, 'original', $image->filename, $this->category->id); $src_image_thumb = Bt_portfolioHelper::getPathImage($image->item_id, 'ssthumb', $image->filename, $this->category->id); $rel = '{handler:\'iframe\'}'; $src_image_original = Bt_portfolioHelper::extractUrl($image->youembed); if (!$src_image_original) { $src_image_original = Bt_portfolioHelper::getPathImage($image->item_id, 'original', $image->filename, $this->category->id); $rel = '{handler:\'image\'}'; } ?> <li> <img class="block" src="<?php echo $src_image_large; ?> " rel="<?php echo $src_image_thumb; ?> " alt="<?php echo $image->title; ?> "/>
<select name="filter_featured" class="inputbox" onchange="this.form.submit()"> <option value=""><?php echo JText::_('COM_BT_PORTFOLIO_SELECT_FEATURED'); ?> </option> <?php echo JHtml::_('select.options', Bt_portfolioHelper::getFeaturedOptions(), 'value', 'text', $this->state->get('filter.featured')); ?> </select> <select name="filter_catid" class="inputbox" onchange="this.form.submit()"> <option value=""><?php echo JText::_('JOPTION_SELECT_CATEGORY'); ?> </option> <?php echo JHtml::_('select.options', Bt_portfolioHelper::getCategoryOptions(), 'value', 'text', $this->state->get('filter.catid')); ?> </select> <select name="filter_access" class="inputbox" onchange="this.form.submit()"> <option value=""><?php echo JText::_('JOPTION_SELECT_ACCESS'); ?> </option> <?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')); ?> </select> <select name="filter_language" class="inputbox" onchange="this.form.submit()"> <option value=""><?php echo JText::_('JOPTION_SELECT_LANGUAGE'); ?>
?> </a> </h3> <?php if ($this->params->get('allow_voting') || $this->params->get('allow_comment')) { ?> <div class="btp-item-voting"> <?php if ($this->params->get('allow_voting')) { ?> <span style="float: left; margin-right: 10px;"><?php echo JText::_('COM_BT_PORTFOLIO_VOTE_IT'); ?> </span> <?php echo Bt_portfolioHelper::getRatingPanel($item->id, $item->vote_sum, $item->vote_count); ?> <?php } ?> <?php if ($this->params->get('comment_system') == 'none' && $this->params->get('allow_comment')) { ?> <a class="review_count" href="<?php echo $link; ?> #reviews"> <?php echo $item->review_count; ?> <?php echo $item->review_count > 1 ? JText::_('COM_BT_PORTFOLIO_REVIEWS') : JText::_('COM_BT_PORTFOLIO_REVIEW');
</button> <button type="button" onclick="document.id('filter_search').value='';this.form.submit();"> <?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?> </button> </div> <div class="filter-select fltrt"> <select name="filter_published" class="inputbox" onchange="this.form.submit()"> <option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED'); ?> </option> <?php echo JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published')); ?> </select> <select name="filter_type" class="inputbox" onchange="this.form.submit()"> <option value=""><?php echo JText::_('COM_BT_PORTFOLIO_SELECT_TYPE'); ?> </option> <?php echo JHtml::_('select.options', $types, 'value', 'text', $this->state->get('filter.type')); ?> </select> </div> </fieldset>
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $id = preg_replace("/[^\\w]/", "", $this->name); $params = JComponentHelper::getParams("com_bt_portfolio"); return Bt_portfolioHelper::getVoting($id, $this->value, true, JURI::root() . 'components/com_bt_portfolio/themes/' . $params->get("theme", 'default')); }
<?php } ?> <!-- Show list portfolios --> <?php if ($this->params->get('show_portcat', 1)) { ?> <div class="btp-list" style="display:none"> <?php $i = 0; $total = count($this->items); foreach ($this->items as $item) { $i++; $img_url = Bt_portfolioHelper::getPathImage($item->id, 'thumb', $item->image, $item->category_id); $img_frame = COM_BT_PORTFOLIO_THEME_URL . 'images/image-frame.png'; $link = JRoute::_('index.php?option=com_bt_portfolio&view=portfolio&id=' . $item->id . ':' . $item->alias . '&catid_rel=' . $item->category_id . ':' . $item->category_alias); ?> <div data-id="pid<?php echo $item->id; ?> " class="btp-item p<?php echo $item->category_id; ?> <?php if ($i == 0) { echo 'item-first'; } else { if ($i == $total) { echo 'item-last';