I'm developing a reporting system for the front end of my joomla 15 website. Following the advice not to use the jToolBarHelper method I've been able to get the component to show various buttons. This all works fine with php4 but when I switch to php5 I get the following error message:
Fatal error: Class 'JToolBar' not found in C:\wamp\www\BEPlacements\components\com_primaryc\views\primary\view.html.php on line 18
Here is how I have created the toolbar from within the view.html.php
Code: Select all
$bar =& new JToolBar( 'My ToolBar' );
$bar->appendButton( 'Standard', 'addNew', 'addNew', 'addNew', true, true );
$bar->appendButton( 'Standard', 'new', 'New', 'add', false, true );
$bar->appendButton( 'Standard', 'edit','edit','add',true,true);
$bar->appendButton( 'Standard','review','review','review');
$bar->appendButton( 'Standard','print', 'print','print');
$bar->appendButton( 'Popup', 'new', 'Popup Test', 'http://www.joomla.org', 300, 300, 150, 150 );
echo $bar->render();
Can anybody shed some light on why this code works for php4 but not php5 and whether there is anyway of producing a toolbar that is complient with 5?
Code: Select all
Database Version: 5.0.24a-community-nt
Database Collation: utf8_general_ci
PHP Version: 5.1.6
Web Server: Apache/2.0.59 (Win32) PHP/5.1.6
Web Server to PHP interface: apache2handler
Joomla! Version: Joomla! 1.5.0 Production/Stable [ Karibu ] 19-December-2007 19:00 GMT
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12