$WBGV - get INI variable

$WBGV  is available for use with all WBSP commands:


filename - full path and file name of the configuration file
sectionname - the name of the section that contains required parameter
varname - the name of the required parameter
default - optional default value that will be returned if required parameter does not have a value
render - optional boolean parameter (T/F) that defines whether the value will be processed by WhizBase or returned as plain text

Value of required parameter.


File wbgv.wbsp

<title>WBGV example</title>

File resource.cfg

HelloEng=Hello visitor from IP $wbe{remote_host}
HelloGer=Hallo Besucher von IP $wbe{remote_host}
HelloEsp=Hola visitante de IP $wbe{remote_host}
HelloIta=Ciao ospite da IP $wbe{remote_host}
HelloFra=Bonjour visiteur de IP $wbe{remote_host}


After running this example, the resulting page in browser, may look like this:

Hello visitor from IP

Then simply change the line $wbsetv[lng|eng] to $wbsetv[lng|esp] and the resulting page will change to:

Hola visitante de IP

Try changing the value to ger, ita and fra and see the result.