Example #1
0
 public static function addAdminScript()
 {
     $checkJqueryLoaded = false;
     $document = JFactory::getDocument();
     $header = $document->getHeadData();
     JHTML::_('behavior.framework');
     if (!version_compare(JVERSION, '3.0', 'ge')) {
         foreach ($header['scripts'] as $scriptName => $scriptData) {
             if (substr_count($scriptName, '/jquery')) {
                 $checkJqueryLoaded = true;
             }
         }
         //Add js
         if (!$checkJqueryLoaded) {
             $document->addScript(JURI::root() . 'components/com_bt_socialconnect/assets/js/jquery.min.js');
         }
     }
     $document->addScript(JURI::root() . 'components/com_bt_socialconnect/assets/js/default.js');
     $document->addScript(JURI::root() . 'components/com_bt_socialconnect/assets/js/menu.js');
     $document->addScript(JURI::root() . 'administrator/components/com_bt_socialconnect/assets/js/bt_social.js');
     $document->addScriptDeclaration('jQuery.noConflict();');
     $document->addStyleSheet(JURI::root() . 'components/com_bt_socialconnect/assets/icon/admin.css');
     $document->addStyleSheet(JURI::root() . 'components/com_bt_socialconnect/assets/css/legacy.css');
     $document->addStyleSheet(JURI::root() . 'administrator/components/com_bt_socialconnect/assets/css/bt_social.css');
     if (!Bt_SocialconnectLegacyHelper::isLegacy()) {
         JHtml::_('formbehavior.chosen', 'select');
     }
 }
Example #2
0
 function display($tpl = null)
 {
     Bt_SocialconnectLegacyHelper::getCSS();
     $this->legacy = Bt_SocialconnectLegacyHelper::isLegacy();
     Bt_SocialconnectAdminHelper::addSubmenu('cpanel');
     $this->addToolBar();
     /*---------------*/
     $buttons = $this->getButtons();
     $channel = $this->getSocials();
     $extension = $this->getExtension();
     $widget = $this->getWidget();
     $user = $this->getUser();
     $number_click = $this->getClick();
     $content = $this->getContent();
     //Assign
     $this->assign('buttons', $buttons);
     $this->assign('channel', $channel);
     $this->assign('extension', $extension);
     $this->assign('widget', $widget);
     $this->assign('user', $user);
     $this->assign('number_click', $number_click);
     $this->assign('content', $content);
     parent::display($tpl);
     $this->setDocument();
 }
Example #3
0
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->legacy = Bt_SocialconnectLegacyHelper::isLegacy();
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     Bt_SocialconnectAdminHelper::addSubmenu('userfields');
     $this->addToolbar();
     parent::display($tpl);
     $this->setDocument();
 }
Example #4
0
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->folder = $this->get('ItemFolder');
     $this->legacy = Bt_SocialconnectLegacyHelper::isLegacy();
     $document = JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . "/components/com_bt_socialconnect/models/fields/assets/css/obsocialsubmit.css");
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     Bt_SocialconnectAdminHelper::addSubmenu('channels');
     $this->addToolbar();
     parent::display($tpl);
     $this->setDocument();
 }
Example #5
0
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->folder = $this->get('ItemFolder');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->legacy = Bt_SocialconnectLegacyHelper::isLegacy();
     $this->wgtype = $this->getWidgettype();
     $this->publishOption = $this->publishedOptions();
     $document = JFactory::getDocument();
     $document->addStyleSheet(JPATH_COMPONENT_ADMINISTRATOR . "/models/fields/assets/css/obsocialsubmit.css");
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     if (JFactory::getApplication()->isAdmin()) {
         Bt_SocialconnectAdminHelper::addSubmenu('widgets');
         $this->addToolbar();
     }
     parent::display($tpl);
     $this->setDocument();
 }
Example #6
0
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.tooltip');
?>


 <fieldset>
   <legend><h3 class="modal-title"><?php 
echo JText::_('COM_BT_SOCIALCONNECT_TYPE_CHOOSE');
?>
</h3></legend>
<ul id="new-widget-list">
<?php 
foreach ($this->Items as &$item) {
    ?>
	<li style="float:left;<?php 
    echo !Bt_SocialconnectLegacyHelper::isLegacy() ? 'width:50%' : 'width:30%';
    ?>
">
		<?php 
    // Prepare variables for the link.
    $name = $this->escape($item->title);
    $link = 'index.php?option=com_bt_socialconnect&task=widget.add&wgtype=' . $item->type . '&title=' . $name;
    $desc = $this->escape($item->desc);
    ?>
		<span class="editlinktip hasTip" title="<?php 
    echo $name . ' :: ' . $desc;
    ?>
">
			<a href="<?php 
    echo JRoute::_($link);
    ?>
Example #7
0
 * @package 	bt_socialconnect - BT Social Connect Component
 * @version		1.0.0
 * @created		February 2014
 * @author		BowThemes
 * @email		support@bowthems.com
 * @website		http://bowthemes.com
 * @support		Forum - http://bowthemes.com/forum/
 * @copyright	Copyright (C) 2014 Bowthemes. All rights reserved.
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
defined('_JEXEC') or die;
require_once JPATH_ADMINISTRATOR . '/components/com_bt_socialconnect/widgets/btwidget.php';
?>

<div class="form-validate <?php 
echo !Bt_SocialconnectLegacyHelper::isLegacy() ? 'isJ30' : 'isJ25';
?>
">
	<ul class="nav nav-tabs">
		<li class="active"><a href="#preview"><label><?php 
echo Jtext::_('COM_BT_SOCIALCONNECT_PREVIEW');
?>
</label></a> </li>
		<li><a href="#plugin"><label><?php 
echo Jtext::_('COM_BT_SOCIALCONNECT_PLUGIN_INSERT');
?>
</label></a></li>
		<li><a href="#htmlcode"><label><?php 
echo Jtext::_('COM_BT_SOCIALCONNECT_CODE_HTML');
?>
</label></a></li>
Example #8
0
    static function prepareData($option, $item)
    {
        JHtml::_('behavior.modal');
        $html = '<div class="box-inner dashboard"><div class="box-message ">';
        switch ($option) {
            case 'dashboard':
                if (empty($item) && (int) self::itemChannel() != 0) {
                    return;
                }
                $html .= '<h3>Welcome to BT Social Connect</h3>';
                if (!empty($item)) {
                    if (Bt_SocialconnectLegacyHelper::isLegacy()) {
                        $html .= '- You have not yet configured for ' . implode(',', $item) . ' API! Please go to <a  href="' . JRoute::_('index.php?option=com_config&amp;view=component&amp;component=com_bt_socialconnect&amp;path=&amp;tmpl=component') . '" class="bt_config">configuration</a> to setup now! <br/>';
                    } else {
                        $html .= '- You have not yet configured for ' . implode(',', $item) . ' API! Please go to <a  href="' . JRoute::_('index.php?option=com_config&amp;view=component&amp;component=com_bt_socialconnect') . '" >configuration</a> to setup now! <br/>';
                    }
                }
                if ((int) self::itemChannel() == 0) {
                    $html .= '- You have to create at least one channel to active social publishing. Go to <a  href="' . JRoute::_('index.php?option=com_bt_socialconnect&view=social&tmpl=component') . '" class="bt_config">channels manager</a> to create one now!';
                }
                break;
            case 'widgets':
                $html .= '<h3>Tips:</h3>';
                $html .= '- You can embed all widget bellow into your article, your custom module and even your template code. <br/>';
                $html .= '- All widgets are defined in <i>administrator/components/com_bt_socialconnect/widgets/</i> folder, you can create one for your own!';
                break;
            case 'socialconnects':
                $html .= '<h3>Tips:</h3>';
                $html .= '- You should manager users here instead of User Manager default component.<br>
						- If you want to show only facebook user, choose "facebook" value of "- User type -" filter.<br>
						- All columns (Avatar, Gender, Profile link, Birthday, City, About) can be added/removed or shown/hidden in <a target="_blank"  href="index.php?option=com_bt_socialconnect&view=userfields">User fields</a> manager.
				';
                break;
            case 'userfields':
                $html .= '<h3>Tips:</h3>';
                $html .= '- Custom user profile fields can be created here.';
                break;
            case 'channels':
                $html .= '<h3>Tips:</h3>';
                $html .= ' - When an action (creating article, user registration...) occurs, a message will be created and pushed into all enabled channels you created bellow here.<br />
						 - You can define the message templates in <a target="_blank" href="index.php?option=com_plugins&view=plugins&filter_search=autosubmit">autosubmit</a> plugins.
						';
                break;
            case 'messages':
                $html .= '<h3>Tips:</h3>';
                $html .= '- Messages are auto created by <a target="_blank"  href="index.php?option=com_plugins&view=plugins&filter_search=autosubmit">autosubmit</a> plugins or created manually (Click "new", "multiple add" buttons).<br />
						- Messages are sent to the channels as facebook page, twitter, email...<br>
						- You can count how many people have read the message (see the "Number of clicks") column.<br>
						- You can delay or schedule sending messages (Enable cron job option and then set scheduling time).
						';
                break;
            default:
                break;
        }
        $html .= '<button class="button-message" onclick="checkClick(\'' . $option . '\');" type="button">×</button>';
        $html .= '</div></div>';
        return $html;
    }