Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/lucee/lucee-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Nov 14, 2024
2 parents ab6c756 + 4f720b3 commit 63f9b8e
Show file tree
Hide file tree
Showing 13 changed files with 116 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
webroot: ${{ github.workspace }}
execute: /build-all.cfm
luceeVersion: 6.2.0.164-SNAPSHOT
luceeVersion: 6.2.0.164-RC
# redis, chart, lucene, form. ajax, chart
extensions: 60772C12-F179-D555-8E2CD2B4F7428718;version=3.0.0.54-SNAPSHOT,D46B46A9-A0E3-44E1-D972A04AC3A8DC10,EFDEB172-F52E-4D84-9CD1A1F561B3DFC8,FAD67145-E3AE-30F8-1C11A6CCF544F0B7,6E2CB28F-98FB-4B51-B6BE6C64ADF35473,DF28D0A4-6748-44B9-A2FDC12E4E2E4D38
- name: Upload Artifact
Expand Down
2 changes: 1 addition & 1 deletion builders/html/assets/trycf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
width="100%"
height="350px"
fullscreen="true"
engine="lucee"
engine="lucee6"
show-results="true"
code="">
</div>
Expand Down
22 changes: 11 additions & 11 deletions builders/html/assets/trycf/js/code-editor3.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ angular.module("code.editor", []).directive("codeEditor", function ($timeout) {
' <span class="code-editor-message"></span>' +
' <button class="toggle-fullscreen btn {{fullscreenbtnclass}} pull-right" ng-click="toggleFullscreen()"> <i class="icon-resize-full"></i></button>' +
' <button class="editor-options btn btn-default {{optionsbtnclass}} pull-right"> <i class="icon-gear"></i></button>' +
' <span ng-hide="showResults == false || showResults == 0" class="alert alert-info pull-right" style="padding: 5px;margin: 0px 3px 0px 3px;display: inline-block;"><span class="hidden-xs">Current Engine:</span> <span class="display-engine" style="line-height: 2.2;">></span></span>' +
' <span ng-hide="showResults == false || showResults == 0" class="alert alert-danger pull-right" style="padding: 5px;margin: 0px 3px 0px 3px;display: inline-block;"><span class="hidden-xs">&nbsp;</span> <span class="display-engine" style="line-height: 2.2;">></span></span>' +
' <div class="modal fade" style="display:none;" tabindex="-1" role="dialog">' +
' <div class="modal-dialog">' +
' <div class="modal-content">' +
Expand Down Expand Up @@ -91,9 +91,9 @@ angular.module("code.editor", []).directive("codeEditor", function ($timeout) {
" </div>" +
' <label class="control-label">Change CFML Engine</label>' +
" <div>" +
' <label class="radio-inline"><input type="radio" name="engine" class="luceeEngine" value="lucee6-beta">Lucee 6.BETA</label>' +
' <label class="radio-inline"><input type="radio" name="engine" class="luceeEngine" value="lucee">Lucee 5.LATEST</label>' +
' <label class="radio-inline"><input type="radio" name="engine" class="luceeEngine" value="lucee4">Lucee 4.5.LATEST</label>' +
' <label class="radio-inline"><input type="radio" name="engine" class="luceeEngine" value="lucee6">Lucee 6 Latest</label>' +
' <label class="radio-inline"><input type="radio" name="engine" class="luceeEngine" value="lucee5">Lucee 5.4 ( LTS )</label>' +
' <label class="radio-inline"><input type="radio" name="engine" class="luceeEngine" value="lucee4">Lucee 4.5 ( EOL )</label>' +
" </div>" +
" </div>" +
' <div class="modal-footer">' +
Expand Down Expand Up @@ -139,11 +139,11 @@ angular.module("code.editor", []).directive("codeEditor", function ($timeout) {
scope.setupCodeGist = attrs.setupCodeGist;
scope.asserts = attrs.asserts;
scope.saveGist = saveGist;
scope.engines = { lucee4: "Lucee 4.5",
lucee: "Lucee 5",
"lucee6-beta": "Lucee 6 BETA"
scope.engines = { lucee6: "Lucee 6 Latest",
lucee5: "Lucee 5.4 LTS",
lucee4: "Lucee 4.5 EOL"
};
scope.engine = attrs.engine || "lucee";
scope.engine = attrs.engine || "lucee6";
scope.basepath = attrs.basepath || "/gist/";
var editor = element.find(".code-editor"),
codeForm = element.find(".code-form"),
Expand Down Expand Up @@ -205,11 +205,11 @@ angular.module("code.editor", []).directive("codeEditor", function ($timeout) {
showResults =
typeof attrs.showResults !== "undefined"
? attrs.showResults === "true" || attrs.showResults === "1"
: true,
: t5rue,
urlPool = {
lucee4: ["https://lucee4-sbx.trycf.com/lucee4/getremote.cfm"],
lucee: ["https://lucee5-sbx.trycf.com/lucee5/getremote.cfm"],
"lucee6-beta": ["https://lucee6-sbx.trycf.com/lucee/getremote.cfm"]
lucee5: ["https://lucee5-sbx.trycf.com/lucee5/getremote.cfm"],
lucee6: ["https://lucee6-sbx.trycf.com/getremote.cfm"]
},
url =
attrs.url ||
Expand Down
4 changes: 2 additions & 2 deletions docs/03.reference/01.functions/createguid/function.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: CreateGUID
id: function-createguid
related:
categories:
- core
---

A globally unique identifier or GUID is a special type of identifier used in software applications to provide an unique reference number.

The value is represented as a 32 character hexadecimal string, such as {21EC2020-3AEA-1069-A2DD-08002B30309D} and usually stored as a 128 bit integer.
The value is represented as a 32 character hexadecimal string, such as {21EC2020-3AEA-1069-A2DD-08002B30309D} and usually stored as a 128 bit integer.
6 changes: 4 additions & 2 deletions docs/03.reference/01.functions/createulid/function.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
title: createULID
title: CreateULID
id: function-createulid
description: Generates a ULID (Universally Unique Lexicographically Sortable Identifier)
related:
- function-createguid
- function-createuuid
categories:
- core
description: Generates a ULID (Universally Unique Lexicographically Sortable Identifier)
---

Generates a ULID (Universally Unique Lexicographically Sortable Identifier), a 128-bit identifier where the first 48 bits are a timestamp representing milliseconds since the Unix Epoch (1970-01-01), ensuring temporal ordering.
Expand Down
2 changes: 2 additions & 0 deletions docs/03.reference/01.functions/createuuid/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ id: function-createuuid
related:
- function-createguid
- function-createulid
categories:
- core
---

Creates a Universally Unique Identifier (UUID).
Expand Down
11 changes: 10 additions & 1 deletion docs/03.reference/01.functions/getpagecontext/_examples.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
```luceescript+trycf
writeDump(getPageContext());
echo("Click to expand");
pc = getPageContext();
dump(var=pc, label="PageContext", expand=false);
dump(var=pc.getCFMLFactory(), label="CFMLFactory", expand=false);
dump(var=pc.getCFMLFactory().getEngine(), label="Engine",expand=false);
if( listFirst(server.lucee.version,".") lte 5)
dump(var=pc.getCFMLFactory().getConfig(), label="Config",expand=false);
else
dump(var=pc.getCFMLFactory().getConfigServer(), label="ConfigServer",expand=false);
dump(var=pc.getCFMLFactory().getScopeContext(), label="ScopeContext",expand=false);
```
6 changes: 4 additions & 2 deletions docs/03.reference/01.functions/lslcase/function.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
title: lslcase
title: LSLCase
id: function-lslcase
related:
- function-lcase
categories:
- internationalization
---

Converts the alphabetic characters in a specified string to lowercase, respecting locale-specific casing rules. This is particularly important for languages where the standard lowercase conversion rules do not apply, ensuring accurate and culturally correct text processing. The function defaults to the current page's locale if no locale is specified.
Converts the alphabetic characters in a specified string to lowercase, respecting locale-specific casing rules. This is particularly important for languages where the standard lowercase conversion rules do not apply, ensuring accurate and culturally correct text processing. The function defaults to the current page's locale if no locale is specified.
7 changes: 5 additions & 2 deletions docs/03.reference/01.functions/lsucase/function.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
title: lsucase
title: LSUCase
id: function-lsucase
related:
- function-ucase
categories:
- internationalization
description: Converts the alphabetic characters in a specified string to uppercase, respecting locale-specific casing rules
---

Converts the alphabetic characters in a specified string to uppercase,
respecting locale-specific casing rules. This is particularly important for languages where the standard lowercase conversion rules do not apply,
ensuring accurate and culturally correct text processing. The function defaults to the current page's locale if no locale is specified.
ensuring accurate and culturally correct text processing. The function defaults to the current page's locale if no locale is specified.
52 changes: 52 additions & 0 deletions docs/03.reference/01.functions/valueref/_examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
```luceescript+trycf
// First, let's create a simple UDF that returns a value
function getName() {
return "John Doe";
}
// Create a reference to the getName function using ValueRef()
name = ValueRef(getName);
// Example 1: Basic Usage
writeOutput("Direct function call: " & getName() & "<br>");
writeOutput("Using ValueRef: " & name & "<br>");
// Example 2: Using ValueRef with a more complex UDF
function calculateTotal(price, quantity) {
return price * quantity;
}
// Create a reference with preset values
fixedCalculation = ValueRef(function() {
return calculateTotal(10, 5);
});
writeOutput("Fixed calculation result: " & fixedCalculation & "<br>");
// Example 3: Using ValueRef with a closure
counter = 0;
incrementCounter = ValueRef(function() {
counter++;
return counter;
});
writeOutput("Counter value: " & incrementCounter & "<br>");
writeOutput("Counter value: " & incrementCounter & "<br>");
// Example 4: Using ValueRef in a struct
person = {
firstName: ValueRef(function() {
return "Jane";
}),
lastName: ValueRef(function() {
return "Smith";
}),
fullName: ValueRef(function() {
// Note: This would need to be implemented differently in practice
// as the ValueRef doesn't have access to the other references directly
return "Jane Smith";
})
};
writeOutput("Person's full name: " & person.fullName);
```
6 changes: 3 additions & 3 deletions docs/03.reference/01.functions/valueref/function.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: valueref
title: ValueRef
id: function-valueref
related:
categories:
- tag-function
---

creates a reference to a UDF that acts like a simple value.
creates a reference to a UDF that acts like a simple value.
4 changes: 4 additions & 0 deletions docs/recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ Learn how to use request timeout correctly with Lucee.

This document explains how to use retry functionality with some simple examples.

## [Using S3 Regions in Lucee](/docs/recipes/s3-region.md)

Guide on configuring and interacting with specific S3 regions in Lucee using the S3 extension.

## [Script Templates](/docs/recipes/script-templates.md)

Learn about script templates in Lucee. This guide explains how Lucee supports templates with the `.cfs` extension, allowing you to write direct script code without the need for the `<cfscript>` tag.
Expand Down
17 changes: 17 additions & 0 deletions docs/recipes/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,23 @@
"Lucee"
]
},
{
"file": "s3-region.md",
"title": "Using S3 Regions in Lucee",
"path": "/docs/recipes/s3-region.md",
"hash": "0f033d87b29ca7e2e5b8fef6c2b9f10f",
"keywords": [
"Virtual File System",
"VFS",
"S3",
"Regions",
"Buckets",
"Amazon S3",
"Wasabi",
"MinIO",
"Cloud Storage"
]
},
{
"file": "script-templates.md",
"title": "Script Templates",
Expand Down

0 comments on commit 63f9b8e

Please sign in to comment.