Jump to content

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/171956-parse-error/
Share on other sites

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>

Link to comment
https://forums.phpfreaks.com/topic/171956-parse-error/#findComment-907111
Share on other sites

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).

Link to comment
https://forums.phpfreaks.com/topic/171956-parse-error/#findComment-907319
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.