No announcement yet.

appmenu_add macro image not working

  • Filter
  • Time
  • Show
Clear All
new posts

  • appmenu_add macro image not working

    I'm using the sc_appmenu_add_item macro to create my menu. It works except for the icons. I have 2 icons, letter16.png, and letter16_new.png. the letter16.png icon shows up but on another item the letter16_new.png doesn't show up. I've checked the file system and it exists with the others in /devel/conf/sys/img/ico. I can put the full path in the address bar and view the image. No mater what I put in the macro it won't show up full path or not. I've cleared browser cache and did updatedb on the linux dev server. Why won't it display!!!

  • #2
    I added a menu item in the menu item settings instead of using the macro. I used the image browser to select an image for the item. I ran the menu and the image shows up. I use inspect element in FF and the image path is looking at ../_lib/img/sys__NM__letter16_new.png. I never put it there! I didn't use SC to upload the image. I used webmin to browse to the devel/conf/sys/img/ico folder and uploaded there. I NEVER uploaded it to the _lib dir!! What is going on!!!!!! I went and checked /_lib/img and it's not there!
    Last edited by ancr2001; 02-24-2014, 03:46 PM.


    • #3

      You can try this code :
      //upload field is blob field

      $id = 1;
      $check_sql = "SELECT upload FROM upload WHERE id=$id";
      sc_lookup(rs, $check_sql);

      if (isset({rs[0][0]}))
      $image = {rs[0][0]};

      $img = imagecreatefromstring($image);
      imagejpeg($img, '../_lib/img/simpletext.png',100);

      // now you can use this picture in menu
      //sc_appmenu_add_item($menu,'itm_7','itm_0',' Child_Label',,,'simpletext.png');

      // this code was fine for my project
      Last edited by ionutberlea; 02-25-2014, 06:39 AM.