Scot Ranney • February 24, 2024
Miva Script: This code is buried in the LSK. Seems like it should be a global instead of having to come up with it this way.
<MvIF EXPR = "{ NOT [ g.Module_Library_DB ].StoreKey_Load( 'Images', l.storekey ) }"> <p>Error: Storekey for images not found, current image directory not set.</p> <MvELSE> <MvASSIGN NAME = "l.imagedir" VALUE = "{ 'graphics/' $ padl( g.Store:id, 8, '0' ) $ '/' $ ( floor( ( l.storekey:maxvalue + 1 ) / 2500 ) + 1 ) $ '/' }"> </MvIF>
Template Code (SMT):
<mvt:do file="g.Module_Library_DB" name="l.success" value="StoreKey_Load('Images', l.storekey)" /> <mvt:if expr="NOT l.success"> <p>Error: Storekey for images not found, current image directory not set.</p> <mvt:else> <mvt:assign name="l.imagedir" value="'graphics/' $ padl( g.Store:id, 8, '0' ) $ '/' $ ( floor( ( l.storekey:maxvalue + 1 ) / 2500 ) + 1 ) $ '/'" /> </mvt:if>
mvkb_images mvkb_mivascript mvkb_smt