SMFUserIntergration

Summary: Integrates Simple Machines Users into PmWiki
Version: 0.3 (June 18, 2007)
Prerequisites: SMF, PmWiki
Status: Testing
Maintainer: Scotepi

Questions answered by this recipe

How can I have only registered users on my Simple Machines Forum edit PmWiki, and how can I have Forum Administrators administer the Wiki

Install Instructions

  1. Download smfauth.php to cookbook/smfauth.php
  2. Set $SSI, $FormUrl, others are optional
    • $SSI
      • The Path to SSI.php in the SMF Install
    • $FormUrl
      • The full http://example.com/forum forum URL, no / at the end
  3. Edit Site.EditForm in PmWiki
    1. Find
      • (:input e_author:)
    2. Replace With
      • {$AuthId}
  4. Add require_once("$FarmD/cookbook/smfauth.php"); to the end of local/config.php

Variables

  • $SSI
    • The Path to SSI.php in the SMF Install
  • $FormUrl
    • The full http://example.com/forum forum URL, no / at the end
  • $AdminUsers
    • a array of none administrative users that you want to have wiki admin rights
  • $AdminGroups
    • a array of group numbers that you want to have administrator access
  • $ShowLogin
    • a bool (0/1/false/true) if you want to show the login forum along with the block message for guests
  • $AdminGroup
    • Admin user group, remember the @
  • $UserGroup
    • Reguler user group, remember the @
  • $OverallPassword
    • Password for disabled function

Notes

  1. $AdminGroups is still untested
  2. Expanding User Privileges
  3. Expanding Protection
    • In order to add more protection add more action=var variables to $ProtectActions and then set a $DefaultPasswords['var'] for Guest, User and Admin
    • You can also add '' to $ProtectActions if you want require people be logged in to use PmWiki
  4. As far as I can tell both PmWiki and SMF need to be on the same domain, ex. example.com/forum and example.com/wiki
  5. This was written with and tested for PmWiki 2.2.0-b57 and SMF 1.1.2

Release Notes

  • 0.3 (June 18, 2007)
    • Fixed a quote bug caused by SSI
    • Added a few more protected actions
  • 0.2 (June 17, 2007)
    • Group Support
    • In PmWiki Check
    • Overall Password
  • 0.1 (June 16, 2007)
    • First Release

Comments

$admingroups dosnt work because in one spot you have it as $adminsgroups and the other you have it as $admingroup -Peter Oct 29th 2009

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.

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_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_COOKIE] => imstime=1777627959; PHPSESSID=uhsa6u19at7kjgkcnihsadjm40
            [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%2fSMFUserIntergration
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=Cookbook%2fSMFUserIntergration
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/SMFUserIntergration
            [REDIRECT_SCRIPT_URL] => /wiki/Cookbook/SMFUserIntergration
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afRzSkRFNHzBHNhXYSLI7AAAAQM
            [REDIRECT_URL] => /wiki/Cookbook/SMFUserIntergration
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 15067
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/Cookbook/SMFUserIntergration
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/SMFUserIntergration
            [SCRIPT_URL] => /wiki/Cookbook/SMFUserIntergration
            [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] => afRzSkRFNHzBHNhXYSLI7AAAAQM
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777627978.3758
            [REQUEST_TIME] => 1777627978
            [argv] => Array
                (
                    [0] => n=Cookbook%2fSMFUserIntergration
                )

            [argc] => 1
        )

)