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:

Thanks.

Capture.JPG

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!

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.

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

:slight_smile: 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.

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("
" , "", 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",
                    [B]'icon'     => "",[/B]
                    'target'   => "" . $this->menu_target('_blank') . "",
                    'sc_id'    => "item_Help",
                    'disabled' => "N",
                );
            }
        }
    }
}

Edit the line so it has the icon name you noted earlier:

[B]'icon'     => "scriptcase__NM__ico__NM__help2_16.png",[/B]

Save the file and that’s it. Remember though, it will revert to “” if the app is re-genned.

:slight_smile:

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

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).

Capture.JPG

Capture2.JPG

Capture.JPG

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?

Indeed :slight_smile:

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.

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…

good point mike.

Regards.

Guys

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:

http://www.scriptcase.net/forum/showthread.php?8089-HelpCase&highlight=helpcase

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 :slight_smile:

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?

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

Regards

Great! then we have no problem here, don’t you think!?

Good idea kafe - not tried that tho - but will. Assuming it works then happy days :slight_smile:

MikeDESAMACHANSEMPAI… as We all know… SC is a growing solution, tho I understand this does not represent an issue for most of us… but for product sake… I just wanna ask you… What happend to people who is not a programmer?, people who just started using SC as a solution for their lack of knowledge?. SC should be aiming to do thinks so easy even those people can use it without the excruciating process of hitting the wall everytime you wanna personalize something as simple as the $%&/&%$%&/&%$%&/ help icon lol.

Don’t you think?.

[QUOTE=kafecadm;35889]MikeDESAMACHANSEMPAI… as We all know… SC is a growing solution, tho I understand this does not represent an issue for most of us… but for product sake… I just wanna ask you… What happend to people who is not a programmer?, people who just started using SC as a solution for their lack of knowledge?. SC should be aiming to do thinks so easy even those people can use it without the excruciating process of hitting the wall everytime you wanna personalize something as simple as the $%&/&%$%&/&%$%&/ help icon lol.

Don’t you think?.[/QUOTE]

indeed I agree with you, for those people you included, here is this forum growing up, we all started knowing nothing, however, if SC is so perfect, then I guess this one is fundamental to mention it even as a macro or some workaround so if you want to add the helpcase, do this and this…

only those who really just wanna finish the project for some reason no matter what, will accept to have the helpcase as a first-level menu kind of “blind” and without an icon, yet, not controlable!! what SC guys are thinking about; we don’t know, but it is a fact.

Guys

As has been said by many others previously - for the most part SC does it all pretty well out of the box. However, once you you wish to start doing anything clever you really do need the programming experience. Don’t get me wrong. NetMake should ensure the bits in SC that they have written add value rather than make things more difficult. Helpcase is a good example. It’s mostly there in terms of being usable - but a couple of silly omissions make it painful to set up and use properly. However, you don’t need to use Helpcase at all if you don’t want.

At the end of the day SC is a tool to make the programming effort much less than if writing your system from scratch yourself. It is unfair to expect SC to be able to do every little thing people want (as that is an infinite amount) and they are often very specific and specialist requests. There’s no mileage in NetMake spending effort on something only a very small percentage of people want.

So my view is if you want zero programming then SC is NOT for you. Even MS-ACCESS required VB programming effort for anything “unusual”. So if you cannot or will not program, then the only legitimate alternative is to purchase an off the shelf (or bespoke) system that does what you want. At the end of the day SC makes my programming life overall, very much simpler.

And understand that my comments are more levelled at non-programmers (not you two) :slight_smile: