I noticed this error and it is as under...
The ORIGINAL CODE I use in the extension builder in html tab is:
But when the extension is published with a page and I view the page HTML code, it looks totally different and gives an error when viewing on a browser.<script language="javascript" type="text/javascript">
var currentMonth;
var currentYear;
var pageX;
var pageY;
var today= new Date();
var recaptchaVersion = <?php echo $settingObj->getRecaptchaVersion(); ?>;
<?php if($settingObj->getShowFirstFilledMonth() == 0) {
?>
var newday= new Date();
<?php
} else {
?>
var newday = new Date(<?php echo $calendarObj->getFirstFilledMonth($calendarObj->getCalendarId()); ?>);
<?php
}
?>
var booking_day_white_bg = '<?php echo $settingObj->getDayWhiteBg(); ?>';
var booking_day_white_bg_hover = '<?php echo $settingObj->getDayWhiteBgHover(); ?>';
var booking_day_white_line1_color = '<?php echo $settingObj->getDayWhiteLine1Color(); ?>';
var booking_day_white_line1_color_hover = '<?php echo $settingObj->getDayWhiteLine1ColorHover(); ?>';
var booking_day_white_line2_color = '<?php echo $settingObj->getDayWhiteLine2Color(); ?>';
var booking_day_white_line2_color_hover = '<?php echo $settingObj->getDayWhiteLine2ColorHover(); ?>';
var booking_day_white_line2_bg = '<?php echo $settingObj->getDayWhiteLine2Bg(); ?>';
var booking_day_white_line2_bg_hover = '<?php echo $settingObj->getDayWhiteLine2BgHover(); ?>';
var booking_recaptcha_style = '<?php echo $settingObj->getRecaptchaStyle(); ?>';
$(function() {
$('#back_today').fadeOut(0);
getMonthCalendar((newday.getMonth()+1),newday.getFullYear(),'<?php echo $calendarObj->getCalendarId(); ?>','<?php echo $publickey; ?>');
EXTENSION CHANGED CODE (error message: parse error: syntax error, unexpected '}' in /home1/lucknow/public_html/folder1name/folder2name/index.php on line 183)
How can this be solved so that the extension builder doent put all the code into 1 line?<script language="javascript">
var currentMonth;var currentYear;var pageX;var pageY;var today=new Date();var recaptchaVersion=<?php echo $settingObj->getRecaptchaVersion();?>;<?phpif($settingObj->getShowFirstFilledMonth()==0){?>var newday=new Date();<?php}else{?>var newday=new Date(<?php echo $calendarObj->getFirstFilledMonth($calendarObj->getCalendarId());?>);<?php}?>var booking_day_white_bg='<?php echo $settingObj->getDayWhiteBg(); ?>';var booking_day_white_bg_hover='<?php echo $settingObj->getDayWhiteBgHover(); ?>';var booking_day_white_line1_color='<?php echo $settingObj->getDayWhiteLine1Color(); ?>';var booking_day_white_line1_color_hover='<?php echo $settingObj->getDayWhiteLine1ColorHover(); ?>';var booking_day_white_line2_color='<?php echo $settingObj->getDayWhiteLine2Color(); ?>';var booking_day_white_line2_color_hover='<?php echo $settingObj->getDayWhiteLine2ColorHover(); ?>';var booking_day_white_line2_bg='<?php echo $settingObj->getDayWhiteLine2Bg(); ?>';var booking_day_white_line2_bg_hover='<?php echo $settingObj->getDayWhiteLine2BgHover(); ?>';var booking_recaptcha_style='<?php echo $settingObj->getRecaptchaStyle(); ?>';$(function(){$('#back_today').fadeOut(0);getMonthCalendar((newday.getMonth()+1),newday.getFullYear(),'<?php echo $calendarObj->getCalendarId(); ?>','<?php echo $publickey; ?>');