コード例 #1
0
ファイル: Default.php プロジェクト: blocher/oneholyname
 /** GET FORM ----------------------------------------------------------------------------------------------------------------------------------------------
  * Render a form to give this button custom options.
  *
  * @return string
  */
 public final function getForm()
 {
     return XLII_GUIFactory::hidden(array('name' => $this->_field('position'), 'id' => '', 'value' => $this->option('position'), 'class' => 'position')) . XLII_GUIFactory::hidden(array('name' => $this->_field('type'), 'id' => '', 'value' => $this->getType())) . XLII_GUIFactory::hidden(array('name' => 'order[]', 'id' => '', 'value' => 'template', 'class' => 'order')) . $this->_getForm();
 }
コード例 #2
0
ファイル: Google.php プロジェクト: blocher/oneholyname
 /** _GET FORM ---------------------------------------------------------------------------------------------------------------------------------------------
  * Render a form to give this button custom options, inner helper method of @see form. This is the only way a form can be overloaded.
  *
  * @return string
  */
 protected function _getForm()
 {
     return '<strong>Layout</strong>' . '<div class = "buttonselect">' . XLII_GUIFactory::radio(array('name' => $this->_field('button'), 'value' => $this->option('button'), 'options' => array('none' => '<span class = "xlii-icon google none"></span>', 'bubble' => '<span class = "xlii-icon google bubble"></span>', 'inline' => '<span class = "xlii-icon google inline"></span><span class = "icontext">... people +1\'d this.</span>'))) . '</div>';
 }
コード例 #3
0
ファイル: Twitter.php プロジェクト: blocher/oneholyname
 /** _GET FORM ---------------------------------------------------------------------------------------------------------------------------------------------
  * Render a form to give this button custom options, inner helper method of @see form. This is the only way a form can be overloaded.
  *
  * @return string
  */
 protected function _getForm()
 {
     return '<strong>Layout</strong>' . '<div class = "buttonselect">' . XLII_GUIFactory::radio(array('name' => $this->_field('button'), 'value' => $this->option('button'), 'options' => array('none' => '<span class = "xlii-icon twitter none"></span>', 'horizontal' => '<span class = "xlii-icon twitter horizontal"></span>', 'vertical' => '<span class = "xlii-icon twitter vertical"></span>'))) . '</div>';
 }
コード例 #4
0
ファイル: xlii-admin.php プロジェクト: blocher/oneholyname
function xlii_smt_adminpage_ga()
{
    if (isset($_POST['save'])) {
        xlii_smt_adminprocess_ga();
    }
    $settings = _xlii_smt_ga_options();
    if (!$settings['code']) {
        $settings['code'] = "var _gaq = _gaq || [];\n         _gaq.push(['_setAccount', 'XX-XXXXXXXX-X']);\n         _gaq.push(['_trackPageview']);\n\n         (function() {\n            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n          })();";
    }
    ?>
    <form action="<?php 
    echo esc_attr($_SERVER['REQUEST_URI']);
    ?>
" method="post">
        <div class="wrap">
    	    <?php 
    screen_icon();
    ?>
    	    <h2><?php 
    _e('Social Media Tracker');
    ?>
</h2>
    	    <?php 
    _xlii_smt_notify();
    _xlii_smt_navigation();
    ?>
            <div id = "xlii-admin" class = "analytics">
                <?php 
    echo '<div class = "form">
                        <div class = "row">' . XLII_GUIFactory::textarea(array('label' => __('Analytics code'), 'name' => 'code', 'value' => $settings['code'], 'style' => 'width:600px;height:250px;')) . '</div>
                        <div class = "row">' . XLII_GUIFactory::checkbox(array('label' => __('Track button interaction'), 'value' => $settings['tracking'], 'name' => 'tracking')) . '
                            <p class = "description">' . __('You can check this box if you\'d like to track the interaction with the social media buttons.') . '</p>
                        </div>
                        <div class = "row">' . XLII_GUIFactory::checkbox(array('label' => __('Append code to website'), 'value' => $settings['enabled'], 'name' => 'enabled')) . '
                            <p class = "description">' . __('In order to work propperly the Social Media Tracking plugin requires a valid Google Analytics code to be implemented on your website. In case you didn\'t implemented this 
                                   code already our plugin can do it for you, the only thing you have to do is to') . ' <label for = "enabled" class = "link">click here</label> ' . __('and replace XX-XXXXXXXX-X in the sample
                                   by your own code.') . '
                            </p>
        	                <p class = "description">
        	                    <span style = "margin-top:-10px;">' . __('Your tracking code can be found in your Google Analytics panel.') . '</span>
        	                    <img src = "' . XLII_SMT_BASE . 'media/gacode.png" alt = "Tracking code" title = "Tracking code" style = "vertical-align:baseline;" />
        	                </p>
                        </div>
                        ' . XLII_GUIFactory::submit(array('label' => __('Save state'), 'name' => 'save')) . '
                      </div>';
    ?>
            </div>
        </div>
    </form>
    <?php 
}
コード例 #5
0
ファイル: Facebook.php プロジェクト: blocher/oneholyname
 /** _GET FORM ---------------------------------------------------------------------------------------------------------------------------------------------
  * Render a form to give this button custom options, inner helper method of @see form. This is the only way a form can be overloaded.
  *
  * @return string
  */
 protected function _getForm()
 {
     return '<strong>Layout</strong>' . '<div class = "buttonselect">' . XLII_GUIFactory::radio(array('name' => $this->_field('button'), 'value' => $this->option('button'), 'options' => array('standard' => '<span class = "xlii-icon facebook plain"></span><span class = "icontext">... people like this. Be the first of your friends.</span>', 'button_count' => '<span class = "xlii-icon facebook horizontal"></span>', 'box_count' => '<span class = "xlii-icon facebook vertical"></span>'))) . '</div>' . XLII_GUIFactory::checkbox(array('name' => $this->_field('send'), 'value' => $this->option('send'), 'label' => __('Include send button')));
 }
コード例 #6
0
 /** SET SOURCE --------------------------------------------------------------------------------------------------------------------------------------------
  * Set the source used for fetching the elements values.
  *
  * @param   enum $type The source type to fetch values from.
  */
 public static function setSource($type)
 {
     self::$_source = $type;
 }