Loading...
 

Wiki Customizations




Interface

The following items were modified in the CSS theme file "./styles/jqui.css" to tweak a few UI items
  • The margin-top value was added to space down the left/right menus from the top bar slightly
    #c1c2 #col2 .content {
            margin-left: 4px;
            margin-top: 10px; 
    }
  • The margin-top and margin-left values were modified slightly to change the position of the site title and site subtitle text
    #sitetitle {
            margin-top: 35px;
            margin-left: 15px;
            font-size: 2.4em;
    }
    
    #sitesubtitle {
            font-size: 1em;
            margin-top: 15px;
            margin-left: 25px;
    }
  • This section of code was un-commented and the margin-right value was added to pad the wiki page contents away from the right column slightly
    html #tiki-center {
            font-size: 1em;
            margin-right: 10px;
    }
  • The padding and margin values were modified to make the top bar a little smaller
    OLD VALUES
    #tiki-top {
    	padding: .5em .3em .3em 1em ;
    	margin: 0 10px 10px ;
    }
    
    NEW VALUES
    #tiki-top {
    	padding: 0 .3em 0;
    	margin: 0.6em 0.9em 0.6em;
    }
  • The color values below were modified to make all of the links on the page black (basically everything, top, sides and body) and only change color when hovering over them
    a, a:visited {
            color: #212121;
            text-decoration: none;
    }
    
    a:active, a:hover {
            color: #7195C1;
            text-decoration: none;
    }
  • This was added to the "/***** Blogs *****/" section to make the blog post title a little smaller and add some padding to the right of the text
    body.tiki_blogs .post .title h2 {
            color: #212121;
            text-align: left;
            font-size: 1.1em;
            padding-right: 20px;
    }

LDAP Authentication

  • Commented out the section titled "sync external group information of user" in ./lib/userslib.php. By default during LDAP authentication tikiwiki would create all of the groups from Active Directory that the user logging in is a member of inside of tikiwiki as local groups.
    // sync external group information of user
    $ldapgroups=$this->ldap->get_groups();
    $ldapgroups_simple=array();
    $tikigroups=$this->get_user_groups($user);
    foreach($ldapgroups as $group) {
          $gname=$group[$prefs['auth_ldap_groupattr']];
          $ldapgroups_simple[]=$gname; // needed later
          if($this->group_exists($gname) && !$this->group_is_external($gname)) { // group exists
                  //check if we need to sync group information
                  if(isset($group[$prefs['auth_ldap_groupdescattr']])) {
                          $ginfo=$this->get_group_info($gname);
                          if($group[$prefs['auth_ldap_groupdescattr']] != $ginfo['groupDesc']) {
                                  $this->set_group_description($gname,$group[$prefs['auth_ldap_groupdescattr']]);
                          }
                  }
    
          } else if(!$this->group_exists($gname)){ // create group
                  if(isset($group[$prefs['auth_ldap_groupdescattr']])) {
                          $gdesc=$group[$prefs['auth_ldap_groupdescattr']];
                  } else {
                          $gdesc='';
                  }
                  $logslib->add_log('ldap','Creating external group '.$gname);
                  $this->add_group($gname,$gdesc,'',0,0,'','',0,'',0,0,'y');
          }
    
          // add user
          if(!in_array($gname,$tikigroups)) {
                  $logslib->add_log('ldap','Adding user '.$user.' to external group '.$gname);
                  $this->assign_user_to_group($user,$gname);
          }
    }

PHP

  • The following parameters were changed in /etc/php.ini to allow larger file attachments to Wiki pages as well as give a little more memory to PHP. Remember to restart httpd after the changes
    memory_limit = 128M      ; Maximum amount of memory a script may consume
    post_max_size = 20M
    upload_max_filesize = 20M

Plugins

  • These lines of code were added to ./lib/wiki-plugins/wikiplugin_agentinfo.php to add the ability to print the SERVER_ADDR variable via this plugin. Pretty much any PHP variable can be added in this manner
    return tra("Displays browser client info").":<br />§b5d576047154db75122228fc734a8b42§";
    
    array('text' => tra('Server IP address'), 'value' => 'SRVIP'),
    
    if ($info == 'SRVIP') {
         $asetup = $_SERVER["SERVER_ADDR"];
    }

Structures

  • The following line was modified in the file "./lib/structures/structlib.php" to change the default contents of a new page in a structure
    $newpagebody = tra("---\n!!Table of contents") . ":" . "{toc shownum=1 type=fancy}";


Show php error messages