BLHTML.org

BLHTML.org / Web Programming / BLHTML / BLHTML Manual / BLHTML funktion list /

 
  BLHTML funktion list 21397 79
funktion:  return:How to use:
#,#'Installation script, a packed '
#+##Showing: brädgård: #
#<#<Showing: html tagg: <
#>#>Showing: html tagg: >
#_#&nbsp;Shows fasta SPACE
 
#BS#\Showing: \
#-|##-|#Installation script, a packed (
#|-##|-#Installation script, a packed )
#,,#"Installation script, a packed "
#//#//Remark: // omit the remaining code on the following line
#/*#/*Remark: omit code starting marker /*
#*/#*/Remark: omit the final code selection */

More information:
  • Special characters
  • BLHTML Introduction
  • Function Information Overview information of BLHTML functions
  • BLHTML syntax How BLHTML are designed and provides
  •   ATTRIB 3397 0
    #ATTRIB# is a forum admin command
    Rights to use this function #ATTRIB#:
  • Users who are forum owners with Data Manager (only current account)
  • Vanguards with administer: "Admin forum" all accounts

  • Only Admin, vanguards and Forum Administrator can see post #ATTRIB#

    #ATTRIB# Set forum post rights
    who can read / write forum posts.
  • Sets the field value status in the forum tables.

  • icon:  status:  description:
    Only Admin can see and edit0Only Admin can see and edit
    Admin Write Member Read Guest Nothing1Admin Write Member Read Guest Nothing
    Admin Write Member and Guest Read2Admin Write Member and Guest Read
    Member Write Guest Nothing3Member Write Guest Nothing
    Member Write Guest Read4Member Write Guest Read
    Public all Write5All Spectators can write
    Guest Read Member Nothing6Member nothing Guest Read

    #ATTRIB# sets attributes: status in the forum table

    More information:
  • Working with Forum
  • speed
  •   TREE 3131 0
    #TREE# is a forum admin command
    Rights to use this function #TREE#:
  • Users who are forum owners with Data Manager (only current account)
  • Vanguards with administer Admin forum: all account

  • Only Admin, vanguards and Forum Administrator can see #TREE#

    #TREE# switches post to only show title or show the whole post
  • Sets value on field tree in the forum table.

  • tree:   description:
    3show.show show.show.show (Show this post and next post will inherit: show)
    1show.hide show.hide.show (Show this post and next post will inherit: hide)
    2hide.show hide.show.show (Hide this post and next post will inherit: show)
    0hide.hide hide.hide.show (Hide this post and next post will inherit: hide)

    Example: IF-case for show post in forum:
    #IF($index == $post || #DATA[tree] bit=0# && $msg)
            else(#HALT#)
    #


    // IF statement check first bit of variable tree, if true show post

    IF-case check the first bit of the variable tree, if true then show post

    More information:
  • Working with Forum
  • speed
  •   READ 3701 0
    #READ# is a database function
    Rights to use this function #READ#:
  • Data manager
  • Users with Data Manager (only current account)

  • #READ# reads all the field from one post in one table
    In order to present data on the current page.
    sers can only read from their own data account

    values:    defaults:  description:
    id$site, current accountWhich table to be read from
    field*Read field from, * read all files in the table and save them as $variables
    keyKey Field  Normally, id is the key
    value$postThe value that the current field must contain
    forceonForces to read post
    echoonWrites the SQL-case
    blhtmlblhtml=on BLHTML executes value

    Example:
    #READ# // Read from the current table where the key = $post

    #READ field(sure, phone) id=10 key=name value=Adam#
    // Read posts: sure, phone from table 10 where field name = "ADAM"

    Relations example:
    #READ value=$id#
    #READ id=10 value=$id#
    #READ id=11 value=$id#

    Read data from 3 tables: current, 10 and table 11 where the key value is the equals $id
    If field in the previous table are included in new READ is executed field value from current table.
    (The new values overwrites the existing $variables)

    $post is used to load the post in the forum:
    #READ# // or: #READ value=$post#

    If #$post# not contain values then assign $post with #SYSTEM[whoami]# #READ# Does not work inside a forum! see #SLINK# to read fields from a forum.

    More information:
  • #FIELD#
  • Variable Handling
  • #SET_CATCH_PAGE#
  • #DATA#
  • #PLOPP#
  •   IF 3871 0
    #IF# is an independent function
    Rights to use this function #IF#:
  • BASIC

  • #IF# Look on one or compare two values with each other, if TRUE, executes then otherwise else executes. You must have at least one then or one else, nothing happens unless!

    • #IF(the if-case BLHTML executes)#
    • If #IF# contain strings:
      #IF($str == "is a string")# Quotation marks or apostrophes are needed only if the text contains spaces
    • then and else BLHTML executes
    values:  description:
    thenIf #IF# generates TRUE
    elseIf #IF# generates FALSE
    idThe current table is the default value
    Table where the value is retrieved for randomize
    rndRandomize a value from the selected table
    returnreturn=variable stores the results in $variable

    Operators to #IF#:
    values:  description:
    ==is equal to
    !=is inte equal to
    >=is greater / equal to
    <=is less / equal to
    >is greater than
    <is lesser then
    &&expression on both sides of && must be TRUE
    ||One of expression must be true to the next &&

    Example:
    #IF($variable)
            then(variable is set to $variable)
            else(variable has no value!)
    #

    // Checks if #DATA[variable]# has been declared with a value (is not NULL)

    #IF($variable != 8)
            then($variable is not eight)
            else($variable is actually eight)
    #

    // If #DATA[variable]# is a specific number?

    #IF(#SYSTEM[whoami]#) then(#HALT#)# // If logon then do not show web page

    Example, to randomize a post from a table:
    #IF($variable)
            id=24
            then(variable is $variable)
            else=rnd
    return=variable
    #


    /*
    If #DATA[variable]# is declared executes then
    If not randomize the key field from table 24 and return the value in #DATA[variable]# / $variable
    */

    Example, to compare two strings:
    #DATA[variable] post=set value(Compare strings)#

    #IF($variable == "Compare strings")
            then(then will be carried out in this example)
            else(#HALT#)
    #


    // If TRUE then execute then else datapage make a HALT.

    Manage GOTO GOSUB and RETURN from a IF:
    A<br>
    #IF(1)
    then(
            B<br>
            #$p=1#
            #: loop#
                    <b>p</b>(#$p#)
                    #SUM value($p 1) return=p#
            #IF($p <= 8) then(#GOTO loop#)#<br>
            C<br>
            #GOTO exit# // You can exit a IF but never GOTO, GOSUB into a IF
            D<br>
    )#

    E<br>
    #: exit#
    F<br>

    Returns:
    A
    B
    p(1) p(2) p(3) p(4) p(5) p(6) p(7) p(8)
    C
    F

    Example comparing multiple expression:
    /*
    IF(0 || 1 && 0 || 1) is equal to (0 || 1) && (0 || 1) the sentence is TRUE

    IF(1 && 0 || 0 == 0 || 0 || 0) is equal to (1) && (0 || 0 == 0 || 0 || 0) the sentence is TRUE (0 == 0 is TRUE)
    */

    NOTE BLHTML IF do not use brackets! BLHTML handles everything from && as an expression

    Example on other truths:
    TRUE && TRUE && TRUE to (TRUE) && (TRUE) && (TRUE)

    TRUE && FALSE || FALSE || TRUE || FALSE to (TRUE) && (FALSE || FALSE || TRUE || FALSE)

    More information:
  • #SWITCH#
  • #DO#
  • Assignment hierarchy with DATA
  • BLHTML syntax
  • Variable handling
  •   PLOPP 3687 0
    #PLOPP# is an independent function
    Rights to use this function #PLOPP#:
  • BASIC

  • #PLOPP# Create the page default button from current CSS and use to submit form

    values:    defaults:    description:
    idName on html id objects
    nameName on button
    typesubmit<input type>
    valuenameButton text
    titleonmouseover information text
    widthButton width
    heightButton height
    pictureBackground image from images/dir/pic.png
    onclickEvent: when clicking button
    onmouseoverEvent: when mouse over button
    onmouseoutEvent: when mouse leave button
    blhtmlblhtml=on BLHTML executes value
    butclass$blhtml_inpCSS class for normal button, if no value set butclass=inp
    butonclass$blhtml_inp_onCSS class for activated button, if no value set butonclass=inp_on

    Example:
    #PLOPP value="Button Text" title="Click me!"#
    #PLOPP name=objectname value(Button Text) butclas=L-inp butonclas=L-inp_on#


    More information:
  • Post and database management
  • Write to database
  • basket
  • AJaB
  •   SUM 3480 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) = 50
    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 forum  


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