You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: web/src/pages/reference/Resource_Web_Access.mdx
+4-13Lines changed: 4 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ You can access the resource through a web browser at: http://server-ip:http-port
34
34
35
35
The HTTP port is usually the server port + 2; by default it is `22005`.
36
36
37
-
The `performancebrowser` resource has a file defined in its meta that will be displayed as the main page — that is, when no specific page is provided in the URL.
37
+
The `performancebrowser` resource has a file defined in its meta that will be displayed as the main page - that is, when no specific page is provided in the URL.
38
38
```xml
39
39
<htmlsrc="pad.gif"raw="true" />
40
40
<htmlsrc="loading.gif"raw="true" />
@@ -76,15 +76,7 @@ If a file is not specified in the metafile as **raw**, then it is passed through
76
76
This pre-processor works much like PHP or ASP but uses Lua. You can embed standard MTA scripts within HTML pages, controlling the output.
77
77
Almost all standard MTA functions work, plus a number of special [HTTP Functions](/reference/Scripting_Functions.html#HTTP).
78
78
79
-
Aside from HTTP functions, embedded Lua has access to the following [environment variables](/reference/Predefined_variables.html#HTTP) that contain information about how the page was requested.
80
-
- table **requestHeaders** - This is a table containing all the headers that were requested with the page. You can set returned headers using [httpSetResponseHeader](/reference/httpSetResponseHeader).
81
-
- table **form** - This is a table containing all the form data submitted to the page using HTTP POST combined with any variables passed in the querystring with HTTP GET.
82
-
- table **cookies** - This is a table of all the cookies. You can modify cookies using [httpSetResponseCookie](/reference/httpSetResponseCookie).
83
-
- string **hostname** - This is a string containing the IP address or hostname that requested the page.
84
-
- string **url** - This is the URL of the page.
85
-
-[account](/reference/account)**user** - This is the [account](/reference/account) element of the current user.
86
-
- string **requestBody** - This is the request body.
87
-
- string **requestMethod** - This is the HTTP method used to request the page (e.g. GET, POST, etc).
79
+
Aside from HTTP functions, embedded Lua has access to the following [environment variables](/reference/Predefined_variables.html#http) that contain information about how the page was requested.
88
80
89
81
### Calls
90
82
It is important that processed files are executed in a separate virtual machine (Lua VM) from the .lua code in the resource.
@@ -127,8 +119,6 @@ This is called when the function returns.
127
119
<details>
128
120
<summary>Here's a simple example.</summary>
129
121
130
-
131
-
132
122
**meta.xml**
133
123
```xml
134
124
<meta>
@@ -184,7 +174,8 @@ You can spin up and down the different resources as you wish, and users of your
184
174
### How to setup a router function
185
175
A router function has to be specified in the meta.xml (see example below).
186
176
You can name the function however you like, there are no restrictions, as long as the function can be found in the global Lua scope in your scripts.
187
-
**Note: You can have only one router function.**
177
+
178
+
<NoteBoxtype='info'>You can have only one router function.</NoteBox>
Copy file name to clipboardExpand all lines: web/src/pages/reference/attachElementsOffsets.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ import VersionBox from '@src/components/VersionBox.astro';
8
8
title: 'attachElementsOffsets',
9
9
tableOfContents: false
10
10
}}>
11
-
11
+
<sectiondata-pagefind-ignore>
12
12
### Problem
13
13
The offset coordinates reflect the object space, not the world space. This means that you cannot simply visualize the attachment in the map editor and calculate the offsets between the 2 sets of world coordinates for `theElement` and `theAttachToObject`.
0 commit comments