mefis
Usuario de Bronce
- Mensajes
- 525
- Puntuación de reacción
- 0
Tengo un problema con este error y ya llevo horas tratando de solucionar:
Parse error: syntax error, unexpected 'class' (T_CLASS) in /home/nombredelaweb/public_html/wp-content/thesis/boxes/blog-ad-sidebar-optin-box/box.php on line 1
<?php
/*
Name: Blog Ad Post Optin box
Author: wpthesisskins.com
Description: Blog Ad Post Optin box for Thesis Theme 2.0.
Version: 1.0
Class: blog_ad_post_optinbox
*/
class blog_ad_post_optinbox extends thesis_box {
protected function translate() {
$this->title = __('Blog Ad Post Optin box', 'thesis');
}
protected function construct() {
wp_enqueue_script( 'Jscolor', get_template_directory_uri() . '/lib/js/jscolor/jscolor.js', array('thesis-options'), $thesis->version, true);
wp_enqueue_script('optin-box956', THESIS_USER_BOXES_URL . "/blog-ad-sidebar-optin-box/js/jquery-1.8.2.js");
wp_enqueue_script('optin-box957', THESIS_USER_BOXES_URL . "/blog-ad-sidebar-optin-box/js/myjs.js");
}
protected function options() {
global $thesis;
return array(
'optincheck' => array(
'type' => 'checkbox',
'label' => __('Display Post optin box', 'thesis'),
'options' => array(
'optinchecktext' => __('Click here to enable Post optin box', 'thesis'),
),
'default' => array(
'optinchecktext' => false,
'html' => ''
)
),
'html' => array(
'type' => 'textarea',
'width' => 'long',
'label' => __('Paste your html code', 'thesis'),
'tooltip' => sprintf(__('Here to paste your html code', 'thesis')),
'default' => ''
),
'name' => array(
'type' => 'text',
'width' => 'medium',
'label' => __('Form name ', 'thesis'),
'tooltip' => sprintf(__('Name is automatically taken from your html code', 'thesis')),
'default' => ''
),
'email' => array(
'type' => 'text',
'width' => 'medium',
'label' => __('Form email ', 'thesis'),
'tooltip' => sprintf(__('Email is automatically taken from your html code', 'thesis')),
'default' => ''
),
'url' => array(
'type' => 'text',
'width' => 'long',
'label' => __('Form action url ', 'thesis'),
'tooltip' => sprintf(__('Action url is automatically taken from your html code<div id="thesis_adsensepost_hdn_div2" style="display:none"></div><div id="thesis_adsensepost_hdn_div" style="display:none"></div>', 'thesis')),
'default' => ''
),
'hidden' => array(
'type' => 'textarea',
'width' => 'long',
'label' => __('Hidden fields', 'thesis'),
'tooltip' => sprintf(__('The hidden fields are automatically taken from your html code)"', 'thesis')),
'default' => ''
),
'optinheadertext' => array(
'type' => 'text',
'width' => 'long',
'label' => __('Enter your optinbox top header text ', 'thesis'),
'tooltip' => sprintf(__('If you want to change optinbox top header text then enter your text here', 'thesis')),
'default' => 'Heading'
),
'optinheadertextcl' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Select your optinbox top header text color ', 'thesis'),
'tooltip' => sprintf(__('Select your optinbox top header text color ', 'thesis')),
'default' => 'ffffff'
),
'optinheaderslogantext' => array(
'type' => 'textarea',
'width' => 'long',
'label' => __('Enter your optinbox top header slogan text ', 'thesis'),
'tooltip' => sprintf(__('If you want to change optinbox top header slogan text then enter your slogan text here', 'thesis')),
'default' => 'Sub title'
),
'optinheaderslogantextcl' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Select your optinbox top header slogan text color ', 'thesis'),
'tooltip' => sprintf(__('Select your optinbox top header slogan text color ', 'thesis')),
'default' => 'eeeeee'
),
'widgetoptinbuttontext' => array(
'type' => 'text',
'width' => 'long',
'label' => __('Enter your optinbox button text ', 'thesis'),
'tooltip' => sprintf(__('If you want to change optinbox button text then enter your button text here', 'thesis')),
'default' => 'GET STARTED'
),
'bg1color' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Background linear gradient top color ', 'thesis'),
'tooltip' => sprintf(__('Here to change your background linear gradient top color value', 'thesis')),
'default' => '999999'
),
'bg2color' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Background linear gradient bottom color ', 'thesis'),
'tooltip' => sprintf(__('Here to change your background linear gradient bottom color value', 'thesis')),
'default' => '555555'
),
'bordercolor' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Select top border color ', 'thesis'),
'tooltip' => sprintf(__('Select top border color', 'thesis')),
'default' => 'dddddd'
),
'buttonbg1color' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Button background linear gradient top color ', 'thesis'),
'tooltip' => sprintf(__('Here to change your background linear gradient top color value', 'thesis')),
'default' => '5BAE2C'
),
'buttonbg2color' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Button background linear gradient bottom color ', 'thesis'),
'tooltip' => sprintf(__('Here to change your background linear gradient bottom color value', 'thesis')),
'default' => '5BAE2C'
),
'txtcolor' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Select Button Text Color ', 'thesis'),
'tooltip' => sprintf(__('Select Your Button text color value <code>color</code>', 'thesis')),
'default' => 'fff',
),
);
}
public function html() {
global $thesis;
// get options
$options = $thesis->api->get_options($this->options(), $this->options);
// form starts here
if( $options['optincheck']){
$optin .= '<div class="thesis_adsensepost_optinr" style="background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#'.$options['bg1color'].'), to(#'.$options['bg2color'].'));
background: -webkit-linear-gradient(top, #'.$options['bg1color'].', #'.$options['bg2color'].');
background: -moz-linear-gradient(top, #'.$options['bg1color'].', #'.$options['bg2color'].');
background: -ms-linear-gradient(top, #'.$options['bg1color'].', #'.$options['bg2color'].');
background: -o-linear-gradient(top, #'.$options['bg1color'].', #'.$options['bg2color'].');
border-top:10px solid #'.$options['bordercolor'].';
background:#'.$options['bg1color'].';
"><div class="thesis_adsensepost_optin_inr">
<div class="form_outerr">
<h2 class="adsensepost_titr" style="color:#'.$options['optinheadertextcl'].';">'.$options['optinheadertext'].'</h2>
<p style="color:#'.$options['optinheaderslogantextcl'].';"> '.$options['optinheaderslogantext'].'</p>
<form method="post" class="af-form-wrapperr" action="'.$options['url'].'" target="_blank" >
<input class="namer" type="text" name="'.$options['name'].'" onfocus="if (this.value == \'Enter your name\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'Enter your name\';}" value="Enter your name" size="20">
<span class="name_imgr"></span>
<input class="emailr" type="text" name="'.$options['email'].'" onfocus="if (this.value == \'Enter your email\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'Enter your email\';}" value="Enter your email" size="20">
<span class="email_imgr"></span>'
.$options['hidden'].
'
<input name="submit" class="submitr" type="submit" value="'.$options['widgetoptinbuttontext'].'" tabindex="501" style="background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#'.$options['buttonbg1color'].'), to(#'.$options['buttonbg2color'].'));
background: -webkit-linear-gradient(top, #'.$options['buttonbg1color'].', #'.$options['buttonbg2color'].');
background: -moz-linear-gradient(top, #'.$options['buttonbg1color'].', #'.$options['buttonbg2color'].');
background: -ms-linear-gradient(top, #'.$options['buttonbg1color'].', #'.$options['buttonbg2color'].');
background: -o-linear-gradient(top, #'.$options['buttonbg1color'].', #'.$options['buttonbg2color'].');
color:#'.$options['txtcolor'].';
background:#'.$options['buttonbg1color'].';
"/>
</form> </div> </div> </div>';
}
// form ends here
// ------------------------------------------------------------------------
// display options
// ------------------------------------------------------------------------
echo $optin;
}
}
?>
Parse error: syntax error, unexpected 'class' (T_CLASS) in /home/nombredelaweb/public_html/wp-content/thesis/boxes/blog-ad-sidebar-optin-box/box.php on line 1
<?php
/*
Name: Blog Ad Post Optin box
Author: wpthesisskins.com
Description: Blog Ad Post Optin box for Thesis Theme 2.0.
Version: 1.0
Class: blog_ad_post_optinbox
*/
class blog_ad_post_optinbox extends thesis_box {
protected function translate() {
$this->title = __('Blog Ad Post Optin box', 'thesis');
}
protected function construct() {
wp_enqueue_script( 'Jscolor', get_template_directory_uri() . '/lib/js/jscolor/jscolor.js', array('thesis-options'), $thesis->version, true);
wp_enqueue_script('optin-box956', THESIS_USER_BOXES_URL . "/blog-ad-sidebar-optin-box/js/jquery-1.8.2.js");
wp_enqueue_script('optin-box957', THESIS_USER_BOXES_URL . "/blog-ad-sidebar-optin-box/js/myjs.js");
}
protected function options() {
global $thesis;
return array(
'optincheck' => array(
'type' => 'checkbox',
'label' => __('Display Post optin box', 'thesis'),
'options' => array(
'optinchecktext' => __('Click here to enable Post optin box', 'thesis'),
),
'default' => array(
'optinchecktext' => false,
'html' => ''
)
),
'html' => array(
'type' => 'textarea',
'width' => 'long',
'label' => __('Paste your html code', 'thesis'),
'tooltip' => sprintf(__('Here to paste your html code', 'thesis')),
'default' => ''
),
'name' => array(
'type' => 'text',
'width' => 'medium',
'label' => __('Form name ', 'thesis'),
'tooltip' => sprintf(__('Name is automatically taken from your html code', 'thesis')),
'default' => ''
),
'email' => array(
'type' => 'text',
'width' => 'medium',
'label' => __('Form email ', 'thesis'),
'tooltip' => sprintf(__('Email is automatically taken from your html code', 'thesis')),
'default' => ''
),
'url' => array(
'type' => 'text',
'width' => 'long',
'label' => __('Form action url ', 'thesis'),
'tooltip' => sprintf(__('Action url is automatically taken from your html code<div id="thesis_adsensepost_hdn_div2" style="display:none"></div><div id="thesis_adsensepost_hdn_div" style="display:none"></div>', 'thesis')),
'default' => ''
),
'hidden' => array(
'type' => 'textarea',
'width' => 'long',
'label' => __('Hidden fields', 'thesis'),
'tooltip' => sprintf(__('The hidden fields are automatically taken from your html code)"', 'thesis')),
'default' => ''
),
'optinheadertext' => array(
'type' => 'text',
'width' => 'long',
'label' => __('Enter your optinbox top header text ', 'thesis'),
'tooltip' => sprintf(__('If you want to change optinbox top header text then enter your text here', 'thesis')),
'default' => 'Heading'
),
'optinheadertextcl' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Select your optinbox top header text color ', 'thesis'),
'tooltip' => sprintf(__('Select your optinbox top header text color ', 'thesis')),
'default' => 'ffffff'
),
'optinheaderslogantext' => array(
'type' => 'textarea',
'width' => 'long',
'label' => __('Enter your optinbox top header slogan text ', 'thesis'),
'tooltip' => sprintf(__('If you want to change optinbox top header slogan text then enter your slogan text here', 'thesis')),
'default' => 'Sub title'
),
'optinheaderslogantextcl' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Select your optinbox top header slogan text color ', 'thesis'),
'tooltip' => sprintf(__('Select your optinbox top header slogan text color ', 'thesis')),
'default' => 'eeeeee'
),
'widgetoptinbuttontext' => array(
'type' => 'text',
'width' => 'long',
'label' => __('Enter your optinbox button text ', 'thesis'),
'tooltip' => sprintf(__('If you want to change optinbox button text then enter your button text here', 'thesis')),
'default' => 'GET STARTED'
),
'bg1color' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Background linear gradient top color ', 'thesis'),
'tooltip' => sprintf(__('Here to change your background linear gradient top color value', 'thesis')),
'default' => '999999'
),
'bg2color' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Background linear gradient bottom color ', 'thesis'),
'tooltip' => sprintf(__('Here to change your background linear gradient bottom color value', 'thesis')),
'default' => '555555'
),
'bordercolor' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Select top border color ', 'thesis'),
'tooltip' => sprintf(__('Select top border color', 'thesis')),
'default' => 'dddddd'
),
'buttonbg1color' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Button background linear gradient top color ', 'thesis'),
'tooltip' => sprintf(__('Here to change your background linear gradient top color value', 'thesis')),
'default' => '5BAE2C'
),
'buttonbg2color' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Button background linear gradient bottom color ', 'thesis'),
'tooltip' => sprintf(__('Here to change your background linear gradient bottom color value', 'thesis')),
'default' => '5BAE2C'
),
'txtcolor' => array(
'type' => 'text',
'width' => 'medium color',
'label' => __('Select Button Text Color ', 'thesis'),
'tooltip' => sprintf(__('Select Your Button text color value <code>color</code>', 'thesis')),
'default' => 'fff',
),
);
}
public function html() {
global $thesis;
// get options
$options = $thesis->api->get_options($this->options(), $this->options);
// form starts here
if( $options['optincheck']){
$optin .= '<div class="thesis_adsensepost_optinr" style="background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#'.$options['bg1color'].'), to(#'.$options['bg2color'].'));
background: -webkit-linear-gradient(top, #'.$options['bg1color'].', #'.$options['bg2color'].');
background: -moz-linear-gradient(top, #'.$options['bg1color'].', #'.$options['bg2color'].');
background: -ms-linear-gradient(top, #'.$options['bg1color'].', #'.$options['bg2color'].');
background: -o-linear-gradient(top, #'.$options['bg1color'].', #'.$options['bg2color'].');
border-top:10px solid #'.$options['bordercolor'].';
background:#'.$options['bg1color'].';
"><div class="thesis_adsensepost_optin_inr">
<div class="form_outerr">
<h2 class="adsensepost_titr" style="color:#'.$options['optinheadertextcl'].';">'.$options['optinheadertext'].'</h2>
<p style="color:#'.$options['optinheaderslogantextcl'].';"> '.$options['optinheaderslogantext'].'</p>
<form method="post" class="af-form-wrapperr" action="'.$options['url'].'" target="_blank" >
<input class="namer" type="text" name="'.$options['name'].'" onfocus="if (this.value == \'Enter your name\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'Enter your name\';}" value="Enter your name" size="20">
<span class="name_imgr"></span>
<input class="emailr" type="text" name="'.$options['email'].'" onfocus="if (this.value == \'Enter your email\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'Enter your email\';}" value="Enter your email" size="20">
<span class="email_imgr"></span>'
.$options['hidden'].
'
<input name="submit" class="submitr" type="submit" value="'.$options['widgetoptinbuttontext'].'" tabindex="501" style="background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#'.$options['buttonbg1color'].'), to(#'.$options['buttonbg2color'].'));
background: -webkit-linear-gradient(top, #'.$options['buttonbg1color'].', #'.$options['buttonbg2color'].');
background: -moz-linear-gradient(top, #'.$options['buttonbg1color'].', #'.$options['buttonbg2color'].');
background: -ms-linear-gradient(top, #'.$options['buttonbg1color'].', #'.$options['buttonbg2color'].');
background: -o-linear-gradient(top, #'.$options['buttonbg1color'].', #'.$options['buttonbg2color'].');
color:#'.$options['txtcolor'].';
background:#'.$options['buttonbg1color'].';
"/>
</form> </div> </div> </div>';
}
// form ends here
// ------------------------------------------------------------------------
// display options
// ------------------------------------------------------------------------
echo $optin;
}
}
?>