Help:Magic words
- Help:Magic words
Magic words are special keywords in MediaWiki that, when used in wiki text, perform specific actions or display dynamic information. They aren't displayed literally; instead, the wiki software interprets them and replaces them with something else – a date, a page count, a namespace name, or the result of a function. They are a powerful tool for creating templates, maintaining consistency, and automating tasks within a wiki. This guide provides a comprehensive overview of magic words, covering their syntax, categories, common examples, and how to leverage them effectively. This guide is geared towards beginners, assuming minimal prior knowledge of wiki markup.
Understanding the Basics
Magic words always begin with two percent signs (`%%`). The part following the first `%%` identifies the magic word itself. Some magic words require arguments – additional information provided after the magic word to customize its behavior. Arguments are separated from the magic word by a vertical bar (`|`). For example, `2025` displays the current year, while `https://binaryoption.wiki/index.php?title=Page_Title&action=edit` generates a full URL to edit the page "Page Title".
MediaWiki 1.40 supports a wide range of magic words, categorized by their function. The categories are:
- Variables: These words display dynamic information like dates, times, page names, and user details.
- Functions: These words perform actions, such as generating URLs, creating tables of contents, or including other pages.
- Converters: These words change the format of text, like converting a number to a different numeral system.
- Page Properties: These words retrieve information about a page, like its size or last modification date.
- Parsers: These words control how the wiki text is parsed and rendered.
- Language converters: These words translate text based on language settings.
Common Magic Words - Variables
These magic words display dynamic data.
- `2025`: Displays the current year (e.g., 2024). Useful for copyright notices or date-sensitive content.
- `07`: Displays the current month name (e.g., January).
- `6`: Displays the current day of the month (e.g., 26).
- `12:48`: Displays the current time in 24-hour format (e.g., 14:35).
- `12`: Displays the current hour in 24-hour format (e.g., 14).
- `Template:CURRENTMINUTE`: Displays the current minute (e.g., 35).
- `Template:SEASON`: Displays the current season (based on the current date).
- `Magic words`: Displays the name of the current page. Essential for templates that need to reference the page they're on.
- `Magic_words`: Displays the encoded version of the page name, useful for URLs.
- `Help`: Displays the namespace of the current page (e.g., "Help"). See Help:Namespaces for more information.
- `Help`: Displays the encoded version of the namespace.
- `42893`: Displays the unique numerical ID of the current page.
- `43040`: Displays the revision ID of the current page.
- `Help:Magic words`: Displays the full page name, including the namespace (e.g., "Help:Magic words").
- `Help:Magic_words`: Displays the encoded version of the full page name.
- `Template:SCRIPTNAME`: Displays the name of the script used to access the page.
- `https://binaryoption.wiki`: Displays the server name.
- `Template:SERVER NAME`: Displays the server's hostname.
- `Template:SERVER SOFTWARE`: Displays the server software.
- `Template:USER`: Displays the username of the current user.
- `Template:USERNAME`: An alias for `Template:USER`.
- `Template:USERID`: Displays the user ID of the current user.
- `Template:USERS`: Displays a list of all users. (Use with caution, as this can be a very long list.)
- `Template:RAWURL`: Displays the raw URL of the current page.
- `Template:BASEURL`: Displays the base URL of the wiki.
Common Magic Words - Functions
These magic words perform actions.
- `https://binaryoption.wiki/index.php?title=Page_Title&action=edit`: Generates a full URL to the specified page with the specified action (in this case, editing). Very useful for creating links to specific page states.
- `/index.php?title=Page_Title&action=edit`: Generates a local URL relative to the wiki installation.
- `text`: URL-encodes the given text. Important for creating valid URLs with special characters.
- `Template:REVISIONSIZE:Page Title`: Returns the size of the specified page revision in bytes.
- `92004`: Returns the revision ID of the specified page.
- `binaryoption`: Displays the name of the wiki.
- `Special:Search`: Creates a link to the Special:Search page. This can be used in templates to create search forms.
- ``: Creates a link to the Special:WhatLinksHere page for the current page.
- `Template:INTL:string`: Used for internationalization; displays a translated string based on the user's language preference. See Help:Internationalization.
- `{{#if:condition|then|else}}`: A parser function that conditionally displays content based on a condition. A fundamental building block for complex templates.
- `{{#switch:variable|case1|result1|case2|result2|...}}`: A parser function that performs different actions based on the value of a variable. Useful for creating menus or handling different input values.
- `{{#vardefine:name|value}}`: Defines a variable that can be reused within a page or template.
- `{{#varbyname:name}}`: Retrieves the value of a previously defined variable.
- `{{#time:format|timestamp}}`: Formats a timestamp according to the specified format string. See Help:Formatting Dates and Times.
- `{{#categorytoc}}`: Displays a table of contents for the categories on the page.
- `{{#properties}}`: Displays the properties associated with the current page.
Common Magic Words - Converters
These magic words convert data.
- `{{#binary:value}}`: Converts a decimal number to its binary representation.
- `{{#decimal:value}}`: Converts a number to its decimal representation.
- `{{#hex:value}}`: Converts a decimal number to its hexadecimal representation.
- `{{#octal:value}}`: Converts a decimal number to its octal representation.
- `{{#roman:number}}`: Converts a number to its Roman numeral representation.
Common Magic Words – Page Properties
These magic words retrieve information about a page.
- `Template:PAGECOUNT`: Displays the number of pages in the wiki.
- `Template:FILECOUNT`: Displays the number of files in the wiki.
- `Template:EDITCOUNT`: Displays the total number of edits made to the wiki.
- `Template:DELETEDREVISIONS`: Displays the number of deleted revisions.
- `Template:STORAGE`: Displays the amount of storage used by the wiki.
Using Magic Words in Templates
Magic words are particularly powerful when used within Help:Templates. Templates allow you to create reusable blocks of wiki text that can be inserted into multiple pages. By using magic words within templates, you can create dynamic content that adapts to the specific page it's used on.
For example, a template for a project page might use `Magic words` to display the project's name and `2025` to automatically update the copyright notice. This ensures that the information is always accurate and consistent.
Advanced Techniques and Considerations
- **Parser Functions:** The `#if` and `#switch` parser functions are incredibly versatile and allow you to create complex logic within your wiki pages and templates. Mastering these functions is key to unlocking the full potential of MediaWiki.
- **Variable Scope:** Variables defined using `#vardefine` have a specific scope. They are typically only accessible within the same page or template.
- **Error Handling:** Some magic words may return an error if they are used incorrectly or if the arguments are invalid. Use caution and test your code thoroughly.
- **Performance:** Excessive use of complex magic words and parser functions can impact wiki performance. Optimize your code to minimize overhead.
- **Custom Magic Words:** Administrators can add custom magic words to extend the functionality of the wiki. This requires programming knowledge and access to the wiki's configuration files.
Troubleshooting
- **Magic word doesn't work:** Double-check the syntax, including the two percent signs (`%%`) and the vertical bar (`|`) for arguments. Ensure you're using the correct magic word name.
- **Unexpected output:** Verify the arguments you're passing to the magic word. Consult the documentation for the specific magic word to understand its expected input.
- **Error message:** Pay attention to the error message and try to understand what it's telling you. Common errors include invalid arguments or incorrect syntax.
Further Resources
- Help:Contents: The main help page for MediaWiki.
- Help:Formatting: Guidelines on formatting wiki text.
- Help:Templates: Detailed information about creating and using templates.
- Help:Parser Functions: Documentation for all available parser functions.
- Help:Internationalization: Information on translating your wiki.
- Help:Namespaces: Understanding how namespaces work.
- [MediaWiki Manual:Magic words](https://www.mediawiki.org/wiki/Manual:Magic_words): The official MediaWiki documentation for magic words.
- [Parser Functions List](https://www.mediawiki.org/wiki/Developer_reference:Parser_functions): A comprehensive list of available parser functions.
- [MediaWiki Extension Registry](https://www.mediawiki.org/wiki/Extension_registry): Explore extensions that can add new magic words and functionality.
Strategies, Technical Analysis, Indicators, and Trends
Understanding financial markets involves a multitude of strategies and tools. Here are some related concepts:
- **Day Trading Strategies:** [1](https://www.investopedia.com/terms/d/daytrading.asp) - Exploiting small price movements within a day.
- **Swing Trading Strategies:** [2](https://www.investopedia.com/terms/s/swingtrading.asp) - Holding positions for several days to weeks.
- **Position Trading Strategies:** [3](https://www.investopedia.com/terms/p/positiontrading.asp) - Long-term investment strategy.
- **Scalping:** [4](https://www.babypips.com/learn-forex/forex_trading_strategies/scalping) - Extremely short-term trading.
- **Trend Following:** [5](https://corporatefinanceinstitute.com/resources/knowledge/trading-investing/trend-following/) - Identifying and capitalizing on prevailing trends.
- **Technical Analysis:** [6](https://www.investopedia.com/terms/t/technicalanalysis.asp) - Analyzing price charts and patterns to predict future movements.
- **Fundamental Analysis:** [7](https://www.investopedia.com/terms/f/fundamentalanalysis.asp) - Evaluating the intrinsic value of an asset.
- **Moving Averages:** [8](https://www.investopedia.com/terms/m/movingaverage.asp) - Smoothing price data to identify trends.
- **Relative Strength Index (RSI):** [9](https://www.investopedia.com/terms/r/rsi.asp) - Measuring the magnitude of recent price changes.
- **MACD (Moving Average Convergence Divergence):** [10](https://www.investopedia.com/terms/m/macd.asp) - Identifying changes in the strength, direction, momentum, and duration of a trend.
- **Bollinger Bands:** [11](https://www.investopedia.com/terms/b/bollingerbands.asp) - Measuring market volatility.
- **Fibonacci Retracements:** [12](https://www.investopedia.com/terms/f/fibonacciretracement.asp) - Identifying potential support and resistance levels.
- **Elliott Wave Theory:** [13](https://www.investopedia.com/terms/e/elliottwavetheory.asp) - Identifying recurring wave patterns in price movements.
- **Candlestick Patterns:** [14](https://www.investopedia.com/terms/c/candlestick.asp) - Recognizing visual patterns in price charts.
- **Ichimoku Cloud:** [15](https://www.investopedia.com/terms/i/ichimoku-cloud.asp) - A comprehensive indicator that provides support and resistance levels, trend direction, and momentum.
- **Parabolic SAR:** [16](https://www.investopedia.com/terms/p/parabolicsar.asp) - Identifying potential reversal points.
- **Average True Range (ATR):** [17](https://www.investopedia.com/terms/a/atr.asp) - Measuring market volatility.
- **Volume Weighted Average Price (VWAP):** [18](https://www.investopedia.com/terms/v/vwap.asp) - Calculating the average price weighted by volume.
- **Support and Resistance Levels:** [19](https://www.investopedia.com/terms/s/supportandresistance.asp) - Identifying price levels where buying or selling pressure is likely to emerge.
- **Chart Patterns (Head and Shoulders, Double Top/Bottom):** [20](https://www.investopedia.com/terms/c/chartpattern.asp) - Recognizing formations that suggest future price movements.
- **Divergence (RSI, MACD):** [21](https://www.investopedia.com/terms/d/divergence.asp) - Identifying potential trend reversals when price and indicators move in opposite directions.
- **Trendlines:** [22](https://www.investopedia.com/terms/t/trendline.asp) - Drawing lines on a chart to identify the direction of a trend.
- **Market Sentiment:** [23](https://www.investopedia.com/terms/m/marketsentiment.asp) - Gauging the overall attitude of investors towards a particular asset.
Help:Contents Help:Formatting Help:Templates Help:Parser Functions Help:Internationalization Help:Namespaces Manual:Configuration settings Manual:Extension installation Manual:Upgrading Manual:Administrators
Start Trading Now
Sign up at IQ Option (Minimum deposit $10) Open an account at Pocket Option (Minimum deposit $5)
Join Our Community
Subscribe to our Telegram channel @strategybin to receive: ✓ Daily trading signals ✓ Exclusive strategy analysis ✓ Market trend alerts ✓ Educational materials for beginners