Changeset 1440
- Timestamp:
- 2008-03-07 03:00:16 (5 months ago)
- Location:
- branches/111307-atom
- Files:
-
- 1 removed
- 78 modified
- 1 copied
-
doc/manual/index.html (modified) (1 diff)
-
index.php (modified) (3 diffs)
-
scripts/support.js (deleted)
-
system/admin/admin.js (modified) (5 diffs)
-
system/admin/css/admin.css (modified) (5 diffs)
-
system/admin/dashboard.php (modified) (1 diff)
-
system/admin/groups.php (modified) (3 diffs)
-
system/admin/header.php (modified) (1 diff)
-
system/admin/images/bar-back-drop.png (modified) (previous)
-
system/admin/login.php (modified) (4 diffs)
-
system/admin/logs.php (modified) (1 diff)
-
system/admin/media.js (modified) (3 diffs)
-
system/admin/moderate.php (modified) (1 diff)
-
system/admin/plugins.php (modified) (4 diffs)
-
system/admin/publish.php (modified) (1 diff)
-
system/admin/publish_settings.php (modified) (2 diffs)
-
system/admin/themes.php (modified) (2 diffs)
-
system/admin/user.php (modified) (1 diff)
-
system/classes/acl.php (modified) (3 diffs)
-
system/classes/adminhandler.php (modified) (24 diffs)
-
system/classes/atomhandler.php (modified) (7 diffs)
-
system/classes/comments.php (modified) (22 diffs)
-
system/classes/controller.php (modified) (1 diff)
-
system/classes/cronjob.php (modified) (9 diffs)
-
system/classes/crontab.php (modified) (2 diffs)
-
system/classes/databaseconnection.php (modified) (4 diffs)
-
system/classes/db.php (modified) (24 diffs)
-
system/classes/error.php (modified) (13 diffs)
-
system/classes/eventlog.php (modified) (12 diffs)
-
system/classes/feedbackhandler.php (modified) (3 diffs)
-
system/classes/format.php (modified) (14 diffs)
-
system/classes/formui.php (modified) (9 diffs)
-
system/classes/installhandler.php (modified) (13 diffs)
-
system/classes/logentry.php (modified) (14 diffs)
-
system/classes/pluggable.php (modified) (2 diffs)
-
system/classes/plugin.php (modified) (2 diffs)
-
system/classes/plugins.php (modified) (3 diffs)
-
system/classes/post.php (modified) (38 diffs)
-
system/classes/posts.php (modified) (17 diffs)
-
system/classes/rewriterules.php (modified) (1 diff)
-
system/classes/session.php (modified) (4 diffs)
-
system/classes/site.php (modified) (4 diffs)
-
system/classes/stack.php (modified) (1 diff)
-
system/classes/tags.php (modified) (1 diff)
-
system/classes/theme.php (modified) (20 diffs)
-
system/classes/url.php (modified) (11 diffs)
-
system/classes/user.php (modified) (10 diffs)
-
system/classes/usergroup.php (modified) (1 diff)
-
system/classes/usergroups.php (copied) (copied from trunk/htdocs/system/classes/usergroups.php)
-
system/classes/userhandler.php (modified) (4 diffs)
-
system/classes/userthemehandler.php (modified) (3 diffs)
-
system/classes/utils.php (modified) (2 diffs)
-
system/classes/version.php (modified) (5 diffs, 1 prop)
-
system/classes/xmlrpcclient.php (modified) (1 diff)
-
system/installer/db_setup.php (modified) (13 diffs)
-
system/installer/requirements.php (modified) (4 diffs)
-
system/installer/script.js (modified) (5 diffs)
-
system/installer/style.css (modified) (7 diffs)
-
system/plugins/flickrsilo/flickrsilo.plugin.php (modified) (4 diffs)
-
system/plugins/pingback/pingback.plugin.php (modified) (13 diffs)
-
system/plugins/simplefilesilo/simplefilesilo.plugin.php (modified) (5 diffs)
-
system/plugins/themehelper/themehelper.plugin.php (modified) (6 diffs)
-
system/plugins/undelete/undelete.plugin.php (modified) (3 diffs)
-
system/plugins/viddlersilo/viddlersilo.plugin.php (modified) (4 diffs)
-
system/plugins/wpimport/wpimport.plugin.php (modified) (2 diffs)
-
system/schema/mysql/connection.php (modified) (4 diffs)
-
system/schema/mysql/schema.sql (modified) (1 diff)
-
system/schema/sqlite/connection.php (modified) (5 diffs)
-
system/schema/sqlite/schema.sql (modified) (1 diff)
-
system/themes/k2/entry.multiple.php (modified) (1 diff)
-
system/themes/k2/entry.single.php (modified) (1 diff)
-
system/themes/k2/footer.php (modified) (1 diff)
-
system/themes/k2/header.php (modified) (2 diffs)
-
system/themes/k2/home.php (modified) (1 diff)
-
system/themes/k2/login.php (modified) (1 diff)
-
system/themes/k2/page.single.php (modified) (1 diff)
-
system/themes/k2/search.php (modified) (1 diff)
-
system/themes/k2/style.css (modified) (1 diff)
-
system/themes/k2/tag.php (modified) (1 diff)
-
system/themes/k2/theme.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/111307-atom/doc/manual/index.html
r1291 r1440 734 734 { 735 735 if ( $plugin_id == $this->plugin_id() ) { 736 $actions[] = _ ('Configure');736 $actions[] = _t('Configure'); 737 737 } 738 738 return $actions; 739 739 }</pre> 740 The _() function translates the string into the language used by the site. For English-language blogs, the output would be "Configure", while for Spanish-language blogs, for example, the output might be "Configurar". 740 The _t() function translates the string into the language used by the site. For English-language blogs, the output would be "Configure", while for Spanish-language blogs, for example, the output might be "Configurar". 741 The _e() function echoes a translated string for display. 741 742 <pre>public function action_plugin_ui( $plugin_id, $action ) 742 743 { 743 744 if ( $plugin_id == $this->plugin_id() ) { 744 745 switch ( $action ) { 745 case _ ('Configure') :746 case _t('Configure') : 746 747 $ui = new FormUI( strtolower( get_class( $this ) ) ); 747 $customvalue= $ui->add( 'text', 'customvalue', _ ('Your custom value:') );748 $customvalue= $ui->add( 'text', 'customvalue', _t('Your custom value:') ); 748 749 $ui->on_success( array( $this, 'updated_config' ) ); 749 750 $ui->out(); -
branches/111307-atom/index.php
r1291 r1440 23 23 * The path to the root of this Habari installation. 24 24 */ 25 define( 'HABARI_PATH', dirname( __FILE__ ) ); 25 if( ! defined( 'HABARI_PATH' ) ) { 26 define( 'HABARI_PATH', dirname( __FILE__ ) ); 27 } 26 28 27 29 // We start up output buffering in order to take advantage of output compression, … … 153 155 } 154 156 157 // If we're doing unit testing, stop here 158 if( defined( 'UNIT_TEST' ) ) { 159 return; 160 } 161 155 162 // Send the Content-Type HTTP header. 156 163 // @todo Find a better place to put this. … … 188 195 // Flush (send) the output buffer. 189 196 ob_flush(); 197 190 198 ?> -
branches/111307-atom/system/admin/admin.js
r1291 r1440 3 3 $(this).hover( 4 4 function() { $(this).addClass(c); }, 5 function() { $(this).removeClass(c); }5 function() { $(this).removeClass(c); $('.menu-list').hide();} 6 6 ); 7 7 }); 8 8 }; 9 10 $.fn.resizeable = function(){ 11 12 this.each(function() { 13 var textarea = $(this); 14 var offset = null; 15 var grip = $('<div class="grip"></div>').mousedown(function(ev){ 16 offset = textarea.height() - (ev.clientY + document.documentElement.scrollTop) 17 $(document).mousemove(doDrag).mouseup(endDrag); 18 }).mouseup(endDrag); 19 var resizer = $('<div class="resizer"></div>').css('margin-bottom',$(this).css('margin-bottom')); 20 $(this).css('margin-bottom', '0px').wrap(resizer).parent().append(grip); 21 22 function doDrag(ev){ 23 textarea.height(Math.max(offset + ev.clientY + document.documentElement.scrollTop, 60) + 'px'); 24 return false; 25 } 26 27 function endDrag(ev){ 28 $(document).unbind('mousemove', doDrag).unbind('mouseup', endDrag); 29 textarea.css('opacity', 1.0); 30 } 31 32 }); 33 } 34 9 35 10 36 String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); } … … 19 45 }); 20 46 21 $("# menu .menu-item").hover(47 $("#oldmenu .menu-item").hover( 22 48 function(){ $("ul", this).fadeIn("fast"); }, 23 49 function() { } … … 25 51 26 52 if (document.all) { 27 $("# menu .menu-item").hoverClass("sfHover");53 $("#oldmenu .menu-item").hoverClass("iehover"); 28 54 } 29 55 … … 66 92 }); 67 93 68 /* Resizable Textareas */ 69 $('textarea.resizable').each(function() { 70 var textarea = $(this); 71 var offset = null; 72 var grip = $('<div class="grip"></div>').mousedown(function(ev){ 73 offset = textarea.height() - (ev.clientY + document.documentElement.scrollTop) 74 $(document).mousemove(doDrag).mouseup(endDrag); 75 }).mouseup(endDrag); 76 var resizer = $('<div class="resizer"></div>').css('margin-bottom',$(this).css('margin-bottom')); 77 $(this).css('margin-bottom', '0px').wrap(resizer).parent().append(grip); 78 79 function doDrag(ev){ 80 textarea.height(Math.max(offset + ev.clientY + document.documentElement.scrollTop, 60) + 'px'); 81 return false; 82 } 83 84 function endDrag(ev){ 85 $(document).unbind('mousemove', doDrag).unbind('mouseup', endDrag); 86 textarea.css('opacity', 1.0); 87 } 88 89 }); 94 /* Make Textareas Resizable */ 95 $('.resizable').resizeable(); 90 96 91 97 /* Tabs, using jQuery UI Tabs */ … … 164 170 habari.editor = { 165 171 insertSelection: function(value) { 172 if($('#content').filter('.islabeled').size() > 0) { 173 $('#content').filter('.islabeled') 174 .removeClass('islabeled') 175 .val(value); 176 } 177 else { 178 var contentel = $('#content')[0]; 179 if('selectionStart' in contentel) { 180 var content = $('#content').val(); 181 $('#content').val(content.substr(0, contentel.selectionStart) + value + contentel.value.substr(contentel.selectionEnd, content.length)); 182 } 183 else if(document.selection) { 184 contentel.focus(); 185 document.selection.createRange().text = value; 186 } 187 else { 188 $('#content').filter('.islabeled') 189 .removeClass('islabeled') 190 .val(value); 191 } 192 } 193 }, 194 getContents: function() { 195 return $('#content').val(); 196 }, 197 setContents: function(contents) { 166 198 $('#content').filter('.islabeled') 167 199 .val('') 168 200 .removeClass('islabeled'); 169 $("#content").val($("#content").val() + value); 201 $('#content').val(contents) 202 }, 203 getSelection: function(contents) { 204 if($('#content').filter('.islabeled').size() > 0) { 205 return ''; 206 } 207 else { 208 var contentel = $('#content')[0]; 209 if('selectionStart' in contentel) { 210 return $('#content').val().substr(contentel.selectionStart, contentel.selectionEnd - contentel.selectionStart); 211 } 212 else if(document.selection) { 213 contentel.focus(); 214 var range = document.selection.createRange(); 215 if (range == null) { 216 return ''; 217 } 218 return range.text; 219 } 220 else { 221 return $("#content").val(); 222 } 223 } 170 224 } 171 225 }; -
branches/111307-atom/system/admin/css/admin.css
r1291 r1440 96 96 width: 105px; 97 97 padding: 0 0 0 15px; 98 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGlJREFUeNpinD59+mcGBgYeBtzgCxOQ6GPAD/pgit7hUPAOpugjHtNA4h+ZoJyJQPwCTcELqDgDTNEXIO5AU9QBFYcrAoHpQPwUyn4K5TOgK/oFxE1A/AhK/4JJsKBZsQCqaB+yIECAAQB0mBnahYs+3AAAAABJRU5ErkJggg==) 100px center no-repeat; /* png is dropdown arrow */ 98 /* background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGlJREFUeNpinD59+mcGBgYeBtzgCxOQ6GPAD/pgit7hUPAOpugjHtNA4h+ZoJyJQPwCTcELqDgDTNEXIO5AU9QBFYcrAoHpQPwUyn4K5TOgK/oFxE1A/AhK/4JJsKBZsQCqaB+yIECAAQB0mBnahYs+3AAAAABJRU5ErkJggg==) 100px center no-repeat; /* png is dropdown arrow */ 99 background: url(../images/bar-back-drop.png) 100px center no-repeat; 99 100 } 100 101 … … 110 111 } 111 112 112 #oldmenu li.menu-item:hover ul {113 #oldmenu li.menu-item:hover ul, #oldmenu li.menu-item.iehover ul { 113 114 top: 22px; 114 115 } … … 123 124 } 124 125 125 #oldmenu li.menu-item:hover .menu-list a:hover {126 #oldmenu li.menu-item:hover .menu-list a:hover, #oldmenu li.menu-item.iehover .menu-list a:hover { 126 127 color: white; 127 128 background: #333; 128 129 } 129 130 131 132 /* The NEW HOTNESS Menu */133 134 #menu {135 position: fixed;136 top: 0;137 height: 32px;138 padding: 0 0px;139 width: 100%;140 font-size: 1.2em;141 background: #242424 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAICAIAAAC3eAIWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABhJREFUeNpikpOTY2JgYABjRkZGdAwQYAAMYgB6RRurTwAAAABJRU5ErkJggg==) repeat-x top; /* Top dropshadow */142 }143 144 #menu li {145 display: inline;146 }147 148 #menu li#site-name {149 float: right;150 margin-right: 10px;151 }152 153 #menu li#site-name a {154 padding: 0 20px 0 20px;155 border: none;156 }157 158 #menu > li > a {159 font-family: 'HelveticaNeue-Light', 'Helvetica Neue', Helvetica, Arial, Sans-Serif;160 }161 162 #menu li a {163 color: white;164 line-height: 32px;165 text-decoration:none;166 display: block;167 }168 169 #menu li.menu-item:hover a, #menu li#site-name a:hover {170 background-color: #424242;171 }172 173 #menu > .menu-item {174 float: left;175 }176 177 #menu #contentmenu {178 border-left: 1px solid #131313;179 margin-left: 10px;180 }181 182 #menu #adminmenu {183 border-left: 1px solid #131313;184 border-right: 1px solid #131313;185 }186 187 #menu > .menu-item > a {188 width: 105px;189 padding: 0 0 0 15px;190 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGlJREFUeNpinD59+mcGBgYeBtzgCxOQ6GPAD/pgit7hUPAOpugjHtNA4h+ZoJyJQPwCTcELqDgDTNEXIO5AU9QBFYcrAoHpQPwUyn4K5TOgK/oFxE1A/AhK/4JJsKBZsQCqaB+yIECAAQB0mBnahYs+3AAAAABJRU5ErkJggg==) 100px center no-repeat; /* png is dropdown arrow */191 }192 193 #menu li.menu-item > ul {194 position: absolute;195 top: -10000px;196 min-width: 120px;197 max-width: 250px;198 margin: 10px 0 0 -1px;199 }200 201 .menu-list {202 background: #e1e1e1;203 border: 1px solid #b0b0b0;204 border-top: none;205 padding: 5px 0;206 }207 208 #menu li.menu-item:hover ul {209 top: 22px;210 }211 212 #menu li.menu-item .menu-list a {213 width: auto;214 font-size: .8em;215 line-height: 1.6em;216 color: #333;217 padding: 3px 15px;218 background: none;219 }220 221 #menu .submenuitems {222 margin: 0;223 }224 225 #menu .submenuitems a {226 font-size: .75em !important;227 padding-left: 25px !important;228 color: #777 !important;229 }230 231 #menu .menu-list li {232 display: block;233 }234 235 #menu #createpagelink {236 padding-bottom: 5px;237 border-bottom: 1px solid #bbb;238 }239 240 #menu #managecontentlink {241 padding-top: 5px;242 }243 244 #menu li.menu-item:hover .menu-list a:hover {245 color: white !important;246 background: #333;247 }248 249 250 130 251 131 /* Page Splitter Tabs */ … … 464 344 /* BluePrint Overrides */ 465 345 466 #plugin_options {467 background: #3 A3A3A;346 #plugin_options, #theme_options { 347 background: #333333 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAVCAYAAACHUoQEAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEBJREFUeNpiYGBgSGICEowg4i+I+AMnfoGI33ACzP0FxAxmIMIARGiBCBUQIQciJEGECIjgAxFcIIINRDADBBgAlsIJb8O3yoQAAAAASUVORK5CYII=) top repeat-x; /* Drop shadow */ 468 348 border-top: 1px solid #C0C0C0; 469 349 border-bottom: 1px solid #C0C0C0; … … 473 353 } 474 354 475 #plugin_options h2 {355 #plugin_options h2, #theme_options h2 { 476 356 color: white; 477 357 } -
branches/111307-atom/system/admin/dashboard.php
r1291 r1440 207 207 </div> 208 208 <hr> 209 <div class="column prepend- 7 span-16first">209 <div class="column prepend-8 span-15 first"> 210 210 <h3>Drafts (<a href="<?php URL::out( 'admin', 'page=content' ); ?>#drafts" title="View Your Drafts">more</a> »)</h3> 211 211 <?php -
branches/111307-atom/system/admin/groups.php
r1291 r1440 15 15 <ul> 16 16 <?php 17 foreach ( $groups as $id => $name ) 18 { 19 echo '<li>'; 20 echo '<form method="post" action=""><input type="hidden" name="group" value="' . $id . '"><input type="submit" name="delete_group" value="Delete"> '; 17 foreach ( $groups as $group ) { 18 echo '<li>'; 19 echo '<form method="post" action=""><input type="hidden" name="group" value="' . $group->name . '"><input type="submit" name="delete_group" value="Delete"> '; 21 20 echo '<input type="submit" name="edit_group" value="Edit"> '; 22 echo $ name . '</form>';23 echo '</li>';21 echo $group->name . '</form>'; 22 echo '</li>'; 24 23 } 25 24 ?> … … 29 28 <p>Members</p> 30 29 <?php 31 if ( isset( $group ) ) {30 if ( isset( $group_edit ) ) { 32 31 if ( isset( $users) && ( ! empty( $users ) ) ) { 32 echo '<p>Editing members of ' . $group_edit->name . '</p>'; 33 33 echo '<form method="post" action="">'; 34 echo '<input type="hidden" name="group" value="' . $group . '">'; 35 echo Utils::html_select( 'add_user', $users ); 36 echo ' <input type="submit" value="Add"></form>'; 37 } 38 if ( ! empty($group_members) ) { 39 echo '<ul>'; 40 foreach ( $group_members as $member ) { 41 $user= User::get_by_id($member); 42 echo '<li><form method="post" action=""><input type="hidden" name="remove_user" value="' . $user->id . '">'; 43 echo '<input type="hidden" name="user_group" value="' . $group . '"><input type="submit" value="Remove"></form> ' . $user->username . '</li>'; 44 } 45 echo '</ul>'; 34 echo '<input type="hidden" name="group" value="' . $group_edit->name . '">'; 35 foreach ( $users as $user ) { 36 echo '<input type="checkbox" name="user_id[]" value="' . $user->id . '"'; 37 if ( in_array( $user->id, $group_edit->members ) ) { 38 echo ' checked'; 39 } 40 echo '"> ' . $user->username . '<br>'; 41 } 42 echo '<input type="submit" name="users" value="Submit"></form>'; 46 43 } else { 47 44 echo '<p>No members.</p>'; … … 52 49 <div class="column span-8 last"> 53 50 <p>Permissions</p> 51 <?php 52 if ( isset( $group_edit ) ) { 53 if ( isset( $permissions) && ( ! empty( $permissions ) ) ) { 54 echo '<p>Editing Permissions of ' . $group_edit->name . '</p>'; 55 echo '<form method="post" action="">'; 56 echo '<input type="hidden" name="group" value="' . $group_edit->name . '">'; 57 echo '<table><tr><th>Granted</th><th>Permission</th><th>Denied</th></tr>'; 58 foreach( $permissions as $perm ) { 59 echo '<tr>'; 60 if( isset( $permissions_granted[ $perm->id ] ) ) { 61 // indicate that this permission is granted 62 } elseif ( isset( $permissions_denied[ $perm->id ] ) ) { 63 // indicate that this permission is denied 64 } 65 echo "<td><input type='checkbox' name='grant[]' value='{$perm->id}'"; 66 if ( in_array( $perm->id, $permissions_granted ) ) { 67 echo ' checked'; 68 } 69 echo "></td><td> {$perm->description} </td><td>"; 70 echo "<input type='checkbox' name='deny[]' value='{$perm->id}'"; 71 if ( in_array( $perm->id, $permissions_denied ) ) { 72 echo ' checked'; 73 } 74 echo '></td></tr>'; 75 } 76 echo '<tr><td colspan="3"><input type="submit" name="permissions" value="' . _t('Submit') . '"></td>'; 77 echo '</table></form>'; 78 } else { 79 echo '<p>No permissions.</p>'; 80 } 81 } 82 ?> 54 83 </div> 55 84 </div> -
branches/111307-atom/system/admin/header.php
r1291 r1440 3 3 <head> 4 4 <title>Habari Administration</title> 5 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6 6 <link rel="stylesheet" href="<?php Site::out_url('habari'); ?>/3rdparty/blueprint/screen.css" type="text/css" media="screen, projection"> 7 7 <link rel="stylesheet" href="<?php Site::out_url('habari'); ?>/3rdparty/blueprint/print.css" type="text/css" media="print"> -
branches/111307-atom/system/admin/login.php
r1291 r1440 25 25 } 26 26 27 # databasesetup{27 #loginform { 28 28 margin:0 auto; 29 29 } … … 37 37 margin-bottom: 50px; 38 38 } 39 .notice, .error { 40 margin-left:auto; 41 margin-right:auto; 42 width:552px; 43 } 39 44 40 45 </style> 41 46 </head> 42 47 <body> 43 <ul id=" menu">48 <ul id="oldmenu"> 44 49 <li id="site-name"> 45 50 <a href="<?php Site::out_url('habari'); ?>" title="<?php Options::out('title'); ?>"><?php Options::out('title'); ?></a> 46 51 </li> 47 48 52 </ul> 49 53 54 <div style="min-height:45px;"> 55 <?php 56 <
