Toolbar in Front End/ php5

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
yiendos
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Aug 26, 2005 8:46 am

Toolbar in Front End/ php5

Post by yiendos » Fri Feb 15, 2008 3:49 pm

Hi all,

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
VOTE FOR JOOMLA!, UK LINUX AWARDS: http://snipurl.com/xhga
Vote for Joomla! NOW http://www.packtpub.com/article/final_five_joomla

yiendos
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Aug 26, 2005 8:46 am

Re: Toolbar in Front End/ php5

Post by yiendos » Thu Mar 13, 2008 9:16 pm

Hi does anybody have any ideas about this? When I switch to php4 the icons are rendered but all links are '#'?
VOTE FOR JOOMLA!, UK LINUX AWARDS: http://snipurl.com/xhga
Vote for Joomla! NOW http://www.packtpub.com/article/final_five_joomla


Post Reply