Forum Discussion

DocHoliday_1978's avatar
DocHoliday_1978
Icon for Nimbostratus rankNimbostratus
Dec 18, 2018

Remove help button from webtop

Dear,   I'm trying to find a way to remove the help button from a webtop. It seems well hidden, can't find it in header.inc, already tried removing the whole webtop_toolbar section but that just m...
  • AMiles_377865's avatar
    Dec 20, 2018

    Hello Steve,

    This is a pretty drastic solution, but after a couple days spent trying to find the files with a coworker, we came up with something. We couldn't find it in the GUI, but there is a solution in the CLI. If you feel uncomfortable with CLI navigation, I wrote a script that will do all of the below for you.

    cd /var/sam/www/php_include/webtop/renderer/webtop_full/full/common && cp webtop_common.inc webtop_common.inc.bak && sed -i 1267,1275d webtop_common.inc
    

    For a step-by-step process, see below:

    It looks like most of the information for a full webtop is generated in the following directory:

    cd /var/sam/www/php_include/webtop/renderer/webtop_full/full/common
    

    Here you can find this file: webtop_common.inc . We're going to make change to it, so make a copy of it for backup purposes.

    cp webtop_common.inc webtop_common.inc.bak
    

    Open the file with vi, and go to line 1267:

    vi webtop_common.inc +1267
    

    In this file, on line 1267, there is the following 'if' statement that generates the help button for ALL full webtops. Deleting this 'if' statement will remove the help button for EVERY full webtop you have, hence why we made a copy.

    if  ( display_toolbar_help ){
            var containerDiv = dcl.createAndAppendNode( toolbarDiv, "div", "", "container right border_hover last_child");
            containerDiv.onclick = function( link, target, features ){ return function(){ window.open( link, target, features ); } }( "/vdesk/webtop_help.eui", "webtop_help", "status=0,toolbar=0,location=0,menuebar=0,scrollbars=1," );
            var img = dcl.createAndAppendNode( containerDiv, "img",  "helpimg", "");
            img.src = help_icon; /* "/public/images/full_wt/help.png"; */
            var textSpan = dcl.createAndAppendNode( containerDiv, "span", "", "");
            textSpan.appendChild( document.createTextNode( help_str ) ); /* "Help" */
        }
    

    Keep in mind that APM caches the webtop info somewhere that I have yet to find, and so it takes about 15-20 minutes before you'll see the change on your webtop. Either wait, or delete the ramcache on a compression profile. Be aware that this could cause problems with your customization when you upgrade your versions.

    Feel free to ask if you have any follow-up questions,

    Austin