Quick Guide to Enable User Mode by Default in CE

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Quick Guide to Enable User Mode by Default in CE

    The Community Edition of Palo Web opens all reports in Design Mode by default, therefore impacting the user experience and making files vulnerable to unwanted edits. This is a quick and dirty hack to make user mode the default mode for opening files/reports in the File Manager, and turning Design Mode into a supplementary option that's only available to Admins and Designers.

    Note that I'm a relative newbie to this software, and changing the code could very well break something. So make backup copies of any files you're going to change before you edit them.

    This hack makes a few edits to 3 files, so accordingly I'll explain it in 3 steps. All file locations are in reference to your base folder for your Palo Suite installation. For me it's in C:/Program Files/Jedox/Palo Suite/

    (1) To start things off, we can simply swap the target files that define the views for Designer mode and User mode. If you look in Palo Suite\httpd\app\docroot\ui\wss\ you will find the files "main.php" and "view.php". The first one is the default, and is currently hard-coded to load designer mode. The second one is the file that's called when you click "Open in User Mode". Go ahead and rename main.php to "design.php" that we'll use later to give us a way to get back in to designer mode. Then, make a new copy of view.php and rename it main.php. You should now have design.php, view.php and main.php (among any other files and folders in the wss directory)

    That gets us going! If you shut down and start up your PaloSuiteHttpdService, you'll see that when you double-click on a file in Palo Web, it now opens in User Mode. Restarting the service is necessary, since it caches the files as long as it's running, so you won't see any effect until you restart. (On my Windows machine, I reset the httpd with ctrl+alt+delete, click on Services tab, then right-click PaloSuiteHttpdService and select Stop Service, then subsequently Start Service.)

    (2) Next, we need to give ourselves a way back in to designer mode, since there's no longer a menu option. I have done this by modifying the context menu option "Open in New Window" to "Open in Design Mode", which I'll show you how to do now. Make your way over to Palo Suite\httpd\app\docroot\ui\ld\studio and find the file "files.js". This is the javascript file that defines various behaviors in Palo Web's file browser. Make a copy of it and call it files_backup.js so that you can revert back if you change your mind about all this. Now open files.js in a text or code editor and search for the term "Open in New Window". This should land you right at this section of code:

    Source Code

    1. {text : "Open in New Window".localize()

    Go ahead and change the text from "Open in New Window" to "Open in Design Mode".

    Next, search for "/ui/wss/index.php?", and you should find the following code:

    Source Code

    1. getWSSURL : function (g, h, n, t) { var page = "/ui/wss/index.php?",

    Change the var page from "/ui/wss/index.php?" to "/ui/wss/design.php?".

    Now if we restart the PaloSuiteHttpdService once again, then log in as either an Admin or a Designer on Palo Web, you'll see the option "Open in Design Mode" in the right-click menu!

    (3) Now technically that's all we need to be happy at the moment, but there's one more change that I made in order to enhance the user experience. By default User Mode does not allow you to click hyperlinks that open other reports. To change this behavior, let's go over to Palo Suite\httpd\app\docroot\ui\wss\base and find the file hyperlink.js. Make a copy and call it "hyperlink_backup.js". Now open hyperlink.js and search for the text "follHLTmpDisabledWS". This will land you right in the middle of the following code:

    Source Code

    1. if (Jedox.wss.app.UPRestrictMode && linkVal.target.sheet != activeBook._sheetSelector.getActiveSheetName()) { showMsg("follHLTmpDisabledRef".localize(), "follHLTmpDisabledWS".localize(), Ext.MessageBox.WARNING); return false }

    This tells Palo Web to turn off links if it's restricted. Since we don't in fact want to restrict the use of links, we can delete this entire block of code, then save hyperlink.js

    One last time restart the PaloSuiteHttpdService, and now check out how easy it is to navigate between files/reports using links in User Mode! :thumbsup:
  • Hi,

    You do not need to go through all this mess with the code.

    Just create an hyperlink pointing to

    Source Code

    1. /ui/wss/?wam=user&wb=n24&grp=fgrp3&hrc=h1&ntype=template

    and replace wb, grp and hrc parameters with the ones of your workbook. So you can create a folder with hyperlinks available to "end users" whilst actual spreadsheets will be available to power users at another location. The only downside is that you will have generic hyperlink icons.