b1g5l1ck Posted August 26, 2009 Share Posted August 26, 2009 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 Line 81 is <?php echo TPFolioHelper::Published($this->image); ?>: Can Anyone see where or what the problem is? <?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> Thank you Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted August 27, 2009 Share Posted August 27, 2009 Somewhere there is a file that defines your class: somefile.php class TPFolioHelper { /* ... */ } You need to require_once( 'somefile.php' ); in your script so that PHP knows what TPFolioHelper is. Quote Link to comment 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.