Changeset 1175 in ExiteCMS
- Timestamp:
- 12/16/07 22:55:37 (4 years ago)
- Location:
- modules/common/wiki/php-files/modules/wiki
- Files:
-
- 5 edited
-
actions/footer.php (modified) (1 diff)
-
handlers/page/acls.php (modified) (1 diff)
-
libs/Wakka.class.php (modified) (1 diff)
-
module_installer.php (modified) (1 diff)
-
wikka.config.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/common/wiki/php-files/modules/wiki/actions/footer.php
r1161 r1175 13 13 if ($this->page) 14 14 { 15 switch ($owner = $this->GetPageOwner()) { 16 case "(Public)": 17 print("Public page\n"); 18 break; 19 case $this->UserIsOwner(): 20 print("You own this page\n"); 21 break; 22 case false; 23 print("Nobody".($this->GetUser() ? " (<a href=\"".$this->href("claim")."\">Take Ownership</a>)\n" : "\n")); 24 default: 25 if (iMEMBER) { 26 print("Owner: <a href='".BASEDIR."profile.php?lookup=$owner'>".$owner."</a>\n"); 27 } else { 28 print("Owner: $owner\n"); 29 } 15 $owner = $this->GetPageOwner(); 16 if ($owner == "(Public)") { 17 print("Public page\n"); 18 } elseif ($owner == false) { 19 print("Nobody".($this->GetUser() ? " (<a href=\"".$this->href("claim")."\">Take Ownership</a>)\n" : "\n")); 20 } elseif (iMEMBER && $GLOBALS['userdata']['user_name'] == $owner) { 21 print("You own this page\n"); 22 } else { 23 if (iMEMBER) { 24 print("Owner: <a href='".BASEDIR."profile.php?lookup=$owner'>".$owner."</a>\n"); 25 } else { 26 print("Owner: $owner\n"); 27 } 30 28 } 31 if ($this->IsAdmin()) {32 print("| <a href=\"".$this->href("acls")."\">Edit ACLs</a>\n");33 }34 29 } 35 30 -
modules/common/wiki/php-files/modules/wiki/handlers/page/acls.php
r1161 r1175 29 29 if (!defined('SET_NO_OWNER_LABEL')) define('SET_NO_OWNER_LABEL', '(Nobody - Set free)'); 30 30 if (!defined('USERS_LABEL')) define('USERS_LABEL', 'Users:'); 31 if (!defined('SELECTED_LABEL')) define('SELECTED_LABEL', ' Selected:');31 if (!defined('SELECTED_LABEL')) define('SELECTED_LABEL', 'Give access to:'); 32 32 if (!defined('GROUPS_LABEL')) define('GROUPS_LABEL', 'Usergroups:'); 33 33 if (!defined('INSTRUCTION_LABEL')) define('INSTRUCTION_LABEL', 'Click on the user or groupname to move it in or out of the selected box'); -
modules/common/wiki/php-files/modules/wiki/libs/Wakka.class.php
r1161 r1175 1167 1167 //returns true if user is listed in configuration list as admin 1168 1168 function IsAdmin() { 1169 $admin string = $this->config["admin_users"];1170 $adminarray = explode(',' , $adminstring);1171 1172 foreach ($adminarray as $admin){1173 if (trim($admin) == $this->GetUserName()) return true;1169 $admingroup = $this->config["admin_group"]; 1170 if ($admingroup{0} == "G") { 1171 return checkgroup(substr($admingroup,1)); 1172 } else { 1173 return (iMEMBER && $admingroup == $GLOBALS['userdata']['user_id']); 1174 1174 } 1175 1175 } -
modules/common/wiki/php-files/modules/wiki/module_installer.php
r1165 r1175 166 166 167 167 // and add initial record(s) to it 168 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##wiki_pages (id, tag, time, body, owner, user, latest, note, handler) VALUES (1, 'HomePage', now(), '{{image url=\"images/wikka_logo.jpg\" alt=\"wikka logo\" title=\"Welcome to th is Wikka Wiki!\"}}\n\nThis site is running on version ##{{wikkaversion}}## (see WikkaReleaseNotes). \nYou need to double-click on any page or click on the \"Edit page\" link at the bottom to get started. \n\nFor more information, visit the [[Wikka:HomePage WikkaWiki website]]! \n\nUseful pages: FormattingRules, WikkaDocumentation, OrphanedPages, WantedPages, TextSearch.', '##WEBMASTER##', '##WEBMASTER##', 'Y', '', 'page')");168 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##wiki_pages (id, tag, time, body, owner, user, latest, note, handler) VALUES (1, 'HomePage', now(), '{{image url=\"images/wikka_logo.jpg\" alt=\"wikka logo\" title=\"Welcome to the ExiteCMS implementation of Wikka Wiki!\"}}\n\nThis wiki is based on Wikka Wiki version ##{{wikkaversion}}## (see WikkaReleaseNotes). \nTo edit a page, double-click on it or click on the \"Edit page\" link at the bottom. \n\nFor more information, visit the [[Wikka:HomePage WikkaWiki website]]! \n\nUseful pages: FormattingRules, WikkaDocumentation, OrphanedPages, WantedPages, TextSearch.', '##WEBMASTER##', '##WEBMASTER##', 'Y', '', 'page')"); 169 169 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##wiki_pages (id, tag, time, body, owner, user, latest, note, handler) VALUES (2, 'RecentChanges', now(), '{{RecentChanges}}{{nocomments}}\n\n\n----\nCategoryWiki', '(Public)', '##WEBMASTER##', 'Y', '', 'page')"); 170 170 $mod_install_cmds[] = array('type' => 'db', 'value' => "INSERT INTO ##PREFIX##wiki_pages (id, tag, time, body, owner, user, latest, note, handler) VALUES (3, 'RecentlyCommented', now(), '{{RecentlyCommented}}{{nocomments}}\n\n\n----\nCategoryWiki', '(Public)', '##WEBMASTER##', 'Y', '', 'page')"); -
modules/common/wiki/php-files/modules/wiki/wikka.config.php
r1161 r1175 1 1 <?php 2 2 3 // default config 3 4 4 $wakkaConfig = array( 5 5 'mysql_host' => $db_host, … … 34 34 'external_link_new_window' => 1, 35 35 'sql_debugging' => '0', 36 'admin_users' => '',37 36 'admin_email' => $settings['siteemail'], 38 37 'upload_path' => IMAGES."wiki", … … 52 51 ); 53 52 54 // get wiki config variables from the CMSconfig table. They override the default config 55 $result = dbquery("SELECT * FROM ".$db_prefix."CMSconfig WHERE cfg_name LIKE 'wiki_%'"); 56 while ($data = dbarray($result)) { 57 // extract the wakkaConfig key from the cfg_name 58 $cfgkey = substr($data['cfg_name'],5); 59 // if the wakkaConfig key exists, overwrite the value 60 if (isset($wakkaConfig[$cfgkey])) { 61 $wakkaConfig[$cfgkey] = $data['cfg_value']; 53 // get wiki config variables from the CMSconfig settings. They override the default config 54 foreach($settings as $configkey => $configvalue) { 55 if (substr($configkey,0,5) == "wiki_") { 56 // extract the wakkaConfig key from the cfg_name 57 $cfgkey = substr($configkey,5); 58 // add the value to the wakkaconfig array 59 $wakkaConfig[$cfgkey] = $configvalue; 62 60 } 63 61 } … … 70 68 $wakkaConfig['stylesheet'] = 'css/wikka.css'; 71 69 } 72 // if the current user is an admin, add the username to the list of admins73 $wakkaConfig['admin_users'] = checkgroup($wakkaConfig['admin_group']) ? (iMEMBER ? $userdata['user_name'] : "*") : "";74 70 ?>
Note: See TracChangeset
for help on using the changeset viewer.
