Try to learn something about everything, and everything about somethingThomas Huxley “Darwin's bulldog” (1824-1895)

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:computers:dokuwiki_tweaks [17/02/26 16:25 GMT] – [Allow any file-type upload] johnpublic:computers:dokuwiki_tweaks [19/04/26 16:02 BST] (current) – [Hide Revisions and Page Source for not-logged in Users] john
Line 2: Line 2:
  
 ====== DokuWiki Tweaks ====== ====== DokuWiki Tweaks ======
 +
 +===== Hide Revisions and Page Source for not-ADMIN in Users =====
 +
 +Edit ''../lib/tpl/monobook/conf/tabs.php'' to add the check of ''AUTH_ADMIN'' for the tabs for Page Source and Revisions
 +
 +<code php>
 + 
 +            if(!empty($INFO["exists"])){
 +                $_monobook_tabs["ca-edit"]["text"] = $lang["btn_edit"]; //language comes from DokuWiki core
 +            }else{
 +                $_monobook_tabs["ca-edit"]["text"] = $lang["btn_create"]; //language comes from DokuWiki core
 +            }
 +        }
 +    }elseif (actionOK("source") && (auth_quickaclcheck($ID) == AUTH_ADMIN)){ //check if action is disabled and also that AUTH_ADMIN is logged in
 +        $_monobook_tabs["ca-edit"]["text"     = $lang["btn_source"]; //language comes from DokuWiki core
 +        $_monobook_tabs["ca-edit"]["accesskey"] = "E";
 +    }
 +
 +
 +    //old versions/revisions tab
 +    if (!empty($INFO["exists"]) &&
 +            actionOK("revisions")
 +        && (auth_quickaclcheck($ID) == AUTH_ADMIN)) // check AUTH_ADMIN is logged in to see old revisions
 +        { //check if action is disabled
 +        //ATTENTION: "ca-history" is used as css id selector!
 +        $_monobook_tabs["ca-history"]["text"     = $lang["btn_revs"]; //language comes from DokuWiki core
 +        $_monobook_tabs["ca-history"]["href"     = wl(cleanID(getId()), array("do" => "revisions"), false, "&");
 +        $_monobook_tabs["ca-history"]["accesskey"] = "O";
 +        if ($ACT === "revisions"){ //$ACT comes from DokuWiki core
 +            $_monobook_tabs["ca-history"]["class"] = "selected";
 +        }
 +
 +</code>
 +===== Include / Blog "Read More..." =====
 +
 +The default is for a "read more..." link to be placed at the extreme right of the page - which is not ideal when using Monobook template.
 +
 +I found the css setting that controls the position of "read more..." in ''../lib/plugins/include/style.css''
 +
 +<code css>
 +div.dokuwiki p.include_readmore {
 +  text-align: right;
 +}
 +</code>
 +
 +changing it to 
 +
 +<code css>
 +div.dokuwiki p.include_readmore {
 +  text-align: left;
 +}
 +</code> 
 +
 +solved the problem and "read more..." is now on the left, directly at the point that the eyes get to when reading a post on the main blog index page.
 +
 +To prevent this being overwritten on updates I found it works to put the same stanza in ''../conf/userstyle.css'' which should keep it safe...
 +
 +
 ===== Vector / Monobook tweaks ===== ===== Vector / Monobook tweaks =====
  
Line 374: Line 432:
 Media manage red warnings when uploading jpg image files Media manage red warnings when uploading jpg image files
  
-<note error>+<note warning>
 Error: Call to undefined function xml_parser_create() Error: Call to undefined function xml_parser_create()
 </note> </note>

Navigation