Procedural File: func.php
Source Location: /func.php
Functions
arg_check [line 396]
boolean arg_check(
string $str
)
|
|
Argument (cmd) check for program
global $vars; $vars['cmd'] == $str would be enough
Parameters:
array_fill [line 1187]
void array_fill(
$start_index, $num, $value
)
|
|
Parameters:
|
|
$start_index: |
|
|
|
$num: |
|
|
|
$value: |
|
auto_template [line 171]
string auto_template(
string $page
)
|
|
Get template contents for a new page
Parameters:
|
string |
$page: |
the new page |
API Tags:
| Return: | template contents |
| Global: | boolean $auto_template_func: use this auto_template function or not |
| Global: | array $auto_template_rules: the pagename rules to be used as templates. @see pukiwiki.ini.php |
catrule [line 578]
Show text formatting rules
API Tags:
| Return: | TextFormattingRules html |
| Global: | string $rule_page: TextFormattingRules page |
check_non_list [line 153]
boolean check_non_list(
[string $page = '']
)
|
|
Check if the page is in the non_list
Parameters:
API Tags:
| Global: | string $non_list: the preg definition of non_list (ignore pages). @see pukiwiki.ini.php |
csv_explode [line 1121]
array csv_explode(
string $separator, string $string
)
|
|
Explode Comma-Separated Values to an array
Example)
Parameters:
|
string |
$separator: |
separator, usually ',' |
|
string |
$string: |
csv strings |
API Tags:
csv_implode [line 1152]
string csv_implode(
string $glue, array $pieces
)
|
|
Implode an array with CSV data format (escape double quotes)
Example)
Parameters:
|
string |
$glue: |
seperator, usually ',' |
|
array |
$pieces: |
|
API Tags:
decode [line 428]
string decode(
string $key
)
|
|
Decode page name
hex2bin($key)
Parameters:
|
string |
$key: |
encoded string |
API Tags:
die_message [line 596]
void die_message(
string $msg
)
|
|
Show (critical) error message (then exit)
Parameters:
do_search [line 285]
string do_search(
$word, [enum $type = 'AND'], [boolean $non_format = FALSE], [string $base = ''], string $work
)
|
|
'Search' main function
Parameters:
|
string |
$work: |
search word |
|
enum |
$type: |
'AND' or 'OR' |
|
boolean |
$non_format: |
|
|
string |
$base: |
|
|
|
$word: |
|
API Tags:
| Return: | the search result in html |
| See: | search.inc.php |
| Uses: | get_search_words() |
| Uses: | get_existpages |
| Uses: | auth::check_role |
drop_submit [line 740]
string drop_submit(
string $str
)
|
|
Hide <input type="(submit|button|image)"...> to <input type="hidden"...>
Parameters:
|
string |
$str: |
target string |
API Tags:
encode [line 411]
string encode(
string $key
)
|
|
Encode page-name
strtoupper(bin2hex($key))
Parameters:
|
string |
$key: |
a string such as a pagename |
API Tags:
format_date [line 685]
void format_date(
$val, [ $paren = FALSE]
)
|
|
Parameters:
generate_trie_regex [line 838]
void generate_trie_regex(
array &$array, [int $offset = 0], [int $sentry = NULL], [int $pos = 0]
)
|
|
Generate one compact regex for quick reTRIEval, that just matches with all $array values.
USAGE: sort($array, SORT_STRING); // Keys are replaced, as we had expected
Parameters:
|
array |
&$array: |
(_sorted_ _string_ array) array_keys($array) MUST BE _continuous integers started with 0_. All $array values MUST BE strings. Passing the reference, of the $array here, will save the memories, from flood of recursive call. |
|
int |
$offset: |
$array[$offset] is the first value to check |
|
int |
$sentry: |
$array[$sentry - 1] is the last value to check |
|
int |
$pos: |
Position of the letter to start checking. (0 = the first letter) |
Information Tags:
getmicrotime [line 637]
Get the current time in micro sec
API Tags:
| Return: | time in micro sec |
get_autoaliases [line 900]
array get_autoaliases(
[string $word = '']
)
|
|
Load/get autoalias pairs
Parameters:
API Tags:
get_autoaliases_from_aliaspage [line 941]
array get_autoaliases_from_aliaspage(
)
|
|
Load/get AutoAlias pairs from AutoAliasName
API Tags:
| Return: | array whose keys are alias names and values are array of real names |
| Global: | string $aliaspage: AutoAliasName page |
| Global: | int $autoalias_max_words: maximum number of aliases |
| Usedby: | get_autoaliases() |
get_autoaliases_from_autobasealias [line 924]
array get_autoaliases_from_autobasealias(
)
|
|
Load/get pairs of AutoBaseAlias
API Tags:
| Return: | array whose keys are alias names and values are array of real names |
| Usedby: | get_autoaliases() |
Information Tags:
| Since: | PukiWiki Plus! 1.4.7plus-u3-i18n or 1.4.8plus-i18n |
get_autoglossaries [line 987]
array|string get_autoglossaries(
[string $word = '']
)
|
|
Load/get setting pairs from Glossary
Parameters:
|
string |
$word: |
glossary word |
API Tags:
| Return: | if $word == '': array of whose keys are words and values are their explanations respectively if $word != '': explanation of the word |
| Global: | string $glossarypage: Glossary page |
| Global: | int $autoglossary_max_words: maximum number of glossary words |
get_autolink_pattern [line 782]
void get_autolink_pattern(
&$pages, [ $min_len = -1]
)
|
|
Parameters:
get_autolink_pattern_sub [line 885]
void get_autolink_pattern_sub(
&$pages, $start, $end, $pos
)
|
|
Parameters:
|
|
&$pages: |
|
|
|
$start: |
|
|
|
$end: |
|
|
|
$pos: |
|
get_date [line 654]
void get_date(
string $format, [int $timestamp = NULL]
)
|
|
Get the date
Example) get_date('D, d M Y H:i:s T', get_filetime($_page))
Parameters:
|
string |
$format: |
date format |
|
int |
$timestamp: |
timestamp or current UTIME if not specified |
get_glossary_pattern [line 746]
void get_glossary_pattern(
&$pages, [ $min_len = -1]
)
|
|
Parameters:
get_passage [line 719]
string get_passage(
int $time, [boolean $paren = TRUE]
)
|
|
Get the time passage from the given timestamp to the current time.
The passage format is as 'N seconds/minutes/hours/days/years ago'
Parameters:
|
int |
$time: |
timestamp |
|
boolean |
$paren: |
put () on the both side of the output string |
API Tags:
get_script_uri [line 1024]
string get_script_uri(
[string $init_uri = '']
)
|
|
Get the PukiWiki script URI
Parameters:
|
string |
$init_uri: |
Initialize script URI manually if want |
API Tags:
get_search_words [line 205]
void get_search_words(
$words, [ $do_escape = FALSE]
)
|
|
Parameters:
API Tags:
get_short_pagename [line 704]
string get_short_pagename(
string $fullpagename
)
|
|
Get short pagename(last token without '/') or basename
Parameters:
API Tags:
| Return: | short pagename (or basename) |
get_zonetime_offset [line 675]
void get_zonetime_offset(
$zonetime
)
|
|
Parameters:
hex2bin [line 439]
string hex2bin(
string $hex_string
)
|
|
Inversion of bin2hex()
Parameters:
API Tags:
input_filter [line 1088]
void input_filter(
$param
)
|
|
Parameters:
is_a [line 1170]
void is_a(
$class, $match
)
|
|
Parameters:
is_editable [line 95]
boolean is_editable(
string $page
)
|
|
Check if the page is editable or not
Parameters:
API Tags:
is_freeze [line 119]
boolean is_freeze(
string $page, [boolean $clearcache = FALSE]
)
|
|
Check if the page is frozen or not
Parameters:
|
string |
$page: |
|
|
boolean |
$clearcache: |
clear memory cache |
API Tags:
is_interwiki [line 20]
boolean is_interwiki(
string $str
)
|
|
Check if the str is interwiki or not
Parameters:
API Tags:
| Global: | string $InterWikiName: Syntax definition of InterWikiName, @see init.php |
| Uses: | is_url() |
is_page [line 79]
boolean is_page(
string $page, [boolean $clearcache = FALSE]
)
|
|
Check if the page exists
Parameters:
|
string |
$page: |
|
|
boolean |
$clearcache: |
clearcache or not |
API Tags:
is_pagename [line 33]
boolean is_pagename(
string $str
)
|
|
Check if the str is pagename or not
Parameters:
API Tags:
| Global: | string $BracketName: Syntax definition of BracketName (or PageName), @see init.php |
| Usedby: | is_editable() |
is_url [line 64]
boolean is_url(
string $str, [boolean $only_http = FALSE]
)
|
|
Check if the str is url or not
Parameters:
|
string |
$str: |
|
|
boolean |
$only_http: |
check only http, and https. Otherwise, check http, https, ftp, and news |
API Tags:
md5_file [line 1199]
void md5_file(
$filename
)
|
|
Parameters:
page_list [line 475]
string page_list(
array $pages, [string $cmd = 'read'], [boolean $withfilename = FALSE]
)
|
|
Create list of pages (html)
Parameters:
|
array |
$pages: |
|
|
string |
$cmd: |
cmd used for href |
|
boolean |
$withfilename: |
print physical filename, too |
API Tags:
| Return: | page_list html |
| See: | list.inc.php, filelist.inc.php |
| Uses: | get_readings - if $pagereading_enable is TRUE |
| Uses: | get_pg_passage |
strip_bracket [line 454]
string strip_bracket(
string $str
)
|
|
Remove [[ ]] (brackets)
Parameters:
|
string |
$str: |
[[pagename]] |
API Tags:
| Deprecated: | use this function to support PukiWiki 1.3 |
|
|