{"id":13625711,"url":"https://github.com/plomlompom/PlomWiki","last_synced_at":"2025-04-16T10:33:00.045Z","repository":{"id":1170407,"uuid":"1064076","full_name":"plomlompom/PlomWiki","owner":"plomlompom","description":"Extensible PHP wiki using plain text files as its database, with primitive wiki markup and page versioning. Plugins to extend its functionality available in my PlomWikiPlugins repository.","archived":false,"fork":false,"pushed_at":"2019-01-25T05:48:51.000Z","size":359,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-02T22:20:01.521Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.plomlompom.de/PlomWiki/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plomlompom.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-09T04:21:05.000Z","updated_at":"2021-04-15T21:07:30.000Z","dependencies_parsed_at":"2022-08-16T12:25:12.880Z","dependency_job_id":null,"html_url":"https://github.com/plomlompom/PlomWiki","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plomlompom%2FPlomWiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plomlompom%2FPlomWiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plomlompom%2FPlomWiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plomlompom%2FPlomWiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plomlompom","download_url":"https://codeload.github.com/plomlompom/PlomWiki/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223708307,"owners_count":17189756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:02:00.086Z","updated_at":"2024-11-08T15:30:22.823Z","avatar_url":"https://github.com/plomlompom.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"PlomWiki: extensible PHP wiki with wiki markup and page versioning.\n\nCopyright 2010-2012, 2018 Christian Heller / \u003chttp://www.plomlompom.de/\u003e\nLicense: AGPLv3 or any later version. See file LICENSE for details.\n\nINTRODUCTION\n============\n\nPlomWiki is a small wiki written in PHP and (by default) using only a\nfile tree of text files as its database. Highly extensible through\nplugins, its default feature set is small and mostly only includes\nviewing and single-user editing of wiki pages, a simple wiki markup\nsyntax, histories of page edits and reverting pages to earlier versions.\n\nIn practice, PlomWiki so far serves as little more than a programming\nexercise and content management system personally used by me, its author\nChristian Heller; see website \u003chttp://www.plomlompom.de/PlomWiki/\u003e for\nmy real-world use of it. There, I also use a number of plugins, code of\nwhich is available at \u003chttps://github.com/plomlompom/PlomWikiPlugins\u003e.\n\nINSTALLATION\n============\n\nCopy the file tree into a web-accessible directory of yours that can run\nPHP scripts. Access plomwiki.php via your browser; a setup script will\nrun to finalize your installation, creating more files/directories; make\nsure your filesystem permissions are set liberally. When the script is\nfinished, you should see a default wiki page named \"Start\" that contains\nfurther instructions. Follow them to change your default admin password\nfrom \"Password\" to something more original.\n\nUSE\n===\n\nIn the default configuration, you can view each page's current text by\nclicking on the \"View\" link below its title and, if you know the\npassword, edit it by clicking on \"Edit\". Click on \"History\" to examine\nprevious changes to the page text and, via the \"Revert\" links there,\nrevert the page text to earlier versions.\n\nReverting and saving edits to the page needs the admin password. You can\nset it by clicking on \"Set admin password\".\n\nPer default, only little markup is possible for page formatting, though\nmore can easily be added as plugins (see Technical Details section). For\nmarkup syntax explanations, see the markup cheatcodes below the page\ntext editing window.\n\nTo create a new page, either in your address bar enter the new pagename\npreceded by \"http://[YourDomain/YourPath]/plomwiki.php?title=\", or write\na link to the new pagename into an existing page's text via the default\nPlomWiki linking markup (like this: \"[[NewPagename]]\") and click on it.\nNotice PlomWiki pagenames are case-sensitive and may only contain the\nsymbols a-z, A-Z, 0-9 and hyphens (\"-\").\n\nTo delete a page, reduce page text to \"delete\". Empty page text won't be\nposted.\n\nINTRODUCTION TO TECHNICAL DETAILS (see source code comments for details)\n=================================\n\nPage and history files\n----------------------\n\nWiki pages are stored as text files of their current version in pages/\nwith the pagename as the filename. In pages/diffs/, edit histories of\npages are stored, with single page edits formatted in a diff style\ndefined by the plomwiki.php function PlomDiff(), aiming at resemblance\nto the output of the Unix diff utility. Page deletion does not actually\nremove the files but just renames, timestamps and moves page and page\nhistory files to pages/deleted/.\n\nUser actions\n------------\n\nThe \"action=\" GET parameter in page URLs determines the user action.\nValues like \"page_view\" and \"page_edit\" correspond to functions like\nAction_page_view() and Action_page_edit() in plomwiki.php by prepending\nthe value with \"Action_\" and calling either a function found with that\nname or defaulting to \"Action_page_view\". This should give you an idea\non how to add new user actions by adding functions like \"Action_xyz()\".\n\nPlugins, markups\n----------------\n\nPlugins are implemented as code added by plomwiki.php to its run by\nexamining config/plugins and incorporating the contents of all files\nreferenced therein (and not commented out with a \"#\") as PHP code.\nFeel free to add not only functions, but also to extend global\nvariables, especially those acting as hooks in the flow of certain\nimportant functions which eval() them as code, like $hook_OutputHTML.\n\nWiki page markup is achieved by running the original page text through\npage text manipulation functions named and put into order in\nconfig/markups. PlomWiki's standard markup is built from functions\ndefined in the plugin plugins/StandardMarkup.php. New markup functions\ncan be made available by incorporating them as plugin code (see above).\n\nDatabase writing\n----------------\n\nWriting to PlomWiki's database starts with user input to Action_write(),\nwhich generates a list of appropriate DB manipulation tasks and writes\nthem into a todo file in PlomWiki/work. Tasks in this file are worked\nthrough independently from the user process that triggered them via\nWorkTodo(). Tasks written into the todo file work/todo_urgent are worked\nthrough and have to be finished before any user action can be performed.\n\nOther todo files could be named and separate WorkTodo() calls on them\ndefined as new user actions; such details of Action_write()'s behavior\ndepend on the \"t=\" GET parameter delivered to it. Functions named\n\"PrepareWrite_$t()\" (with $t the \"t=\" parameter) are called to fill\nAction_write() with all it needs to know: what to write where, etc.\n\nPasswords\n---------\n\nAs single bottleneck for DB writing, Action_write() also is the point\nwhere all password checks are called. It delivers POST \"password=\" and\nGET \"t=\" parameters to CheckPW() and waits for its OK. CheckPW() reads\nfrom config/passwords a list of keys (could be the names of pages,\nusers, whatever) mapped to password hashes; looks up (plugin-extendable)\n$permissions to see if the user-provided key is allowed to open targets\nof type \"t=\" (i.e. a password for page editing should not be usable for\nediting users); and if so, compares the hash of \"password=\" with the\nappropriate one in the passwords file. CheckPW() will also delay for 10\nseconds after a failed authentication attempt any further one from the\nsame IP.\n\nHTML output, string files\n-------------------------\n\nAll the strings from which the final HTML output is built are stored in\nfiles in config/strings and plugins/strings; plomwiki.php and plugins\nare to merely contain internal code arranging these files' contents.\nThe first line of these string files defines a separator (usually \"§\").\nA single line containing only the separator separates string entries;\neach entry starts with a key name, again separated from the string value\nby the separator. Entries with \"#\" as key can be used as comments. An\nempty \"#\" entry may be used at the end to ensure previous entries don't\nend with a newline as affixed by many text editors.\n\nThe key-value pairs from these files are read in via ReadStringsFile() \nto the global array $s; the separator string is replaced by the string\nvalue of $esc (\"\\r\" by default; it can be safely used as it is filtered\nfrom all user input by Sanitize()). $s' most important value is\n$s[\"design\"]: it's used by OutputHTML() as its main template for HTML\noutput. As all string values may, it contains placeholders for other\nvalues, identified by the value's key name starting and end by $esc. \nOutputHTML() recursively calls ReplaceEscapedVars(), which looks up and\nreplaces all these placeholders with their respective $s value.\n\nNaming conventions\n------------------\n\nFunction names, global variables and $s key names provided by plugins\nare supposed to start with the plugin name, with two exceptions for\nfunctions: Here, \"PrepareWrite_\" and \"Action_\" may be prepended to the\nplugin name. As $s[\"#\"] is used for string file comments and repeatedly\noverwritten, it's unusable for in-code purposes. $s key names starting\nwith \"i_\" are reserved for values repeatedly generated, used and\noverwritten in loops.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplomlompom%2FPlomWiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplomlompom%2FPlomWiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplomlompom%2FPlomWiki/lists"}