Difference between revisions of "Extension:baselinker"
From Testiwiki
Juha Villman (talk | contribs) (created empty page) |
Juha Villman (talk | contribs) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | <pre> | |
+ | This extension is obsolute and no longer supported | ||
+ | </pre> | ||
+ | This extension creates SQL-queries to Opasnet Base. Queries are passed as URL-parameter. User_id (or IP-address), wiki page_id and wiki page name from where query is accessed is saved to Opasnet Base's database. | ||
+ | |||
+ | == Installation == | ||
+ | |||
+ | # Download extension file from [[Image:baselinker.zip|here]] | ||
+ | # Place file into extension directory of your wiki | ||
+ | # Add this into your localsetting.php: <pre>require_once ( "$IP/extensions/baselinker.php" );</pre> | ||
+ | |||
+ | == Usage == | ||
+ | |||
+ | === Basic (tag) === | ||
+ | |||
+ | SQL-query is placed between '''<nowiki><sql-query></nowiki>''' and '''<nowiki></sql-query></nowiki>''' -tags | ||
+ | |||
+ | Example: | ||
+ | <pre> | ||
+ | <sql-query> | ||
+ | select * from Variable | ||
+ | </sql-query> | ||
+ | </pre> | ||
+ | |||
+ | Generates: <sql-query>select * from Variable</sql-query> | ||
+ | |||
+ | Note that you can have line breaks etc. in your query. Character count is limited to 255. | ||
+ | |||
+ | === Advanced === | ||
+ | |||
+ | Extension has 2 additional parameters: | ||
+ | |||
+ | ;name: Name parameter defines the name of the query link. Default is "Run query". | ||
+ | ;display: Display defines whether the SQL-query is displayed on the wiki page or not. Set this to "1" if you want your query to be displayed as pre-formatted wiki-text | ||
+ | |||
+ | === Parser usage === | ||
+ | |||
+ | Baselinker can also be used as parser function so you can use template attributes and magic words in your queries.<br> | ||
+ | It has 2 parameters: | ||
+ | #query | ||
+ | #displayed link text | ||
+ | |||
+ | Example: | ||
+ | <pre> | ||
+ | {{#sql-query:select * from Variable|this is an example}} | ||
+ | </pre> | ||
+ | |||
+ | Generates: {{#sql-query:select * from Variable|this is an example}} | ||
+ | [[category:extension]] |
Latest revision as of 11:09, 16 November 2011
This extension is obsolute and no longer supported
This extension creates SQL-queries to Opasnet Base. Queries are passed as URL-parameter. User_id (or IP-address), wiki page_id and wiki page name from where query is accessed is saved to Opasnet Base's database.
Installation
- Download extension file from File:Baselinker.zip
- Place file into extension directory of your wiki
- Add this into your localsetting.php:
require_once ( "$IP/extensions/baselinker.php" );
Usage
Basic (tag)
SQL-query is placed between <sql-query> and </sql-query> -tags
Example:
<sql-query> select * from Variable </sql-query>
Generates: <sql-query>select * from Variable</sql-query>
Note that you can have line breaks etc. in your query. Character count is limited to 255.
Advanced
Extension has 2 additional parameters:
- name
- Name parameter defines the name of the query link. Default is "Run query".
- display
- Display defines whether the SQL-query is displayed on the wiki page or not. Set this to "1" if you want your query to be displayed as pre-formatted wiki-text
Parser usage
Baselinker can also be used as parser function so you can use template attributes and magic words in your queries.
It has 2 parameters:
- query
- displayed link text
Example:
{{#sql-query:select * from Variable|this is an example}}
Generates: {{#sql-query:select * from Variable|this is an example}}