Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

SkinList

Summary: List skins installed on a site
Version: 20171115
Prerequisites: PmWiki 2.2.56, SkinChange
Status: Stable
Maintainer: Petko
License: Unknown
Categories: Skins PHP72 PHP74
Users: (view / edit)
Discussion: SkinList-Talk

Question

How can I get a list of skins installed on a site?

Answer

The skinlist.phpΔ recipe provides a simple (:skinlist:) directive to do this.

In your local/config.php file, include the line:

include_once('cookbook/skinlist.php');

Usage

This recipe adds a (:skinlist:) markup, which displays a list of available skins for a site.

(:skinlist:)

Configuration

The $PageSkinList array may contain custom skins to be included or excluded from the listings:

$PageSkinList['goodskin'] =  1; # add a skin the recipe doesn't seem to find
$PageSkinList['baadskin'] = -2; # do not list this skin even if available 

Unlisting skins is possible since version 20171115.

Notes

This recipe requires SkinChange if installed on PmWiki version 2.2.126 or earlier.

Release notes

  • 20190903 Update for PHP 7.4 (Petko)
  • 20171115 Update for PHP 7.2, document $PageSkinList, negative numbers will delist a skin (Petko)
  • 20160407 Update for PHP 5.5 (Petko)

See Also

Contributors

  • Maintainer: Petko
  • Original author: probably Pm

Comments

See SkinList-Talk

User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.

Edit - History - Print - Recent Changes - Search
Page last modified on January 09, 2023, at 07:02 AM
Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n, setskin
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=Cookbook%2fSkinList&setskin=pmwiki2bars
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=Cookbook%2fSkinList&setskin=pmwiki2bars
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/SkinList
            [REDIRECT_SCRIPT_URL] => /wiki/Cookbook/SkinList
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afITRi40X0NlIsNeE5RzhwAAAIM
            [REDIRECT_URL] => /wiki/Cookbook/SkinList
            [REMOTE_ADDR] => 216.73.216.31
            [REMOTE_PORT] => 32817
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/Cookbook/SkinList?setskin=pmwiki2bars
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/SkinList
            [SCRIPT_URL] => /wiki/Cookbook/SkinList
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afITRi40X0NlIsNeE5RzhwAAAIM
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777472326.0694
            [REQUEST_TIME] => 1777472326
            [argv] => Array
                (
                    [0] => n=Cookbook%2fSkinList&setskin=pmwiki2bars
                )

            [argc] => 1
        )

)