Module:AutoLinker/doc: Difference between revisions

From Nano World Order - Wiki
(Created page with "# Template:AutoLinker Documentation This template provides a user-friendly interface for the Module:AutoLinker Lua module. ## Installation Instructions 1. **Create the Lua module:** - Go to your wiki's Module namespace: `Module:AutoLinker` - Copy the complete Lua code (autolinker_module.lua) into the page - Save 2. **Create the template wrapper:** - Go to your wiki's Template namespace: `Template:AutoLinker` - Copy the template code below into the page...")
 
No edit summary
 
Line 1: Line 1:
# Template:AutoLinker Documentation
== AutoLinker Documentation ==


This template provides a user-friendly interface for the Module:AutoLinker Lua module.
This page documents the '''AutoLinker''' tool, which automatically finds and links existing wiki page titles in input text.


## Installation Instructions
== Installation Instructions ==


1. **Create the Lua module:**
=== Step 1: Create the Lua Module ===
  - Go to your wiki's Module namespace: `Module:AutoLinker`
  - Copy the complete Lua code (autolinker_module.lua) into the page
  - Save


2. **Create the template wrapper:**
# Go to your wiki's Module namespace: <code>Module:AutoLinker</code>
  - Go to your wiki's Template namespace: `Template:AutoLinker`
# Copy the complete Lua code into the page (see [[Module:AutoLinker|the module page]])
  - Copy the template code below into the page
# Save
  - Save


3. **Customize the page list:**
=== Step 2: Create the Template Wrapper ===
  - Edit `Module:AutoLinker`
  - Modify the `p.getStaticPages()` function
  - Add/remove page titles that should be auto-linked
  - Save


---
# Go to your wiki's Template namespace: <code>Template:AutoLinker</code>
# Copy the template code below into the page
# Save


## Template Code
=== Step 3: Customize the Page List ===


Copy this into `Template:AutoLinker`:
# Edit <code>Module:AutoLinker</code>
# Modify the <code>p.getStaticPages()</code> function
# Add/remove page titles that should be auto-linked
# Save


```
== Basic Usage ==
<div style="border: 1px solid #ccc; padding: 15px; background-color: #f9f9f9; margin: 20px 0;">


<h3>Auto-Linker Tool</h3>
=== Method 1: Direct Invoke (Recommended) ===


<p><em>Paste text below to automatically link all matching page titles in your wiki.</em></p>
Use this syntax anywhere on your wiki:


<div style="margin: 15px 0;">
<syntaxhighlight lang="wiki">
<b>Input Text:</b>
{{#invoke:AutoLinker|linkify|text=Your text goes here}}
<textarea id="autolinker-input" style="width: 100%; height: 200px; font-family: monospace; padding: 8px; border: 1px solid #ccc;">{{{input|}}}</textarea>
</syntaxhighlight>
</div>


<div style="margin: 15px 0;">
The system will automatically link all matching page titles from your configured list.
<b>Output Text (linked):</b>
<textarea id="autolinker-output" style="width: 100%; height: 200px; font-family: monospace; padding: 8px; border: 1px solid #ccc; background-color: #fffacd;"></textarea>
</div>


<button onclick="autoLinkerProcess()">Process Text</button>
'''Example:'''
<button onclick="autoLinkerCopy()">Copy Output</button>
<button onclick="autoLinkerReset()">Reset</button>


<p style="font-size: 0.9em; color: #666; margin-top: 15px;">
Input:
<b>Note:</b> This tool uses the static page list. For more control, use the invoke syntax directly:
<syntaxhighlight lang="wiki">
<code style="background: #f0f0f0; padding: 2px 4px;">{{#invoke:AutoLinker|linkify|text=Your text here}}</code>
{{#invoke:AutoLinker|linkify|text=This discusses Targeted Individuals and Directed Energy Weapons.}}
</p>
</syntaxhighlight>


</div>
Output:
<syntaxhighlight lang="wiki">
This discusses [[Targeted Individuals|Targeted Individuals]] and [[Directed Energy Weapons|Directed Energy Weapons]].
</syntaxhighlight>


<script>
=== Method 2: Using the Template ===
function autoLinkerProcess() {
 
    var inputText = document.getElementById('autolinker-input').value;
<syntaxhighlight lang="wiki">
    var outputText = document.getElementById('autolinker-output');
{{AutoLinker|input=Your text here}}
   
</syntaxhighlight>
    // For now, show instructions
 
    outputText.value = 'JavaScript method coming soon.\n\n' +
This displays the form interface for processing text.
                      'For immediate results, use the wiki markup syntax below:\n\n' +
 
                      '{{#invoke:AutoLinker|linkify|text=' + inputText + '|mode=static}}\n\n' +
=== Method 3: Embedding in an Article ===
                      'Copy the above into your page, save it, and the linked text will appear.';
 
You can embed AutoLinker directly in article sections:
 
<syntaxhighlight lang="wiki">
== Linked Section ==
 
{{#invoke:AutoLinker|linkify|text=Paste your article text here}}
</syntaxhighlight>
 
== Advanced Parameters ==
 
When calling the module directly, you can use optional parameters:
 
<syntaxhighlight lang="wiki">
{{#invoke:AutoLinker|linkify
|text=Your text
|mode=static
}}
</syntaxhighlight>
 
; text : The input text to process (required)
; mode : Where to get the page list
:* <code>static</code> — Use curated list only (fast, requires maintenance)
:* <code>dynamic</code> — Query wiki API (slower, more complete)
:* <code>auto</code> — Try dynamic first, fall back to static (default)
 
== Customizing the Page List ==
 
To add or remove pages from auto-linking:
 
# Edit <code>Module:AutoLinker</code>
# Find the <code>p.getStaticPages()</code> function
# Add new pages to the return table:
 
<syntaxhighlight lang="lua">
return {
    "Your Page Title",
    "Another Page",
    -- etc
}
}
</syntaxhighlight>
=== Tips ===
* Add both singular and plural forms if needed
* Longer titles are automatically matched first
* Use proper capitalization (must match your page titles exactly)
* Test with <code>{{#invoke:AutoLinker|test|text=Sample text}}</code>
== Finding Pages to Add ==
To find your actual wiki page titles:
# Go to [[Special:AllPages]]
# Review all pages
# Copy exact titles (watch capitalization!)
# Paste into the <code>getStaticPages()</code> function
'''Important:''' Page titles must match exactly, including capitalization and spacing.
== Configuration Options ==
Edit <code>Module:AutoLinker</code> to adjust behavior:


function autoLinkerCopy() {
<syntaxhighlight lang="lua">
     var output = document.getElementById('autolinker-output');
local config = {
     output.select();
     caseSensitive = false,      -- Match "AI" and "ai"?
     document.execCommand('copy');
    wholeWordsOnly = true,      -- Must be standalone words
     alert('Output copied to clipboard!');
    skipAlreadyLinked = true,  -- Don't re-link [[existing]] links
     minLength = 2,              -- Skip 1-character matches
     maxMatches = 500,          -- Safety limit per invocation
     cacheExpiry = 3600,        -- Cache time in seconds
}
}
</syntaxhighlight>


function autoLinkerReset() {
=== Recommended Settings ===
    document.getElementById('autolinker-input').value = '';
 
    document.getElementById('autolinker-output').value = '';
For most wikis:
}
* <code>wholeWordsOnly = true</code> — Prevents matching partial words
</script>
* <code>skipAlreadyLinked = true</code> — Prevents double-linking
```
* <code>maxMatches = 500</code> — Safe limit for performance
 
== Debugging & Testing ==
 
=== View All Matched Pages ===
 
To see the complete list of pages that will be auto-linked:
 
<syntaxhighlight lang="wiki">
{{#invoke:AutoLinker|listPages}}
</syntaxhighlight>
 
This outputs a numbered list of all pages in the matching configuration.
 
=== Test with Sample Text ===


---
To test the module with sample text:


## Usage Methods
<syntaxhighlight lang="wiki">
{{#invoke:AutoLinker|test|text=Targeted Individuals and COINTELPRO}}
</syntaxhighlight>


### Method 1: On a Wiki Page (Easiest)
=== Test with Custom Text ===


Create a special page (e.g., `Tools:AutoLinker`) and use this syntax:
To test with your own text:


```
<syntaxhighlight lang="wiki">
{{#invoke:AutoLinker|linkify|text=Your text goes here. This is about Targeted Individuals and Directed Energy Weapons.}}
{{#invoke:AutoLinker|test|text=Your sample text here}}
```
</syntaxhighlight>


The page will display the linked text:
== Common Use Cases ==


```
=== Processing a New Article ===
Your text goes here. This is about [[Targeted Individuals|Targeted Individuals]] and [[Directed Energy Weapons|Directed Energy Weapons]].
```


Copy and paste that result elsewhere.
'''Workflow:'''


### Method 2: Using the Template
# Write your article
# Use AutoLinker to add links to all relevant pages
# Copy the linked output
# Paste back into your article
# Save


```
'''Example:'''
{{AutoLinker|input=Your text here}}
```


This displays the form interface.
<syntaxhighlight lang="wiki">
== Draft Section ==


### Method 3: In Your Article
Original text: "This discusses surveillance programs, electromagnetic harassment, and targeted individuals."


Embed it directly where you want auto-linking:
{{#invoke:AutoLinker|linkify|text=This discusses surveillance programs, electromagnetic harassment, and targeted individuals.}}


```
== Result ==
== Linked Section ==


{{#invoke:AutoLinker|linkify|text=Paste your article text here}}
Copy the output above and use it in your article.
```
</syntaxhighlight>


---
=== Batch Processing Multiple Articles ===


## Advanced Parameters
Create a temporary page in your [[Special:Sandbox|sandbox]] or [[Help:Contents|user workspace]] for processing multiple texts:


When calling the module directly, you can use:
<syntaxhighlight lang="wiki">
== Text Processing Queue ==


```
=== Article 1 ===
{{#invoke:AutoLinker|linkify
{{#invoke:AutoLinker|linkify|text=First article text here}}
|text=Your text
|mode=static
}}
```


- `text`: The input text to process (required)
=== Article 2 ===
- `mode`: Where to get the page list
{{#invoke:AutoLinker|linkify|text=Second article text here}}
  - `static` = Use curated list only (fast, requires maintenance)
  - `dynamic` = Query wiki API (slower, more complete)
  - `auto` = Try dynamic first, fall back to static (default)


---
=== Article 3 ===
{{#invoke:AutoLinker|linkify|text=Third article text here}}
</syntaxhighlight>


## Customizing the Page List
Process all at once, then copy and distribute results.


To add or remove pages from auto-linking:
== Limitations & Behavior ==


1. Edit `Module:AutoLinker`
* '''Already linked text''' is skipped — won't double-link <code>[[existing links]]</code>
2. Find the `p.getStaticPages()` function
* '''Maximum 500 matches per invocation''' — safety limit to prevent performance issues
3. Add new pages to the return table:
* '''Whole words only''' — matches "Energy Weapons" but not partial words
* '''Static mode is fast''' — dynamic mode slower on large wikis
* '''Case sensitivity''' — can be configured in the module


```lua
== Performance Notes ==
return {
    "Your Page Title",
    "Another Page",
    -- etc
}
```


**Tips:**
; Static mode (50-100 pages) : Instant
- Add both singular and plural forms if needed
; Static mode (500+ pages) : Noticeable delay (1-2 seconds)
- Longer titles first (handled automatically)
; Text length (10KB) : Fast
- Use proper capitalization
; Text length (100KB+) : Consider breaking into chunks
- Test with `{{#invoke:AutoLinker|test|text=Sample text}}`
; Dynamic mode : 1-5 seconds typical (not recommended)


---
'''Optimization Tip:''' If processing very long texts, run AutoLinker on sections separately.


## Debugging
== Troubleshooting ==


To see the list of pages being matched:
=== Nothing is Getting Linked ===


```
'''Diagnosis:'''
<syntaxhighlight lang="wiki">
{{#invoke:AutoLinker|listPages}}
{{#invoke:AutoLinker|listPages}}
```
</syntaxhighlight>
 
This shows all pages in the matching list.
 
'''Solutions:'''
* Check that page titles in the static list exactly match your wiki pages
* Verify the module is in the <code>Module:</code> namespace
* Test with <code>{{#invoke:AutoLinker|test}}</code>
* Capitalization and spacing must match exactly
 
=== Too Many False Matches ===
 
'''Solution:'''
* Remove overly generic terms from the list
* Put longer, more specific titles first (already done by default)
* Increase specificity of page titles
* Adjust matching configuration options
 
=== Scribunto Error ===
 
'''Likely Cause:''' Syntax error in the Lua code or module not found
 
'''Fix:'''
# Go to <code>Module:AutoLinker</code>
# Look for red error text
# Click the error to see details
# Fix the Lua code or reinstall the module
 
=== Pages with Special Characters Not Linking ===
 
Pages with <code>[</code>, <code>]</code>, <code>(</code>, <code>)</code>, etc. need special handling.
 
'''Workaround:''' Add alternate titles to your list:
 
<syntaxhighlight lang="lua">
"The Radiohead Protocol",
"Radiohead Protocol",  -- Alternative for matching
</syntaxhighlight>
 
== Complete Workflow Example ==


To test with sample text:
=== Scenario: Processing an Article About Surveillance ===


```
'''Original Article Text:'''
{{#invoke:AutoLinker|test|text=Targeted Individuals and COINTELPRO}}
 
```
<pre>
This exposé examines Targeted Individuals, Gang Stalking, and Directed Energy Weapons technology. It draws on COINTELPRO documents and recent research into Psychotronics.
</pre>
 
'''Processing:'''
 
<syntaxhighlight lang="wiki">
{{#invoke:AutoLinker|linkify|text=This exposé examines Targeted Individuals, Gang Stalking, and Directed Energy Weapons technology. It draws on COINTELPRO documents and recent research into Psychotronics.}}
</syntaxhighlight>
 
'''Result (after saving):'''
 
<pre>
This exposé examines [[Targeted Individuals|Targeted Individuals]], [[Gang Stalking|Gang Stalking]], and [[Directed Energy Weapons|Directed Energy Weapons]] technology. It draws on [[COINTELPRO|COINTELPRO]] documents and recent research into [[Psychotronics|Psychotronics]].
</pre>
 
'''Final Step:''' Copy the result and paste it into your article.
 
== Creating a Tool Page ==
 
To give all editors easy access to AutoLinker, create a page like <code>Tools:AutoLinker</code> or <code>Help:AutoLinker</code>:
 
<syntaxhighlight lang="wiki">
__NOTOC__
 
== Auto-Linking Tool ==
 
This tool automatically links all matching page titles in your text.
 
=== How to Use ===
 
Paste your text into the invoke below and save the page to see the linked result:
 
{{#invoke:AutoLinker|linkify|text=Replace this with your text}}
 
=== Instructions ===
 
# Write or paste your text after <code>text=</code>
# Save the page
# View the result with all matching pages linked
# Copy the linked text and paste into your article
 
=== Need Help? ===
 
* Test the tool: <code>{{#invoke:AutoLinker|test}}</code>
* View all linkable pages: <code>{{#invoke:AutoLinker|listPages}}</code>
* See all configuration: Edit [[Module:AutoLinker]]
</syntaxhighlight>
 
== Advanced: Modifying the Module ==
 
The module can be extended with custom features:
 
* '''Add custom filters''' — Skip pages from certain categories
* '''Change link format''' — Hide the page title in display text
* '''Add exclusion list''' — Pages that should never be auto-linked
* '''Implement dynamic page list''' — Query all wiki pages automatically
 
These modifications require editing the Lua code in [[Module:AutoLinker]], but the structure is straightforward.
 
== API Reference ==
 
=== Functions ===


---
; <code>linkify(frame)</code> : Main function; takes text and mode parameters; returns linked text
; <code>getAllPages(mode)</code> : Retrieves page list; mode can be "static", "dynamic", or "auto"
; <code>getStaticPages()</code> : Returns curated page list for matching
; <code>getDynamicPages()</code> : Queries wiki API for pages (currently simplified)
; <code>listPages(frame)</code> : Debug function; lists all pages being matched
; <code>test(frame)</code> : Test function; runs linkify with sample text


## Limitations & Notes
=== Configuration Variables ===


- **Already linked text** is skipped (won't double-link [[existing links]])
; <code>caseSensitive</code> : Boolean; whether matching is case-sensitive (default: false)
- **Maximum 500 matches per invocation** (safety limit, prevents performance issues)
; <code>wholeWordsOnly</code> : Boolean; whether to match whole words only (default: true)
- **Whole words only** (matches "Energy Weapons" but not inside other words)
; <code>skipAlreadyLinked</code> : Boolean; whether to skip already-linked text (default: true)
- **Performance:** Static mode is fast; dynamic mode slower on large wikis
; <code>minLength</code> : Number; minimum length of page titles to match (default: 2)
- **Case sensitivity:** Can be toggled in the module config
; <code>maxMatches</code> : Number; maximum matches per invocation (default: 500)
; <code>cacheExpiry</code> : Number; cache expiration time in seconds (default: 3600)


---
== See Also ==


## Troubleshooting
* [[Help:Contents]] — General wiki help
* [[Help:Formatting]] — Wiki markup formatting
* [[Help:Templates]] — Template usage guide
* [[Help:Links]] — Link formatting guide
* [[Special:AllPages]] — View all pages on this wiki


**Nothing is getting linked:**
== Questions or Issues? ==
- Check that page titles in the static list exactly match your wiki pages
- Verify the module is in the `Module:` namespace
- Test with `{{#invoke:AutoLinker|test}}`


**Too many false matches:**
For help with AutoLinker:
- Add longer, more specific titles to the list first
- Reduce the number of generic terms
- Use the `wholeWordsOnly` setting


**Performance is slow:**
* Check the [[#Troubleshooting|Troubleshooting section]] above
- Use `mode=static` instead of `mode=auto`
* Run <code>{{#invoke:AutoLinker|listPages}}</code> to debug
- Reduce the static page list
* Review the [[Module:AutoLinker|module code]] (commented)
- Don't process extremely long texts at once
* Ask on the [[Project:Community Portal|Community Portal]]

Latest revision as of 07:32, 4 June 2026

AutoLinker Documentation

This page documents the AutoLinker tool, which automatically finds and links existing wiki page titles in input text.

Installation Instructions

Step 1: Create the Lua Module

  1. Go to your wiki's Module namespace: Module:AutoLinker
  2. Copy the complete Lua code into the page (see the module page)
  3. Save

Step 2: Create the Template Wrapper

  1. Go to your wiki's Template namespace: Template:AutoLinker
  2. Copy the template code below into the page
  3. Save

Step 3: Customize the Page List

  1. Edit Module:AutoLinker
  2. Modify the p.getStaticPages() function
  3. Add/remove page titles that should be auto-linked
  4. Save

Basic Usage

Method 1: Direct Invoke (Recommended)

Use this syntax anywhere on your wiki:

<syntaxhighlight lang="wiki"> Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

The system will automatically link all matching page titles from your configured list.

Example:

Input: <syntaxhighlight lang="wiki"> Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

Output: <syntaxhighlight lang="wiki"> This discusses Targeted Individuals and Directed Energy Weapons. </syntaxhighlight>

Method 2: Using the Template

<syntaxhighlight lang="wiki"> Template:AutoLinker </syntaxhighlight>

This displays the form interface for processing text.

Method 3: Embedding in an Article

You can embed AutoLinker directly in article sections:

<syntaxhighlight lang="wiki">

Linked Section

Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

Advanced Parameters

When calling the module directly, you can use optional parameters:

<syntaxhighlight lang="wiki"> Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

text
The input text to process (required)
mode
Where to get the page list
  • static — Use curated list only (fast, requires maintenance)
  • dynamic — Query wiki API (slower, more complete)
  • auto — Try dynamic first, fall back to static (default)

Customizing the Page List

To add or remove pages from auto-linking:

  1. Edit Module:AutoLinker
  2. Find the p.getStaticPages() function
  3. Add new pages to the return table:

<syntaxhighlight lang="lua"> return {

   "Your Page Title",
   "Another Page",
   -- etc

} </syntaxhighlight>

Tips

  • Add both singular and plural forms if needed
  • Longer titles are automatically matched first
  • Use proper capitalization (must match your page titles exactly)
  • Test with Lua error: Internal error: The interpreter exited with status 126.

Finding Pages to Add

To find your actual wiki page titles:

  1. Go to Special:AllPages
  2. Review all pages
  3. Copy exact titles (watch capitalization!)
  4. Paste into the getStaticPages() function

Important: Page titles must match exactly, including capitalization and spacing.

Configuration Options

Edit Module:AutoLinker to adjust behavior:

<syntaxhighlight lang="lua"> local config = {

   caseSensitive = false,      -- Match "AI" and "ai"?
   wholeWordsOnly = true,      -- Must be standalone words
   skipAlreadyLinked = true,   -- Don't re-link existing links
   minLength = 2,              -- Skip 1-character matches
   maxMatches = 500,           -- Safety limit per invocation
   cacheExpiry = 3600,         -- Cache time in seconds

} </syntaxhighlight>

Recommended Settings

For most wikis:

  • wholeWordsOnly = true — Prevents matching partial words
  • skipAlreadyLinked = true — Prevents double-linking
  • maxMatches = 500 — Safe limit for performance

Debugging & Testing

View All Matched Pages

To see the complete list of pages that will be auto-linked:

<syntaxhighlight lang="wiki"> Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

This outputs a numbered list of all pages in the matching configuration.

Test with Sample Text

To test the module with sample text:

<syntaxhighlight lang="wiki"> Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

Test with Custom Text

To test with your own text:

<syntaxhighlight lang="wiki"> Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

Common Use Cases

Processing a New Article

Workflow:

  1. Write your article
  2. Use AutoLinker to add links to all relevant pages
  3. Copy the linked output
  4. Paste back into your article
  5. Save

Example:

<syntaxhighlight lang="wiki">

Draft Section

Original text: "This discusses surveillance programs, electromagnetic harassment, and targeted individuals."

Lua error: Internal error: The interpreter exited with status 126.

Result

Copy the output above and use it in your article. </syntaxhighlight>

Batch Processing Multiple Articles

Create a temporary page in your sandbox or user workspace for processing multiple texts:

<syntaxhighlight lang="wiki">

Text Processing Queue

Article 1

Lua error: Internal error: The interpreter exited with status 126.

Article 2

Lua error: Internal error: The interpreter exited with status 126.

Article 3

Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

Process all at once, then copy and distribute results.

Limitations & Behavior

  • Already linked text is skipped — won't double-link existing links
  • Maximum 500 matches per invocation — safety limit to prevent performance issues
  • Whole words only — matches "Energy Weapons" but not partial words
  • Static mode is fast — dynamic mode slower on large wikis
  • Case sensitivity — can be configured in the module

Performance Notes

Static mode (50-100 pages)
Instant
Static mode (500+ pages)
Noticeable delay (1-2 seconds)
Text length (10KB)
Fast
Text length (100KB+)
Consider breaking into chunks
Dynamic mode
1-5 seconds typical (not recommended)

Optimization Tip: If processing very long texts, run AutoLinker on sections separately.

Troubleshooting

Nothing is Getting Linked

Diagnosis: <syntaxhighlight lang="wiki"> Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

This shows all pages in the matching list.

Solutions:

  • Check that page titles in the static list exactly match your wiki pages
  • Verify the module is in the Module: namespace
  • Test with Lua error: Internal error: The interpreter exited with status 126.
  • Capitalization and spacing must match exactly

Too Many False Matches

Solution:

  • Remove overly generic terms from the list
  • Put longer, more specific titles first (already done by default)
  • Increase specificity of page titles
  • Adjust matching configuration options

Scribunto Error

Likely Cause: Syntax error in the Lua code or module not found

Fix:

  1. Go to Module:AutoLinker
  2. Look for red error text
  3. Click the error to see details
  4. Fix the Lua code or reinstall the module

Pages with Special Characters Not Linking

Pages with [, ], (, ), etc. need special handling.

Workaround: Add alternate titles to your list:

<syntaxhighlight lang="lua"> "The Radiohead Protocol", "Radiohead Protocol", -- Alternative for matching </syntaxhighlight>

Complete Workflow Example

Scenario: Processing an Article About Surveillance

Original Article Text:

This exposé examines Targeted Individuals, Gang Stalking, and Directed Energy Weapons technology. It draws on COINTELPRO documents and recent research into Psychotronics.

Processing:

<syntaxhighlight lang="wiki"> Lua error: Internal error: The interpreter exited with status 126. </syntaxhighlight>

Result (after saving):

This exposé examines [[Targeted Individuals|Targeted Individuals]], [[Gang Stalking|Gang Stalking]], and [[Directed Energy Weapons|Directed Energy Weapons]] technology. It draws on [[COINTELPRO|COINTELPRO]] documents and recent research into [[Psychotronics|Psychotronics]].

Final Step: Copy the result and paste it into your article.

Creating a Tool Page

To give all editors easy access to AutoLinker, create a page like Tools:AutoLinker or Help:AutoLinker:

<syntaxhighlight lang="wiki">


Auto-Linking Tool

This tool automatically links all matching page titles in your text.

How to Use

Paste your text into the invoke below and save the page to see the linked result:

Lua error: Internal error: The interpreter exited with status 126.

Instructions

  1. Write or paste your text after text=
  2. Save the page
  3. View the result with all matching pages linked
  4. Copy the linked text and paste into your article

Need Help?

  • Test the tool: Lua error: Internal error: The interpreter exited with status 126.
  • View all linkable pages: Lua error: Internal error: The interpreter exited with status 126.
  • See all configuration: Edit Module:AutoLinker

</syntaxhighlight>

Advanced: Modifying the Module

The module can be extended with custom features:

  • Add custom filters — Skip pages from certain categories
  • Change link format — Hide the page title in display text
  • Add exclusion list — Pages that should never be auto-linked
  • Implement dynamic page list — Query all wiki pages automatically

These modifications require editing the Lua code in Module:AutoLinker, but the structure is straightforward.

API Reference

Functions

linkify(frame)
Main function; takes text and mode parameters; returns linked text
getAllPages(mode)
Retrieves page list; mode can be "static", "dynamic", or "auto"
getStaticPages()
Returns curated page list for matching
getDynamicPages()
Queries wiki API for pages (currently simplified)
listPages(frame)
Debug function; lists all pages being matched
test(frame)
Test function; runs linkify with sample text

Configuration Variables

caseSensitive
Boolean; whether matching is case-sensitive (default: false)
wholeWordsOnly
Boolean; whether to match whole words only (default: true)
skipAlreadyLinked
Boolean; whether to skip already-linked text (default: true)
minLength
Number; minimum length of page titles to match (default: 2)
maxMatches
Number; maximum matches per invocation (default: 500)
cacheExpiry
Number; cache expiration time in seconds (default: 3600)

See Also

Questions or Issues?

For help with AutoLinker: