No announcement yet.

Helpcase icons

  • Filter
  • Time
  • Show
Clear All
new posts

  • Helpcase icons

    If you assign Webhelp (or a specific helpcase page) in Applications | Settings of your menu app you get a button on the right of your menu saying "Display Help". There is no icon, and this text can be changed in your language settings - lang_btns_help_hint.

    If you assign Webhelp (or a specific helpcase page) in Applications | Settings on any other app (and then add "Webhelp" to your toolbar), you get a "?" icon.

    My question is two-fold:

    1) How can I choose an icon for my menu "help" button? Without an icon the button is not lined up properly with the other menu buttons as they all have icons.

    2) How can I choose / change the help icon for the non-menu apps "help" button?

    See the both "help" buttons below:



  • #2
    hi, do you mean that icon came from somewhere alone!? go to your menu app and have a look, if it is there, remove it, add new one if you like and the icon settings is right there as well!


    • #3
      Mike old boy,

      It doesn't appear in the menu items of the menu app - nor can you manually add one as there are no help pages shown in the list of apps to link to. Otherwise I'd treat it like all my other menu buttons and change the icon etc. Hence raising the question.

      I think SC are being a bit clever (but they didn't think it through fully). In the menu app's Application | Settings - if you assign Webhelp to the helpcase bit - SC seems to auto-generate that button. If it's a non-menu app setting, then just assigning a helpcase page / manual means "Webhelp" suddenly appears as an option to place on the toolbar.

      So, because SC manage all this for you they forgot (or so it appears) to allow you any artistic control over the buttons they add for you.


      • #4
        hiiii adz dude

        well, it seems I still dont know about this helpcase thing, woundered earlier why you guys fighting over it and John keeps saying that is updated and don't know what, the only way i could find is the "help" place where you can add it to the field and I'm not using that, this seems totally different and I didn't notice yet.

        but I'm still not old overall lool


        • #5
          :-) it does all work pretty well - it's just not very intuitive. Now I know how to use it I'm pleased with it - apart from this one gripe.


          • #6
            Ok a bit of an update....

            I worked out how to add an icon - and adding it also resized the button to match the others too. NOTE: This is a bit of a hack, and a temporary one at that. If you ever need to change the menu app or re-gen it, then you will need to repeat these steps AFTER the re-gen because the "icon" key will be emptied again. I am hopeful that NetMake will add something to allow this to be set somewhere so this won't be necessary.

            To actually manually add an icon to the Help menu button you need to get the icon you need into the project and then edit the menu app's index.php file.

            Anyway it's pretty simple to do:

            First you will need to ensure the icon you want to use is available to your project. An easy way to do this is to add a menu item at the end of your list of other menu items - choose the icon you will want and assign it to that menu item. Note or copy the entry SC puts in the text box for that icon (e.g. scriptcase__NM__ico__NM__help2_16.png). You'll need this later.

            DO NOT provide a link to an app for this item - leave it blank. Then re-gen the app. This will add that new item and the icon into your project - however as there is no link to an app for it, it will not appear on your menu. You only need to do this bit once. You can delete it afterwards if you want as the re-gen will have done what we needed - which was to add the icon into the project. It can now be referenced elsewhere.

            So, to the generated index.php. Around line 1400 (this will vary depending on how many other menu items you have) is the code where the elements of the Helpcase help button are assigned. You'll notice the icon "key" is empty - something like:

            if (is_file("menu_help.txt"))
                $Arq_WebHelp = file("menu_help.txt"); 
                if (isset($Arq_WebHelp[0]) && !empty($Arq_WebHelp[0]))
                    $Arq_WebHelp[0] = str_replace("\r\n" , "", trim($Arq_WebHelp[0]));
                    $Tmp = explode(";", $Arq_WebHelp[0]); 
                    foreach ($Tmp as $Cada_help)
                        $Tmp1 = explode(":", $Cada_help); 
                        if (!empty($Tmp1[0]) && isset($Tmp1[1]) && !empty($Tmp1[1]) && $Tmp1[0] == "menu" && is_file($str_root . $path_help . $Tmp1[1]))
                            $menu_menuData['data'][] = array(
                                'label'    => "" . $this->Nm_lang['lang_btns_help_hint'] . "",
                                'level'    => "0",
                                'link'     => "" . $path_help . $Tmp1[1] . "",
                                'hint'     => "" . $this->Nm_lang['lang_btns_help_hint'] . "",
                                'id'       => "item_Help",
                                'icon'     => "",
                                'target'   => "" . $this->menu_target('_blank') . "",
                                'sc_id'    => "item_Help",
                                'disabled' => "N",
            Edit the line so it has the icon name you noted earlier:

            'icon'     => "scriptcase__NM__ico__NM__help2_16.png",
            Save the file and that's it. Remember though, it will revert to "" if the app is re-genned.

            Last edited by adz1111; 04-16-2015, 10:39 AM.


            • #7
              good trick adz, you mentioned also the consequences so i think it is covered well.
              however, what about if you want to make the helpcase name other like "user help" or to have it as sub-menu from other main menu in the menu application? did you manage to make it flexiable so you can use it like normal menu icon!?

              why don't you think of this approach... remove it from the menu app at all.. as a new items in the menu and link to the helpcase like you are linking to external page or something else in the project/out of the project ... isn't it easier!? hope i could explain correct though


              • #8
                Hi Mike

                You can change the text on the "help" button in the Locales | Application Languages bit of SC (or directly in same section of the code I showed) - the former is better though as at least that bit will persist between re-gens.


                In terms of icon behaviour - it's just an icon - so as long as it is the same dimension as any other icons on the same menu level then all should line up nicely etc.

                See pic for how it looks now:


                This pic below is before the change (the button text is different in this picture, but that is because I hadn't changed it in Application Languages at the point I did the screen shot):


                Finally, as to your last point. You can't do that.

                To get the "Main" help button in the menu you connect that app to the Helpcase and only then is it automatically added by SC to the menu bar - it does not appear as a menu item for you to control - it's either there because SC detects the connection to Helpcase (as set by you) or it doesn't (in which case it does not appear).


                • #9
                  thank you very much adz for all you explanation, very useful

                  so, in conclusion, i see if we could remove the help case automatic attach to menus, will be better

                  as we can always create a new menu item, either main menu or sub-menu and make a link to help case, even if using blank app to redir or something

                  what you think?


                  • #10

                    If the helpcase stuff was available to choose like any other app (like you do for any menu item) then you could adjust / customize it as you would any other menu item.


                    • #11
                      hey, but it is not also removable from the menu!?
                      do you mean if i use the helpcase then i have to accept that it will show in the first level of my menu if I want or not!?!? no icon, no sub menu, it will just layout there, can't have an option not to show it at all!!

                      i understand you can add an icon to it as per your explanation, but what if I don't want it in the menu anyway! is that still not available!? WT..


                      • #12
                        good point mike.



                        • #13

                          See my post #6 in the thread link below (where I describe how you get buttons for Helpcase, whether for the main menu, or in an app). The point is you can control whether OR NOT a button appears in the menu, AND / OR, whether a "?" button appears in an app:


                          If you don't want the Help button in the menu - then just don't add Helpcase to the Toolbar in the menu app. BUT if you do enable it in the menu, it only appears on the first level and on the right (if horizontal). There is no control where on the menu it appears (which is why it would be good if it could be added / controlled as a normal menu item). Or am I missing the point?

                          By the way, that post says it doesn't all line up properly if the other menu buttons have icons. Well - this thread solves that now - insofar as it all lines up fine if you add an icon to the Help Menu button
                          Last edited by adz1111; 04-18-2015, 04:43 PM.


                          • #14
                            Adz, Kafecadm, here is a conclusion

                            helpcase can be created, i didn't really go through it yet, but lets say it is there and does the help part nicely

                            now to make it show in the project, there is only one way, that is to include it in the menu app as adz explained in post#6, there is no option to control it like the other menu items, which is also not so nice, in other words, if you want to put it as sub-menu, then you cant (out of the box)

                            now, that helpcase menu comes without an icon, you can't even add it out of the box, this thread here by adz thankfully shows us how we can add an icon to that "blind" button but also you will need to do it on production after each re-generation

                            what is missing here? well, we have a help case, we can exclude it from the menu, fine

                            can we somehow add new sub-menu to our menu appliction and make direct link to the helpcase itself? cz if the first statements are right, then finally we will have a link to the helpcase right!? why we insist to include using netmake way and try to fix their current mess? lets just exclude it from the project as not to have in the menu at all, and meanwhile add new menu or submenu with an icon (normally) and link it to the helpcase manually like an external resource

                            does that make sense?


                            • #15
                              You can always do so, by making the link to an absolute path... helpcase files will be most of the time under ../_lib/webhelp/