BLHTML.org



 
  Variable Handling 2253 8
Handles variables and strings in BLHTML

More information:
  • #SYSTEM#
  • BLHTML variables list
  • #DATA#
  • array
  • #ARRAY#
  • Array handling
  •   BLHTML control variables 1853 1
    BLHTML använder följande $var/#DATA# php: $secure styrvariables:

    Webserver:
    variable:description:
    $PHPSESSIDphp sessionsvariable
    • #DB#


    • SYSTEM $secure variables:
      variables:  description:
      mainset to TRUE if the main web database is active
      connected#DB value=connected#
      active#DB show=database#
      linkLink Variable for current connection to SQL Server

      $secure variables: system/boot.php
      variables:  description:
      typeTyp of databas
      serverAddress to SQL server
      databaseDatabase name
      userDatabase user
      passwdPassword database user

    Admin Styrvariables:

    variable:value:description:
    $blhtml_su$blhtml_su=username Switsh User username

    BLHTML System styrvariables:

    variable:value:description:
    $blhtml $blhtml="logon"
    $blhtml="Logon"  

    $blhtml=menu
    $blhtml=logout
    $blhtml=MyPAGE
    Manage inloggningen
    Manage inloggningen

    Sätter Top menu on/av
    Loggar ut user
    Shows users homepage

    $blhtml_printDisplaying Datapage for utskrift

    $blhtml_actionSätter PHP returpage, standard; action=index.php
    $blhtml_cmdcurrent BLHTML script kommando som exekveras

    $blhtml_off$blhtml_off=1Shutdown BLHTML execute for current pagecalls
    $JavaScript$JavaScript=1
    $JavaScript=2
    onfocus
    #EDii#
    $new_visitor_detected  sätts on if new user
    $onfocusonfocus, sätt aktivt element

    Datapage:

    variable:description:
    $blhtml_lastDatum datapage last updatedes
    $blhtml_rubricDatapages rubric

    The page's rubric: #$blhtml_rubric#<br>
    <div align=RIGHT>Page last updated: <b>#WHEN type=date space=- value=$blhtml_last#</b></div>

    $makestr$makestr=true returnerar bara sid data
    $no_margin$no_margin=true Ingen marginal
    $page_marginSätter margin-top and margin-bottom
    $page_paddingSätter padding-left and padding-right (mellanrum mellan ram and sid data)

    $page_margin and $page_padding sätts som standard to 15px
    IE klarar inte of att sätta:
    margin-left and margin-right, IE räknar with hela datapage and därmed hamnar ramen under the menu.

    $border_typeSätter ramtyp for datapage
    $border_colorSätter ramfärgen for datapage
    $border_sizeSätter border width for datapage

    Example:
    #A id=1 page=A value(HOME ridge) data(border_type=ridge&border_color=FFB778&border_size=20)#<br>
    #A id=1 page=A value(HOME dotted) data(border_type=dotted&border_color=FF983D&border_size=44)#

    Returns:
    HOME ridge
    HOME dotted

    Edit datapage:

    variable:description:
    $blhtml_safemodeSafe Mode, don't preview page when edit page
    $blhtml_sendSave datapage
    $blhtml_previewPreviews current datapage
    $EDii_blhtmlShow #BLHTML# tags
    $EDii_htmlShow <html> tags
    $EDii_brGör <br> vid new rad
    $EDii_textareaCreate kod in en TEXTAREA

    Editor att skapa pages:
    #EDii id=msg#<br>

    #PLOPP name=blhtml_preview value=Preview#
    #PLOPP name=blhtml_send value=Update#<br><br><br>

    <hr> // Dessa kryssrutor är extra functions to editor att skapa pages and är därfor inte obligatoriska!
    <input type=checkbox name=EDii_blhtml class=std>Show #+#BLHTML#+# tags<br>
    <input type=checkbox name=EDii_html class=std>Show #<#html#># tags<br>
    <input type=checkbox name=EDii_br class=std>Gör #<#br#># vid new rad<br>
    <input type=checkbox name=EDii_textarea class=std>Create in en TEXTAREA
    Page sätt under: Control Panel -> Editor att skapa pages

    Forum variables:

    $action$variabledescription:
    edit$blhtml_forum_edit_preview// "edit" Preview post in forum
    $blhtml_forum_edit_save// "edit" Update post in forum
    quip$blhtml_forum_new_preview// Preview new forum post
    reply$blhtml_forum_new_save// Save new forum post

    Account administration script variables:

    variable:value:description:
    $blhtml_id#SYSTEM[whoami]#$blhtml_id; account id som talar if vart the script skall be installed
    Administratör can change $blhtml_id under: Create script on account
    Knappen Run script install script on account: $blhtml_id

    $blhtml_myname#SYSTEM[myname]#$blhtml_myname; Name on account som run the script.
    Val of $blhtml_id sätter $blhtml_myname
    $blhtml_id and $blhtml_myname can användas in the script
    for att tala if vilket account som the script skall slutligen be installed on

    Övriga:

    #IF# and #SWITCH#:
    variable:description:
    $blhtml_RETURNFunction som returneras to tolken
    $RETURN_TEXTText som returneras from IF

    #EDii#:
    variable:description:
    $EDii_nameName on EDii, standard name=EDii_msg
    $EDii_rubric_classCSS class on rubricfields
    $EDii_br_classCSS class on kryssrutor

    forumedit page som edit post in forum
    variable:description:
    #SYSTEM[EDii_width]#TEXTAREA characters width
    #SYSTEM[EDii_height]#rader for TEXTAREA

    #PLOPP# and #EDii#:
    variable:description:
    $blhtml_inpCSS for BLHTML knapp
    $blhtml_inp_onCSS for aktiverad BLHTML knapp

    More information:
  • Översättättning
  • Account Admin variables
  • #IF#
  • #DATA#
  • #EDii#
  • #PLOPP#
  •   Dynamic variables 1083 0
    #$id=8# // Sätter $id to 8
    #$remove_$id=on#
    // Sätter $remove_8 to "on"
    remove(#$remove_$id#)

    Returns:
    remove(on)

    DATA:
    #$id=8#
    #$price=100#

    #DATA[price_$id] post=set value=$price# // Sätter $price_8 to 100
    price(#$price_$id#)

    Returns:
    price(100)

    More information:
  • Variable handling
  • array
  • #ARRAY#
  • Array handling
  • BLHTML syntax
  •   Variable deklaration 1238 1
    #DATA[var] post=set value=8# är ett BLHTML kommando som sätter value on variables
    #DATA# can även BLHTML exekvera contents

    Example:
    #DATA[n] post=set value=8#

    #DATA[str1] post=set value($n = #DATA[n]#)#
    #DATA[str2] post=set value($n = #DATA[n]#) blhtml=on#

    #$str3(string)#

    #$str3(
            This is the merged strings:<br>
            str3="$str3"<br>
            str1="$str1"
    )#


    str1: #DATA[str1]#<br>
    str2: #DATA[str2]#<br><br>

    str3:<br>
    #$str3#

    Returns:
    str1: 8 = #DATA[n]#
    str2: 8 = 8

    str3:
    This is the merge strings:
    str3="string"
    str1="8 = #DATA[n]#"

    Snabb Deklaration: #$var=8#
    • BLHTML executes inte
    • Writes $variable value
    • Utfors in BLHTML Tolken
    • Snabb Deklaration fungerar inte in #IF# and #SWITCH#
    • Är snabbare än DATA
    • #$var# and #DATA[var]# Har samma utformat
    Example räkna ut next bokstav:
    #$chr=A#
    #SUM value($chr) return=chr#

    CHR=#$chr#<br>

    #SUM value($chr 1) return=chr#

    CHR + 1=#$chr#

    Returns:
    CHR=65
    CHR + 1=66

    More information:
  • Variable handling
  • Array handling
  • phparray
  •   SUM 895 0
    #SUM# is a database function
    Rights to use this function #SUM#:
  • BASIC

  • #SUM# Manage numbers, counting and formatting numbers and $variables

    Guidelines for #SUM#: data($array[+]) + value("calculation"):
    data shall be separated by spaces.
    The first number is positive, unless otherwise stated.
    Operator is and is authentic until a new operator is set.

    Note that #SUM# counting from left to right and put the sum in the stack and process the next field to right (number operators numbers -> stack). The last stack is returned.

    values:  defaults:  description:
    type rnd
    min
    max
    avg
    group
    count
    last
    dechex
    hexdec
    decbin
    bindec
    from=1 to=6 randomize number from to blhtml=on BLHTML executes from and to
    Get the smallest number from data
    Get the largest number of data
    Mean
    Picks out all the unique strings / variables
    Counting the number of variables from data
    The last variable from data
    Converts decimal to hexadecimal
    Converts hexadecimal to decimal
    Converts decimal to binary
    Converts binary to decimal
    data#SUM type data(array[+])# type manage the data attribute
    valueValue to be calculated
    nullnull=true returns 0 if no value
    decimalTurns fixt decimals
    blhtmlblhtml=on BLHTML executes value
    returnreturn=variable stores the results in $variable

    Example type:
    #$no[+](3 4 5 6 7 8 9 10 11 12 13 14)#

    no: #$no[+]#<br><br>

    min: #SUM type=min data($no[+])#<br>
    max: #SUM type=max data($no[+])#<br>
    avg: #SUM type=avg data($no[+])#<br>
    count: #SUM type=count data($no[+])#<br>
    last: #SUM type=last data($no[+]) decimal=2#<br>
    last + 1: #SUM type=last data($no[+]) value=1#<br><br>

    #$n=1#
    #$m=8#

    SUM(18 + 2) = #SUM value($n$m 2)#<br>
    rnd(100) = #SUM to=100 type=rnd#<br>

    #SUM type=decbin data=85 return=db#
    decbin: #$db#<br>
    #SUM type=bindec data($db) return=db#
    bindec: #$db#<br><br>

    #SUM type=dechex data($db) return=db#
    dechex: #$db#<br>
    hexdec: #SUM type=hexdec data($db)#
    Outcome:
    no: 3 4 5 6 7 8 9 10 11 12 13 14

    min: 3
    max: 14
    avg: 8.5
    count: 12
    last: 14.00
    last + 1: 15

    SUM(18 + 2) = 20
    rnd(100) = 21
    decbin: 1010101
    bindec: 85

    dechex: 55
    hexdec: 85

    Example value:
    #SUM value(1 + 2 + 3 - 3 - 1 * 8 / 2 / 2 / 2 - 1 + 9)#
    #SUM value(1 2 3 - 3 1 * 8 / 2 2 2 - 1 + 9)#


    /*
    Calculation:
    1 + 2 -> stack + 3 -> stack - 3 -> stack - 1 -> stack * 8 -> stack / 2 -> stack / 2 -> stack / -> stack 2 -> stack - 1 -> stack + 9 -> stack
    */

    These calculations are the same and return 10 in each example.
    Other example is a simplified BLHTML variant

    #SUM value(1 3 * 2)#
    // blir (1 + 3) * 2 = 8 and inte 1 + (3 * 2) = 7
    // Calculation: 1 + 2 -> stack * 2 -> stack

    To start with a negative number:
    #SUM value(- 11 / 2)#
    // Return -5.5 note the space after the minus.

    To mix numbers and $variables:
    #SUM value($field1 $field2 * 1.25)#
    // Calculation: $field1 + $field2 -> stack * 1.25 -> stack

    More information:
  • Variable handling
  • array
  • #ARRAY#
  • Array handling
  • Dynamic variables
  • #STR# string handler
  • To load the database to look: #READ#
  • operator
  •   BLHTML SYSTEM variables 2313 1
    #SYSTEM# variables (constants) is variables that sets by the BLHTML interpreter and can not be manipulated / modified. #SYSTEM# variables describes how the page design and manage page rights for visitors.

    #SYSTEM# variables-list:
    variablecontentsdescription:
    php5.6PHP Version
    whoamiLogin ID
    mynameLogin name (user name)

    css0323223622data/#SYSTEM[css]#.css web site CSS
    charsetUTF-8Web site charset code
    ip54.161.71.87Visitors IP Address
    for_ipLocal visitor's IP Address
    id6Account page created from
    rubricShow ArtikelCurrent page header

    titleVariable Handlinghtml titel
    nameBLHTML.orgPagename
    wwwwww.blhtml.orgwww address to web site

    menu8155SYSTEM[menu]
    menu_width201The menu width in pixels
    menu_paperhtml color on menu
    menu_align0 menu to the left, 1 menu to the right

    page_align0Site location:
    0/1/2 left / center / right
    page_width1005Main page width (page_width)
    ink000000Site ink color (font color)
    paperFFFFFFPage background color (paper color)
    page_ink000000Menu ink color (font color)
    page_paperFFE5C4The menu background color (paper color)

    border_color555555Color on the frame around the page (page_body)
    border_typeType of border (1 to 9)
    border_left0Frame thinkness to the left
    border_top0Frame thinkness to the top
    border_right2Frame thinkness to the right
    border_bottom2Frame thinkness to the bottom

    countercounterDatapage that update page visitors #SCORE#
    emptyI wrote no titleForum post without rubric
    guestGuestName on forums post on guests
    unreada Greating from BLHTML.orgRubric on none subject emails

    MidDatapage for Admin signature page
    MnoUsignature page for Admin

    Lid2Datapage that executes when logon
    LnoLLogon page
    Pid2Datapage for Account Administration
    PnoAProfile page

    suAdmin id, type of Admin
    vanguard255Vanguard rights

    XidDatapage for menu page
    XnoMenu page
    OidDatapage for outer page
    OnoOuter side to the right of the page

    EDii_ID2Dataaccount for location of EDii page
    EDii_pageEPage for EDii page
    EDii_width85Standrard width of EDii TEXTAREA
    EDii_height30Standrard height of EDii TEXTAREA

    quoteQuoteThe explanation of the quote forum posts
    awnserRe: Headline text when answering letters
    lastTime since last logon

    More information:
  • #SYSTEM#
  • #DATA#
  • BLHTML forum  


    apache MySQL PHP No to software patents! BLHTML
    © 2003, 2010 BLHTML
    This page is created with BLHTML in 0.3237 seconds