ryan Posted September 18, 2011 Posted September 18, 2011 Thanks for these updates. We'd talked about getting AdminBar bundled into the core distribution and I still want to do that. If you still want to lets try and get it in before 2.2. I just need to update the Modules system to deal with duplicates in case someone upgrades a system that already has /site/modules/AdminBar/ installed.
apeisa Posted September 18, 2011 Author Posted September 18, 2011 No worries about that Ryan. I think it might be good idea to wait a little before trying to put this into core distribution. I want to make this easily extendable so that other developers can add their own "bells and whistles" into Adminbar or maybe even release modules that support / use AdminBar. It is pretty easy already, but will test this more and with good time. Also committed few updates: Possibility to customize look and feel (=css) by adding AdminBarCustom.css to module folder. added logout link and removed gear icon from admin button If you delete page, it redirects to the parent page of removed page and shows better notification "My Poor Page moved to the trash" Instead of always showing "Add page" it shows "New press-release" if press-release is only allowed child template. (changed "add" to "new" because pagelist uses that term. So it is "New page" or "New templatename"
Soma Posted September 18, 2011 Posted September 18, 2011 Sounds great apeisa, will just go and test new version! 8)
Soma Posted September 20, 2011 Posted September 20, 2011 I tested this, and looks good. BUT I can't see the bar when I log in as a custom user, although I see the edit button I can't see the admin bar. Not guud ;D
apeisa Posted September 20, 2011 Author Posted September 20, 2011 You see the edit button? Custom edit button from your template or adminbar edit button? Custom user roles do need AdminBar permission to see and use adminbar. If you don't see that permission, please unistall & install adminbar.
Soma Posted September 20, 2011 Posted September 20, 2011 I only see edit link from template... Ah I see. But I can't uninstall admin bar: Unable to delete pages of type '' !
Soma Posted September 20, 2011 Posted September 20, 2011 I can't deinstall the module, how can I fix that? Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/PagesType.php on line 71 Notice: Trying to get property of non-object in /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/PagesType.php on line 146 TemplateFile: Unable to delete pages of type '' #0 [internal function]: PagesType->___delete(Object(NullPage)) #1 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(267): call_user_func_array(Array, Array) #2 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(229): Wire->runHooks('delete', Array) #3 [internal function]: Wire->__call('delete', Array) #4 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/site/modules/AdminBar/AdminBar.module(318): Permissions->delete(Object(NullPage)) #5 [internal function]: AdminBar->___uninstall() #6 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(267): call_user_func_array(Array, Array) #7 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(229): Wire->runHooks('uninstall', Array) #8 [internal function]: Wire->__call('uninstall', Array) #9 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Modules.php(455): AdminBar->uninstall() #10 [internal function]: Modules->___uninstall('AdminBar') #11 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(267): call_user_func_array(Array, Array) #12 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(229): Wire->runHooks('uninstall', Array) #13 [internal function]: Wire->__call('uninstall', Array) #14 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/modules/Process/ProcessModule/ProcessModule.module(241): Modules->uninstall('AdminBar') #15 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/modules/Process/ProcessModule/ProcessModule.module(184): ProcessModule->renderEdit('AdminBar', Array) #16 [internal function]: ProcessModule->___executeEdit() #17 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(267): call_user_func_array(Array, Array) #18 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(229): Wire->runHooks('executeEdit', Array) #19 [internal function]: Wire->__call('executeEdit', Array) #20 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/ProcessController.php(194): ProcessModule->executeEdit() #21 [internal function]: ProcessController->___execute() #22 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(267): call_user_func_array(Array, Array) #23 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(229): Wire->runHooks('execute', Array) #24 [internal function]: Wire->__call('execute', Array) #25 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/admin.php(45): ProcessController->execute() #26 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/site/templates-admin/controller.php(13): require('/Applications/X...') #27 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/site/templates/admin.php(13): require('/Applications/X...') #28 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/TemplateFile.php(88): require('/Applications/X...') #29 [internal function]: TemplateFile->___render() #30 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(267): call_user_func_array(Array, Array) #31 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(229): Wire->runHooks('render', Array) #32 [internal function]: Wire->__call('render', Array) #33 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/modules/PageRender.module(194): TemplateFile->render() #34 [internal function]: PageRender->___renderPage(Object(HookEvent)) #35 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(267): call_user_func_array(Array, Array) #36 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(229): Wire->runHooks('renderPage', Array) #37 [internal function]: Wire->__call('renderPage', Array) #38 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(289): PageRender->renderPage(Object(HookEvent)) #39 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(229): Wire->runHooks('render', Array) #40 [internal function]: Wire->__call('render', Array) #41 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/modules/Process/ProcessPageView.module(73): Page->render() #42 [internal function]: ProcessPageView->___execute() #43 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(267): call_user_func_array(Array, Array) #44 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/wire/core/Wire.php(229): Wire->runHooks('execute', Array) #45 [internal function]: Wire->__call('execute', Array) #46 /Applications/XAMPP/xamppfiles/htdocs/pw2.ch/index.php(181): ProcessPageView->execute() #47 {main}
apeisa Posted September 20, 2011 Author Posted September 20, 2011 Ah, it seems that my uninstall function is not backwards compatible Just a moment.
apeisa Posted September 20, 2011 Author Posted September 20, 2011 Good to know, thanks Soma. For everyone else who might download the AdminBarNew: if you want others than superuser to see AdminBar, then you need to a) uninstall + install Adminbar or b) add new permission "adminbar" and give it those roles that you want to see adminbar. Installing adminbar does add that role automatically for you. There is one annoying issue left in IE: it throws "Load jQuery first" alert when you have tinyMCE fields in your template and you close the edit view (using slide/modal). Working on this...
apeisa Posted September 22, 2011 Author Posted September 22, 2011 Just updated branches that master is now for 2.1 and AB20 is for 2.0. AdminBarNew is no longer. So if you cloned this from github, you probably want to do something like this: git checkout master git pull origin master (or just remove whole folder and clone it again) If you have downloaded and unzipped, then just download again, but now from master branch.
ryan Posted September 23, 2011 Posted September 23, 2011 AdminBar is great! But you already knew that. Thanks for the update.
apeisa Posted March 4, 2012 Author Posted March 4, 2012 Added multilang support for AdminBar. Also uses template labels if available "New Blog post" instead of just "New" or old db-style "New blog-post". 1
AnotherAndrew Posted May 22, 2012 Posted May 22, 2012 Apesia, I remember there being a discussion about using a different editor awhile back. Tinymce, aloha, etc. I just came across this html5 editor that claims to be lighter than both tinymce and aloha. It looks pretty sweet and you might want to consider it for adminbar. BTW, thanks for the work you have done! http://xing.github.com/wysihtml5/
apeisa Posted May 22, 2012 Author Posted May 22, 2012 Thanks Andrew - definitely looks neat. Although not sure how good fit that is for "inline editor", since that requires textareas - where Mercury and Aloha do work with any element. Not sure when and what I will develop for Adminbar next. So far it has served our client needs pretty well.
seddass Posted July 19, 2012 Posted July 19, 2012 Does AdminBar support editing of pages different than currently visible in the browser? In other words.. If the visible page exist elsewhere in the PW but it is included and rendered based on a one or more segments.. is it possible to pass the real page->id to the AdminBar for editing instead of the page->id of the page with segments? Of course.. it will be great if after Save it returns to the initially displayed page with segments. Is it possible and/or easy to implement? Thanks!
apeisa Posted July 19, 2012 Author Posted July 19, 2012 I think that could be a good addition. There need's to be someway to tell AdminBar, that "editablePage" is different from "currentPage". Can you tell me more about the context you have this request? Using urlSegments probably?
seddass Posted July 19, 2012 Posted July 19, 2012 I mean urlSegments, sorry. You understood me correctly. I was thinking if we could use a two session variables like "editablePage" and "redirectAfterSave" and to check if they exists before opening the AdminBar and after page save. I am not sure about any other way except session variables, probably you will have a better idea? About the example context.... Lets assume we are storing our products pages in Home >> Products as children. Also... we have categories stored in Home >> Categories and each Product page has a few Categories attached. If we are browsing the www.example.com/categories/category_name/product_name/ we will see the product details page but actually if we open AdminBar we will edit www.example.com/categories/category_name/ if "/product_name/" is urlSegment1. I am not sure if it is the best example, it is not the real one, but I am sure you understood me correctly. What do you think? Should we use session variables or there is another way to pass php variables internally?
apeisa Posted July 19, 2012 Author Posted July 19, 2012 I got it. Probably we can just add them as values for $page object, like this: $page->abEditablePage = $pages->get($product_id); $page->abRedirectPage = $page; // Not sure if this is ever required, we want always return to same url we were before editin?g I'll hope to take a look with this sooner or later. Of course if you (or anyone else) likes to try hacking this you are more than welcome!
apeisa Posted November 3, 2012 Author Posted November 3, 2012 Jeff posted an issue on github: https://github.com/apeisa/AdminBar/issues/7 I can't reproduce it on Win7/Chrome, so can others confirm the issue with Mac?
Soma Posted November 4, 2012 Posted November 4, 2012 Can't reproduce, works fine here in Chrome and Safari.
arjen Posted November 4, 2012 Posted November 4, 2012 Me neither. Tested on Safari, Firefox and Chrome on Mac.
thetuningspoon Posted October 11, 2013 Posted October 11, 2013 No problem here with the scrolling on Mac with Chrome. I recently discovered a different issue, however. On a couple of my sites I am using SSL (https) for some pages, or for all of the admin pages. I find that if there is a mismatch where the live page is regular http and the admin page is https (or the reverse of this also, I think), then clicking "edit" on the adminbar will result in an "Unknown Page" error. It was just recently that I was able to narrow this issue down to only sites that use SSL. Hopefully this can be fixed!
apeisa Posted October 11, 2013 Author Posted October 11, 2013 Hmm... not sure how to fix that. How have you setup your ssl? Or I mean where you define that admin is always SSL and public is not? We have always setup so that logged in users are https, so it will load just fine.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now