Check-in [81e87c60de]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[MODULES] - Implement a module system based on the components related functions.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:81e87c60de7d4b7871f0c3b50593d0a5927ea618
User & Date: Administrador 2016-10-06 04:40:00
Context
2016-10-06
04:41
[MAIN] - Include Modules.bas in the main application file. Leaf check-in: c632357d06 user: Administrador tags: trunk
04:40
[MODULES] - Implement a module system based on the components related functions. check-in: 81e87c60de user: Administrador tags: trunk
03:42
[MAIN] - Include Components.bas in the main application file. check-in: 0dfb5eda0b user: Administrador tags: trunk
Changes

Added root/core/modules.bas.





































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'################################# Modules.bas #################################
'Another little system to include and run modules on the site

COMMON SHARED compiledModules$()

'Now we have to include files, one for each module.

FUNCTION loadModule$(modName$, modCmd$)
  SELECT CASE modName$
    CASE ELSE
      loadModule$ = ""
  END SELECT
END FUNCTION

FUNCTION moduleParser$(strCmd$)
  DIM moduleName$, subCommand$, result$, i
  IF INSTR(strCmd$, CHR$(95)) > 0 THEN
    moduleName$ = MID$(strCmd$, 1, INSTR(strCmd$, CHR$(95)) - 1)
    subCommand$ = MID$(strCmd$, INSTR(strCmd$, CHR$(95)) + 1, LEN(strCmd$))
  ELSE
    moduleName$ = strCmd$
    subCommand$ = ""
  END IF
  FOR i = 0 TO UBOUND(compiledModules$)
    IF moduleName$ = compiledModules$(i) THEN
      result$ = loadModule$(moduleName$, subCommand$)
      EXIT FOR
    ELSE
      result$ = moduleName$
    END IF
  NEXT
  moduleParser$ = result$
  result$ = ""
END FUNCTION