Esempio n. 1
0
 /**
  * getChannelName.
  *
  * @param   string  $channel   Param
  * @param   bool    $isModule  Param
  *
  * @return  string
  */
 public static function getChannelName($channel, $isModule = false)
 {
     static $channels = null;
     if (is_null($channels)) {
         F0FModel::getTmpInstance('Channeltypes', 'AutotweetModel');
         $itemsModel = F0FModel::getTmpInstance('Channels', 'AutotweetModel');
         $itemsModel->set('scope', 'N');
         $itemsModel->set('published', true);
         $items = $itemsModel->getItemList(true);
         if (count($items)) {
             foreach ($items as $item) {
                 $icon = AutotweetModelChanneltypes::getIcon($item->channeltype_id);
                 if ($isModule) {
                     $channels[$item->id] = $icon;
                 } else {
                     $channels[$item->id] = $icon . ' - ' . $item->name;
                 }
             }
         } else {
             return '?';
         }
     }
     if (array_key_exists($channel, $channels)) {
         return $channels[$channel];
     } else {
         return '?';
     }
 }
Esempio n. 2
0
 * @copyright   Copyright (C) 2007 - 2015 Prieco, S.A. All rights reserved.
 * @license     http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
 * @link        http://www.extly.com http://support.extly.com
 */
// No direct access
defined('_JEXEC') or die('Restricted access');
if (!isset($social_target)) {
    $social_target = 'social_url';
}
?>
		<input type="hidden" value="<?php 
echo $this->item->xtform->get($social_target);
?>
" id="<?php 
echo $social_target;
?>
" name="xtform[<?php 
echo $social_target;
?>
]">
		<div class="<?php 
echo $social_target;
?>
"><?php 
$social_url_value = $this->item->xtform->get($social_target);
if (!empty($social_url_value)) {
    echo AutotweetModelChanneltypes::formatUrl($this->item->channeltype_id, $social_url_value);
}
?>
</div>