LITTLEBLACKDOG.COM Forum Index LITTLEBLACKDOG.COM

 
LWD LWD   FAQ FAQ   Memberlist Memberlist   Usergroups Usergroups   Active Topics Active Topics   Register Register  
  Profile Profile   Log in to check your private messages Log in to check your private messages   Log in Log in  
  Who is Online Who is Online   Image Gallery Image Gallery   Chat Chat   Search Search  
  LWDGear       LBDGear  

View next topic
View previous topic
Post new topic     Reply to topic   LITTLEBLACKDOG.COM Forum Index » Code Warriors
Author Message
GibsonSG
Tail-Wagger
Tail-Wagger


Joined: 26 Aug 2003
Age: 28
Posts: 2966
Location: Lubbock, TX

Post Posted: Fri Mar 16, 2007 8:02 am   Post subject: For somebody that knows how to troubleshoot PHP Reply with quote Back to top  

I got joomla all installed on the site, and have everything working the way I want but this one error is driving me nuts. It doesn't really affect anything, the component still works, but I want the error message to go away. It's in the DocMan administrator toolbar:

Error:

PHP Notice: Undefined variable: icon in C:\Inetpub\wwwroot\Joomla\administrator\components\com_docman\toolbar.docman.class.php on line 149

So obviously, icon is undefined... I get that... this is line 149

Code: Select all
<img name="<?php echo $task;?>" width="32" height="32" src="images/<?php echo $icon.'_f2.png';?>" alt="<?php echo $alt;?>" border="0" align="middle" /><br />


But after looking thru the full code I don't see where anything is defined at all in there anywhere, but then again... I don't know PHP from chinese. I searched around on the DocMan and joomla forums, but no love on fixing it.

Full Code:

Code: Select all


<?php
/*
* DOCMan 1.3.0 for Mambo 4.5.1 CMS
* @version $Id: toolbar.docman.class.php,v 1.2 2005/03/11 14:44:56 johanjanssens Exp $
* @package DOCMan_1.3.0
* @copyright (C) 2003 - 2005 The DOCMan Development Team
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Oficial website: http://www.mambodocman.com/
*/

defined('_VALID_MOS') or die('Direct access to this location is not allowed.');

/**
* MenuBar class
* @package DOCMan_1.3.0
*/
class dmToolBar {

   /**
   * Writes the start of the button bar table
   */
   function startTable() {
      ?>
      <script language="JavaScript" type="text/JavaScript">
      <!--
      function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
      }
      //-->
      </script>
      <style>
      <?php if(!class_exists('joomlaVersion')) { ?>
         table#toolbar {
            margin-right: 10px;
         }

         table#toolbar a.toolbar {
            color : #808080;
            text-decoration : none;
            display: block;
            border: 1px solid #DDD;
            width: 55px;
            padding: 2px 1px 2px 1px;
         }
         table#toolbar a.toolbar:hover {
            color : grey;
            border: 1px solid grey;
            background-color: #DDD;
            padding: 3px 0px 1px 2px;
         }
         table#toolbar a.toolbar:active {
            color : #FF9900;
         }
      <?php } ?>
      </style>
      <table id="toolbar" cellpadding="3" cellspacing="0" border="0">
      <tr height="60" valign="middle" align="center">
      <?php
   }

   /**
   * Writes a spacer cell
   * @param string The width for the cell
   */
   function spacer( $width='' ) {
      ?>
      <td width="<?php echo $width;?>">&nbsp;</td>
      <?php
   }

   /**
   * Write a divider between menu buttons
   */
   function divider() {
      $image = mosAdminMenus::ImageCheckAdmin( 'menu_divider.png', '/administrator/images/' );
      ?>
      <td>
      <?php echo $image; ?>
      </td>
      <?php
   }

   /**
   * Writes the end of the menu bar table
   */
   function endTable() {
      ?>
      </tr>
      </table>
      <?php
   }

   /**
   * Writes a common icon button
   * @param string The task
   * @param string The alt text
   * @param string The icon name
   */
   function icon( $task, $alt, $icon, $path = "/administrator/images/") {

      $icon = ($icon != 'cpanel') ? $icon.'_f2.png' : $icon.'.png';


      ?>
      <td>
      <a class="toolbar" href="javascript:submitbutton('<?php echo $task;?>');">
      <img name="<?php echo $task;?>" width="32" height="32" src="images/<?php echo $icon;?>" alt="<?php echo $alt;?>" border="0" align="middle" /><br />
      <?php echo $alt; ?>
      </a>
      </td>
      <?php
   }

   function save($task='save', $alt='Save') {
       dmToolBar::icon($task, $alt, 'save');
    }

    function cancel($task='cancel', $alt='Cancel') {
       dmToolBar::icon($task, $alt, 'cancel');
    }

      function addNew($task = 'new', $alt = 'New') {
         dmToolBar::icon($task, $alt, 'new');
      }

    function cpanel() {
        dmToolBar::icon('cpanel', 'cpanel', 'cpanel');
    }

    function upload($task = 'upload', $alt = 'Upload') {
       dmToolBar::icon($task, $alt, 'upload');
    }

    function move($task = 'move', $alt = 'Move') {
       dmToolBar::icon($task, $alt, 'move');
    }


    /**
   * Writes a cancel button that will go back to the previous page without doing
   * any other operation
   */
   function back($task = 'back', $alt = 'Back') {
      $image = mosAdminMenus::ImageCheckAdmin( 'back.png', '/administrator/images/', NULL, NULL, 'back', 'cancel' );
      $image2 = mosAdminMenus::ImageCheckAdmin( 'back_f2.png', '/administrator/images/', NULL, NULL, 'back', 'cancel', 0 );
      ?>
      <td>
      <a class="toolbar" href="javascript:window.history.back();">
      <img name="<?php echo $task;?>" width="32" height="32" src="images/<?php echo $icon.'_f2.png';?>" alt="<?php echo $alt;?>" border="0" align="middle" /><br />
      <?php echo $alt; ?>
      </a>
      </td>
      <?php
    }

   /**
   * Writes a common icon button for a list of records
   * @param string The task
   * @param string The alt text
   * @param string The icon name
   */
   function iconList( $task, $alt, $icon, $path = "/administrator/images/" ) {
      $image = mosAdminMenus::ImageCheckAdmin( $icon.".png", $path, NULL, NULL, $alt, $task );
      $image2 = mosAdminMenus::ImageCheckAdmin( $icon."_f2.png", $path, NULL, NULL, $alt, $task, 0 );
      ?>
        <td>
      <a class="toolbar" href="javascript:if (document.adminForm.boxchecked.value == 0){ alert('Please make a selection from the list to <?php echo $task;?>'); } else {submitbutton('<?php echo $task;?>', '');}" onmouseout="MM_swapImgRestore();"  onmouseover="MM_swapImage('<?php echo $task;?>','','<?php echo $image2; ?>',1);">
      <img name="<?php echo $task;?>" width="32" height="32" src="images/<?php echo $icon.'_f2.png';?>" alt="<?php echo $alt;?>" border="0" align="middle" /><br />
      <?php echo $alt; ?>
      </a>
      </td>
        <?php
   }

   function publishList($task='publish', $alt='Publish') {
      dmToolBar::iconList($task, $alt, 'publish');
   }

   function unpublishList($task='unpublish', $alt='Unpublish') {
      dmToolBar::iconList($task, $alt, 'unpublish');
   }

   function deleteList($task='remove', $alt='Delete') {
      dmToolBar::iconList($task, $alt, 'delete');
   }

   function editList($task='edit', $alt='Edit') {
      dmToolBar::iconList($task, $alt, 'edit');
   }

   function editCss( $task='edit_css', $alt='Edit CSS') {
      dmToolBar::iconList($task, $alt, 'css');
   }
}

?>


_________________
This pan will kill your whole family, dig them up and eat them, and then vomit them back into their graves! Ctrl-Alt-Del
View user's profile Send private message Visit poster's website
anglachel
Guide Dog
Guide Dog


Joined: 08 Nov 2003
Posts: 8420
Location: MN

Post Posted: Fri Mar 16, 2007 8:23 am   Post subject: Reply with quote Back to top  

it's not an error... it is a notice...

Most places I've seen just turn off notice reporting in the php.ini ... does the $icon have a value assiciated with it at that point in the code?

_________________

Quidquid latine dictum sit, altum sonatur.
Death to Shuttleworth!
View user's profile Send private message AIM Address
GibsonSG
Tail-Wagger
Tail-Wagger


Joined: 26 Aug 2003
Age: 28
Posts: 2966
Location: Lubbock, TX

Post Posted: Fri Mar 16, 2007 10:15 am   Post subject: Reply with quote Back to top  

Yeah, it's supposed to show a back button, and it doesn't. Makes the page look weird. Not a big deal, as I'm the only one that would ever see it since I'm the admin, but it's just a pet peeve kinda thing.

_________________
This pan will kill your whole family, dig them up and eat them, and then vomit them back into their graves! Ctrl-Alt-Del
View user's profile Send private message Visit poster's website
gregw
Tail-Wagger
Tail-Wagger


Joined: 25 May 2003
Posts: 2606
Location: About 2000 miles south of where I want to be.

Post Posted: Fri Mar 16, 2007 4:19 pm   Post subject: Reply with quote Back to top  

Is this on your production server or the live server?

_________________
Some people are like slinkys... not really good for anything but they still bring a smile to your face when you push them down a flight of stairs.
View user's profile Send private message
GibsonSG
Tail-Wagger
Tail-Wagger


Joined: 26 Aug 2003
Age: 28
Posts: 2966
Location: Lubbock, TX

Post Posted: Sat Mar 17, 2007 1:14 pm   Post subject: Reply with quote Back to top  

gregw wrote:
Is this on your production server or the live server?


production server = live server. The site itself isn't live yet, but will be in about a month.

_________________
This pan will kill your whole family, dig them up and eat them, and then vomit them back into their graves! Ctrl-Alt-Del
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic     Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
phpBB SEO
All times are GMT - 8 Hours

Help us keep advertisements off this site. Donate today!