b1g5l1ck Posted August 26, 2009 Share Posted August 26, 2009 Hi There I am getting the following error : id ) { $row->published = 1; } $published = JHTML::_('select.radiolist', $put, 'published', '', 'value', 'text', $row->published ); return $published; } } ?> Parse error: parse error in C:\Program Files\EasyPHP 3.0\www\CleverWebsiteDesigns\administrator\components\com_tpfolio\views\settings\tmpl\default.php on line 249 Line 249 is the last line of code: Please could someone try help, Im a newbie <?php defined('_JEXEC') or die('Restricted access'); ?> <form action="index.php" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data"> <div class="col100"> <fieldset class="adminform"> <legend><?php echo JText::_( 'TPFOLIO_TPFOLIO_SETTINGS' ); ?></legend> <table class="admintable"> <tr> <td width="100" align="right" class="key"> <label for="display"> <?php echo JText::_( 'TPFOLIO_DISPLAY_PER_PAGE' ); ?>: </label> </td> <td> <input class="text_area" type="text" name="SETTINGS[display]" id="display" size="32" maxlength="250" value="<?php echo $this->settings['display'];?>" /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="width"> <?php echo JText::_( 'TPFOLIO_WIDTH' ); ?>: </label> </td> <td> <input class="text_area" type="text" name="SETTINGS[width]" id="width" size="32" maxlength="250" value="<?php echo $this->settings['width'];?>" /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="height"> <?php echo JText::_( 'TPFOLIO_HEIGHT' ); ?>: </label> </td> <td> <input class="text_area" type="text" name="SETTINGS[height]" id="height" size="32" maxlength="250" value="<?php echo $this->settings['height'];?>" /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="show_title"> <?php echo JText::_( 'TPFOLIO_SHOW_TITLE' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[show_title]" id="show_title" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['show_title']))?"checked":"";?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="show_category"> <?php echo JText::_( 'TPFOLIO_SHOW_CATEGORY' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[show_category]" id="show_category" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['show_category']))?"checked":"";?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="show_started"> <?php echo JText::_( 'TPFOLIO_SHOW_STARTED' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[show_started]" id="show_started" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['show_started']))?"checked":"";?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="show_finished"> <?php echo JText::_( 'TPFOLIO_SHOW_FINISHED' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[show_finished]" id="show_finished" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['show_finished']))?"checked":"";?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="show_client"> <?php echo JText::_( 'TPFOLIO_SHOW_CLIENT' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[show_client]" id="show_client" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['show_client']))?"checked":"";?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="show_desc"> <?php echo JText::_( 'TPFOLIO_SHOW_DESC' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[show_desc]" id="show_desc" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['show_desc']))?"checked":"";?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="apply_tpfontreplacement"> <?php echo JText::_( 'TPFOLIO_APPLY_PLUGIN_TPFONTREPLACEMENT_TO_TITLE' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[apply_tpfontreplacement]" id="apply_tpfontreplacement" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['apply_tpfontreplacement']))?"checked":"";?> /> (<?php echo JText::_('TPFOLIO_MAKE_SURE_PLUGIN_ENABLE'); ?>) </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="font"> <?php echo JText::_( 'TPFOLIO_FONT' ); ?>: </label> </td> <td> <?php if(count($this->fonts)) { ?> <select name="SETTINGS[font]" id="font"> <?php foreach($this->fonts as $font) { ?> <option value="<?php echo $font; ?>"<?php echo ($font==$this->settings['font'])?" selected=\"selected\"":""; ?>><?php echo $font; ?></option> <? } ?> </select> <? } else { ?> <input class="text_area" type="text" name="SETTINGS[font]" id="font" size="32" maxlength="250" value="<?php echo $this->settings['font'];?>" /> <? } ?> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="font_color"> <?php echo JText::_( 'TPFOLIO_FONT_COLOR' ); ?>: </label> </td> <td> <input class="text_area" type="text" name="SETTINGS[font_color]" id="font_color" size="6" maxlength="6" value="<?php echo $this->settings['font_color'];?>" /> (<?php echo JText::_('TPFOLIO_WITHOUT'); ?> "#") </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="font_bg_color"> <?php echo JText::_( 'TPFOLIO_FONT_BG_COLOR' ); ?>: </label> </td> <td> <input class="text_area" type="text" name="SETTINGS[font_bg_color]" id="font_bg_color" size="6" maxlength="6" value="<?php echo $this->settings['font_bg_color'];?>" /> (<?php echo JText::_('TPFOLIO_WITHOUT'); ?> "#") </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="font_transparent"> <?php echo JText::_( 'TPFOLIO_FONT_TRANSPARENT_FONT_BG' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[font_transparent]" id="font_transparent" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['font_transparent']))?"checked":"";?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="font_size"> <?php echo JText::_( 'TPFOLIO_FONT_SIZE' ); ?>: </label> </td> <td> <input class="text_area" type="text" name="SETTINGS[font_size]" id="font_size" size="2" maxlength="3" value="<?php echo $this->settings['font_size'];?>" /> PX </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="font_spacing"> <?php echo JText::_( 'TPFOLIO_FONT_SPACING' ); ?>: </label> </td> <td> <input class="text_area" type="text" name="SETTINGS[font_spacing]" id="font_spacing" size="2" maxlength="3" value="<?php echo $this->settings['font_spacing'];?>" /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="font_underline"> <?php echo JText::_( 'TPFOLIO_FONT_UNDERLINE' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[font_underline]" id="font_underline" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['font_underline']))?"checked":"";?> /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="font_wordwrap"> <?php echo JText::_( 'TPFOLIO_FONT_WORDWRAP' ); ?>: </label> </td> <td> <input class="text_area" type="text" name="SETTINGS[font_wordwrap]" id="font_wordwrap" size="2" maxlength="3" value="<?php echo $this->settings['font_wordwrap'];?>" /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="font_cache"> <?php echo JText::_( 'TPFOLIO_FONT_CACHE' ); ?>: </label> </td> <td> <input class="text_area" type="checkbox" name="SETTINGS[font_cache]" id="font_cache" size="32" maxlength="250" value="1" <?php echo (!empty($this->settings['font_cache']))?"checked":"";?> /> </td> </tr> </table> </fieldset> </div> <div class="clr"></div> <input type="hidden" name="option" value="com_tpfolio" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="controller" value="settings" /> </form> Quote Link to comment https://forums.phpfreaks.com/topic/171956-parse-error/ Share on other sites More sharing options...
Adam Posted August 26, 2009 Share Posted August 26, 2009 I think the short_open_tag configuration may be disabled. You've got several blocks of shorthand tags around line 137, which if weren't parsed would cause the parse error. Quote Link to comment https://forums.phpfreaks.com/topic/171956-parse-error/#findComment-906702 Share on other sites More sharing options...
b1g5l1ck Posted August 26, 2009 Author Share Posted August 26, 2009 Thanks for the reply, but I actually have no Idea what that means. I have downloaded and installed a template and this is a custom components errors. Could you let me know what to look for and what I would need to change? Thanks very much Quote Link to comment https://forums.phpfreaks.com/topic/171956-parse-error/#findComment-907080 Share on other sites More sharing options...
mikesta707 Posted August 26, 2009 Share Posted August 26, 2009 short tags are basically the php opening tags that look like <? as opposed to long tags which look like <?php. try changing all short opening tags (IE <? ) to long opening tags (IE <?php) Quote Link to comment https://forums.phpfreaks.com/topic/171956-parse-error/#findComment-907084 Share on other sites More sharing options...
b1g5l1ck Posted August 26, 2009 Author Share Posted August 26, 2009 Thanks very much that problem is fixed, now on a different page I get the following error: Published: Fatal error: Class 'TPFolioHelper' not found in C:\Program Files\EasyPHP 3.0\www\CleverWebsiteDesigns\administrator\components\com_tpfolio\views\image\tmpl\form.php on line 81 <?php defined('_JEXEC') or die('Restricted access'); ?> <script language="javascript" type="text/javascript"> <!-- function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } // do field validation if (form.folioid.selectedIndex == 0){ alert( "<?php echo JText::_( 'TPFOLIO_PORTFOLIO_MUST_HAVE_A_PORTFOLIO_ID', true ); ?>" ); } else if (form.title.value == ""){ alert( "<?php echo JText::_( 'TPFOLIO_IMAGE_MUST_HAVE_A_TITLE', true ); ?>" ); <?php if(empty($this->image->name)) { ?> } else if (form.imagefile.value == ""){ alert( "<?php echo JText::_( 'TPFOLIO_PLEASE_SELECT_A_IMAGE_TO_UPLOAD', true ); ?>" ); <?php } ?> } else { submitform( pressbutton ); } } //--> </script> <form action="index.php" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data"> <div class="col100"> <fieldset class="adminform"> <legend><?php echo JText::_( 'TPFOLIO_DETAILS' ); ?></legend> <table class="admintable"> <tr> <td valign="top"> <table class="admintable"> <tr> <td width="100" align="right" class="key"> <label for="imagefile"> <?php echo JText::_( 'TPFOLIO_IMAGE_FILE' ); ?>: </label> </td> <td> <input class="text_area" type="file" name="imagefile" id="imagefile" size="32" /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="folioid"> <?php echo JText::_( 'TPFOLIO_PORTFOLIO' ); ?>: </label> </td> <td> <?php echo $this->lists['portfolio']; ?> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="title"> <?php echo JText::_( 'TPFOLIO_TITLE' ); ?>: </label> </td> <td> <input class="text_area" type="text" name="title" id="title" size="32" maxlength="250" value="<?php echo $this->image->title;?>" /> </td> </tr> <tr> <td width="100" align="right" class="key"> <label for="published"> <?php echo JText::_( 'TPFOLIO_PUBLISHED' ); ?>: </label> </td> <td> <?php echo TPFolioHelper::Published($this->image); ?>: </td> </tr> </table> </td> <?php if(!empty($this->image->name)) { if(file_exists(JPATH_SITE . DS . 'images' . DS . 'tpfolio' . DS . 'resized' . DS . $this->image->name)) { ?> <td> <?php $img_path = $mainframe->getSiteURL() . '/images/tpfolio/resized/' . $this->image->name; list($width, $height, $type, $attr) = getimagesize(JPATH_SITE . DS . 'images' . DS . 'tpfolio' . DS . 'resized' . DS . $this->image->name); ?> <img border="1" src="<?php echo $img_path; ?>" alt="<?php echo JText::_( 'No preview available' ); ?>" width="<?php echo $width; ?>" height="<?php echo $height; ?>"; /> </td> <?php } } ?> </tr> </table> </fieldset> </div> <div class="clr"></div> <input type="hidden" name="option" value="com_tpfolio" /> <input type="hidden" name="id" value="<?php echo $this->image->id; ?>" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="name" value="<?php echo $this->image->name; ?>" /> <input type="hidden" name="controller" value="images" /> </form> Quote Link to comment https://forums.phpfreaks.com/topic/171956-parse-error/#findComment-907111 Share on other sites More sharing options...
b1g5l1ck Posted August 26, 2009 Author Share Posted August 26, 2009 Oh , Line 81 is the following code: <?php echo TPFolioHelper::Published($this->image); ?>: Quote Link to comment https://forums.phpfreaks.com/topic/171956-parse-error/#findComment-907112 Share on other sites More sharing options...
Adam Posted August 27, 2009 Share Posted August 27, 2009 Clue's in the error.. "Class 'TPFolioHelper' not found". Basically means you haven't included the neccesary class files. Take a look at other parts of your code base and see if they "include" / "require" any files you don't (likely to be at the top of the file). Quote Link to comment https://forums.phpfreaks.com/topic/171956-parse-error/#findComment-907319 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.