mirror of
https://github.com/UnickSoft/graphonline.git
synced 2025-07-01 07:15:29 +00:00
25 lines
7.9 KiB
Plaintext
25 lines
7.9 KiB
Plaintext
version=pmwiki-2.2.75 ordered=1 urlencoded=1
|
|
agent=Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
|
|
author=Polly
|
|
charset=UTF-8
|
|
csum=iR9ogyrR17N
|
|
ctime=1250689504
|
|
host=188.143.232.32
|
|
name=PmWiki.GroupCustomizations
|
|
rev=10
|
|
targets=
|
|
text=Thanks for %3ca href="http://sauotyelav.com">intocduring%3c/a> a little rationality into this debate.
|
|
time=1485188634
|
|
author:1485188634=Polly
|
|
csum:1485188634=iR9ogyrR17N
|
|
diff:1485188634:1485016359:=1c1%0a%3c Thanks for %3ca href="http://sauotyelav.com">intocduring%3c/a> a little rationality into this debate.%0a\ No newline at end of file%0a---%0a> Yeah that's what I'm talking about %3ca href="http://zjqoxk.com">banbi-y-ce%3c/a> work!%0a\ No newline at end of file%0a
|
|
host:1485188634=188.143.232.32
|
|
author:1485016359=Lynn
|
|
csum:1485016359=P4TKjf6a1p
|
|
diff:1485016359:1484933161:=1c1%0a%3c Yeah that's what I'm talking about %3ca href="http://zjqoxk.com">banbi-y-ce%3c/a> work!%0a\ No newline at end of file%0a---%0a> Ab fab my goldoy man.%0a\ No newline at end of file%0a
|
|
host:1485016359=188.143.232.27
|
|
author:1484933161=Pait
|
|
csum:1484933161=nm92JBC7LGt
|
|
diff:1484933161:1388195894:=1c1,89%0a%3c Ab fab my goldoy man.%0a\ No newline at end of file%0a---%0a> (:Summary: How to customize a subset of your wiki:)%0a> (:Audience: administrators (intermediate) :)%0a> One of the purposes of [[Wiki Group]]s is to allow a [[Wiki Administrator]] to customize the features of PmWiki on a per-group basis. Here is where ''per group customizations'' come into play.%0a> %0a> * The ''local/'' subdirectory is used to hold local configuration files. %0a> * The ''pub/css/'' subdirectory is used to hold local css files.%0a> %0a> To perform [[local customizations]] for a particular WikiGroup, %0a> * place the customizations in a file called "''%3cgroupname>.php''" (where ''%3cgroupname>'' is the actual name of the page group in question) in the ''local/'' subdirectory %0a> * place the css customizations in a file called "''%3cgroupname>.css''" (where ''%3cgroupname>'' is the actual name of the page group in question) in the ''pub/css/'' subdirectory.%0a> These files will be automatically processed after processing any local customizations in the ''config.php'' and ''local.css'' files.%0a> %0a> For example, to change the image displayed in the upper-left corner of pages in the "GroupName" WikiGroup, one could create ''local/GroupName.php'' containing%0a> -> [@%0a> %3c?php%0a> $PageLogoUrl = "/myimages/chess.gif";%0a> @]%0a> The example's effect would cause all pages in the GroupName [[Wiki Group]] to use "/myimages/chess.gif" as the logo image instead of the default.%0a> %0a> To add markup to the beginning or end of each page in a wiki group, see [[Group headers]].%0a> %0a> !!! Per-page customizations%0a> [[#PerPage]] PmWiki also allows per-page customizations, simply use the full name of the page to be customized instead of the group. For example, one can use the file ''local/Chess.`HomePage.php'' to set local customizations for Chess.`HomePage.%0a> %0a> Almost any customization that would be placed in ''config.php'' can be used as a per-group or per-page customization. %0a> %0a> An important exception to this is setting '''per-group or per-page customizations for recipe scripts''' included in config.php. Most recipe scripts would need any customization variables defined before the script is included. Instead of using a per-group or per-page customization php file, use a per-group or per-page conditional statement in config.php, before including the recipe script. Example:%0a> %0a> >>frame%3c%3c%0a> ->[@$page = PageVar($pagename, '$FullName');%0a> $group = PageVar($pagename, '$Group');%0a> //per-group customizations:%0a> if($group=='GroupName') {%0a> $RecipeVariable = 'valueA';%0a> etc. ...%0a> }%0a> //per-page customizations:%0a> if($page=='GroupName.PageName) {%0a> $RecipeVariable = 'valueB';%0a> etc. ...%0a> }%0a> //include recipe after variables are set:%0a> include_once('cookbook/recipescript.php');@]%0a> >>%3c%3c%0a> %25red%25 Note that this method cannot be used to set $DefaultPasswords, you should use Group or Page attributes. See [[Passwords]] and [[PasswordsAdmin]] for more information.%0a> %0a> !!! Processing order%0a> For all local customizations, PmWiki first processes the ''local/config.php'' file, and then looks for a per-page customization file in the ''local/'' subdirectory to process, followed by any per-group customization file. If no per-page or per-group customizations are loaded, then PmWiki loads ''local/default.php''. If a per-page customization wants to have the per-group customizations loaded first, it can do so directly by using PHP's [@include_once()@] function.%0a> For more information see [[(PmWiki:)wiki cascades]].%0a> %0a> !!! Custom CSS styles per group or per-page%0a> To apply CSS styles to pages of a specific group named [[Group Name]], create a file named ''GroupName.css'' in the ''pub/css/'' directory and add the CSS style rules there. To apply styles to a specific page, create a file ''GroupName.PageName.css'' in this directory with your style rules. Any CSS rules to be applied for all wiki pages can be put into ''pub/css/local.css''.%0a> %0a> ->[@/pub/css/GroupName.css:%0a> %0a> body { background: #F4C4B4; }%0a> @]%0a> %0a> !!! Preventing group-Level configurations%0a> Any customization file can set $EnablePGCust=0; to prevent later page/group/default customizations from being automatically loaded. If a per-page customization needs to have the per-group customizations loaded first, it can do so directly by using PHP's [@include_once()@] function.%0a> %0a> !!! Authentication%0a> Any passwords required for a group should be set in the group's [[Group Attributes]] page (see [[Passwords Admin]]istration) and not in a group customization file.%0a> %0a> !!! Consider Wiki Farms%0a> [[Wiki Group]]s are an easy way to host multiple sites in a single PmWiki installation by giving each site its own group. Another approach is to use [[Wiki Farms]], which allows each site to have its own set of [[Wiki Group]] and local customization files. Read about %0a> %0a> If you are looking for nested group levels, you may want to consider [[PmWiki:HierarchicalGroups|Pm's design considerations on hierarchical groups]].%0a> %0a> >>faq%3c%3c [[#faq]]%0a> Q: How can I apply CSS styles to a particular group or page?%0a> %0a> A: Simply create a ''pub/css/Group.css'' or ''pub/css/Group.Page.css'' file containing the custom CSS styles for that group or page. See also Cookbook:LocalCSS.%0a> %0a> Q: Why shouldn't passwords be set in group (or page) customization files? Why shouldn't group or page passwords be set in config.php?%0a> %0a> A: The reason for this advice is that per-group customization files are only loaded for the current page. So, if @@[=$DefaultPasswords['read']=]@@ is set in ''local/GroupA.php'', then someone could use a page in another group to view the contents of pages in GroupA. For example, Main.WikiSandbox could contain:%0a> %0a> --> [=(:include GroupA.SomePage:)=]%0a> %0a> and because the ''GroupA.php'' file wasn't loaded (we're looking at Main.WikiSandbox --> ''local/Main.php''), there's no read password set.%0a> %0a> The same is true for page customization files.%0a> %0a> Q: Isn't that processing order strange? Why not load per page configuration last (that is after global configuration an per group configuration)?%0a> %0a> A: Many times what we want to do is to enable a certain capability for a group of pages, but disable it on a specific page, as if it was never enabled. If the per-group config file is processed first, then it becomes very difficult/tedious for the per-page one to "undo" the effects of the per-group page. So, we load the per-page file before the per-group.%0a> %0a> If a per-page customization wants the per-group customizations to be performed first, it can use the techniques given in [[PmWiki.GroupCustomizations]] (using ''include_once()'' or setting @@[=$EnablePGCust = 0=]@@).%0a
|
|
host:1484933161=188.143.232.32
|