Cyprich.com

Occasionally Relevant Insights from a Software Builder

By

How to Replace QLingo with JavaScript in a uStore Dynamic Document

Programmed elements in a dynamic document for XMPie uStore can be built using JavaScript instead of QLingo. Follow the steps below:

  1. Don’t use JavaScript in InDesign with the ADOR objects. All of the programming will take place in uPlan.

  2. In uPlan, create the variables and campaign dials for the ADOR objects that will be used as variables in functions.

  3. Create the function in JavaScript.

    function ShowPersonalCorporation (star1, star2, star3)
    {
     if (star1 || star2 || star3)
       return "*Personal Real Estate Corporation";
    }

  4. Call the function in the ADOR object.

    ShowPersonalCorporation (@{_Star1}, @{_Star2}, @{_Star3})


Testing for Null Values


In QLingo, you would test for a null value by using the IsNullOrEmpty function, which would return a value based on its result (true: display real estate info; false: display nothing):


if (!IsNullOrEmpty (@{_Star1}))

{

 “*Personal Real Estate Corporation”

}

else

{

 “”

}


The JavaScript equivalent is:


function ShowPersonalCorporation (star)

{

 if (star)

   return “*Personal Real Estate Corporation”;

}

By

A Quick (Not Approved by Xerox) Way To Setup SSL On All uStores

When you have hundreds of stores in uStore, making updates on all of them takes a very long time. This doesn’t matter if your paid by the hour, but if your in a hurry and need everything updated quickly, the manual method is not the best solution. For your information, this method is described below. The procedure can take a few minutes to complete. Multiply that by hundreds of stores and you’ll see the problem.

Manual Method

In the uStore admin site,

  1. Take store offline.
  2. Open Store Setting -> Set Up Store
  3. In the Advanced tab, select the Security Option
  4. Press Save & Place Online

The change can easily be made by modifying a table in the uStore database. This method isn’t recommended by Xerox and I wouldn’t recommend it either to novice database administrators. For experienced users, make a backup of the database before you make any changes. MSSQL doesn’t ask “Are you sure you want to make this change?” when you run SQL queries.

SQL Method

In the uStore database, you will need to modify the Store table. Each store here has an SslOption field which defaults to 0 value (see table below):

SslOption Field
0 Not Secured
1 Secure All
2 Secure Critical Points

Select which SSL option that you want and run the following SQL command:

     UPDATE Store SET SslOption=@SslOption WHERE StatusID=1

Example:
     UPDATE Store SET SslOption=2 WHERE StatusID=1

This updates all active stores to SSL option: Secure Critical Points

After the SQL query is run, you need to force a cache refresh. The page for this is on your your uStore at (use the IP of your server):

     http://127.0.0.1/uStoreAdmin/Support.aspx

In Cache update, press the Refresh Localization Cache button, Refresh ACL Cache button, and Refresh General Cache button. Not sure if all of these are needed, but I’ve done this and the stores were fine afterwards. If you don’t do a manual cache refresh, this will eventually occur in uStore, but if someone opens a store in the admin site and makes a modification, you may lose the changes your SQL query made.

And that’s it. Again, if your not an experience database administrator, don’t attempt this.

By

Software Installation Sites for Eclipse

After installing Sloeber (the Arduino plugin for Eclipse), the software installation sites were deleted. This will prevent Eclipse from making updates to the installed plugins. These are the sites that I use with my Eclipse for PHP Developers setup which can be restored manually through Help -> Install New Software -> Available Software Sites.

  • Neon
    http://download.eclipse.org/releases/neon
  • The Eclipse Project Updates:
    http://download.eclipse.org/eclipse/updates/4.6
  • org.eclipse.e4.ui update site
    http://download.eclipse.org/releases/neon/201610111000
  • EGit P2 Repository
    http://download.eclipse.org/egit/updates-nightly/
  • LiClipseText p2 Repository
    http://www.liclipse.com/text/updates
  • Pydev p2 Repository
    http://www.pydev.org/updates/