Jump to content

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites

Sounds great apeisa, will just go and test new version!  8)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I only see edit link from template... Ah I see.

But I can't uninstall admin bar: Unable to delete pages of type '' !

Share this post


Link to post
Share on other sites

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}

Share this post


Link to post
Share on other sites

Ah, it seems that my uninstall function is not backwards compatible :) Just a moment.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

AdminBar is great! But you already knew that. :) Thanks for the update.

Share this post


Link to post
Share on other sites

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".

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

Can't reproduce, works fine here in Chrome and Safari.

Share this post


Link to post
Share on other sites

Me neither. Tested on Safari, Firefox and Chrome on Mac.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gebeer
      I am happy to present my new fieldtype FieldtypeImageFromPage. It is made up of 2 modules:
      Fieldtype Image Reference From Another Page is a Fieldtype that stores a reference to a single image from another page. The image can be selected with the associated Inputfield.
      Inputfield Select Image From Page is an Inputfield to select a single image from images on a predefined page and it's children.
      And there also is a helper module that takes care of cleanup tasks.
      This module evolved out of a discussion about my other Module FieldtypeImagePicker.  It caters for use cases where a set of images is being reused multiple times across a site. With this fieldtype these images can be administered through a chosen page. All images uploaded to that page will be available in the inputfield.
      When to use ?
      Let editors choose an image from a set of images that is being used site-wide. Ideal for images that are being re-used across the site.
      Suited for images that are used on multiple pages throughout the site (e.g. icons).
      Other than the native ProcessWire images field, the images here are not stored per page. Only references to images on another page are stored. This has several advantages:
      one central place to organize images when images change, you only have to update them in one place. All references will be updated, too. (Provided the name of the image that has changed stays the same) Features
      Images can be manipulated like native ProcessWire images (resizing, cropping etc.) Image names are fully searchable through the API Accidental image deletion is prevented. When you want to delete an image from one of the pages that hold your site-wide images, the module searches all pages that use that image. If any page contains a reference to the image you are trying to delete, deletion will be prevented. You will get an error message to help you edit those pages and remove references there before you can finally delete the image. How to install and setup
      Download and install this module like any other modules in ProcessWire Create a page in the page tree that will hold your images. This page's template must have an images field Upload some images to the page you created in step 2 Create a new field. As type choose 'Image Reference From Another Page'. Save the field. In 'Details' Tab of the field choose the page you created in step 2 Click Save button Choose the images field name for the field that holds your images (on page template from step 2) Click Save button again Choose whether you want to include child pages of page from step 2 to supply images Add the field to any template You are now ready to use the field View of the inputfield on the page edit screen:

      View of the field settings

      The module can be installed from this github repo. Some more info in the README there, too.
      In my tests it was fairly stable. After receiving your valued feedback, I will eventually add it to the modules directory.
      My ideas for further improvement:
      - add ajax loading of thumbnails
      Happy to hear your feedback!
       
    • By gebeer
      Although the PW backend is really intuitive, ever so often my clients need some assistance. Be it they are not so tech savvy or they are not working in the backend often.
      For those cases it is nice to make some help videos available to editors. This is what this module does.
      ProcessHelpVideos Module
      A Process module to display help videos for the ProcessWire CMS. It can be used to make help videos (screencasts) available to content editors.
      This module adds a 'Help Videos" section to the ProcessWire backend. The help videos are accessible through an automatically created page in the Admin page tree. You can add your help videos as pages in the page tree. The module adds a hidden page to the page tree that acts as parent page for the help video pages. All necessary fields and templates will be installed automatically. If there are already a CKEditor field and/or a file field for mp4 files installed in the system, the module will use those. Otherwise it will create the necessary fields. Also the necessary templates for the parent help videos page and it's children are created on module install. The module installs a permission process-helpvideos. Every user role that should have access to the help video section, needs this permission. I use the help video approach on quite a few production sites. It is stable so far and well received by site owners/editors. Up until now I installed required fields, templates and pages manually and then added the module. Now I added all this logic to the install method of the module and it should be ready to share.
      The module and further description on how to use it is available on github: https://github.com/gebeer/ProcessHelpVideos
      If you like to give it a try, I am happy to receive your comments/suggestions here.
    • By Robin S
      A module created in response to the topic here:
      Page List Select Multiple Quickly
      Modifies PageListSelectMultiple to allow you to select multiple pages without the tree closing every time you select a page.
      The screencast says it all:

       
      https://github.com/Toutouwai/PageListSelectMultipleQuickly
      https://modules.processwire.com/modules/page-list-select-multiple-quickly/
    • By gebeer
      Hello all,
      sharing my new module FieldtypeImagePicker. It provides a configurable input field for choosing any type of image from a predefined folder.
      The need for it came up because a client had a custom SVG icon set and I wanted the editors to be able to choose an icon in the page editor.
      It can also be used to offer a choice of images that are used site-wide without having to upload them to individual pages.
      There are no image manipulation methods like with the native PW image field.
      Module and full description can be found on github https://github.com/gebeer/FieldtypeImagePicker
      Kudos to @Martijn Geerts. I used his module FieldTypeSelectFile as a base to build upon.
      Here's how the input field looks like in the page editor:

      Hope it can be of use to someone.
      If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Eventually this will go in the module directory soon, too.
    • By bernhard
      @Sergio asked about the pdf creation process in the showcase thread about my 360° feedback/survey tool and so I went ahead and set my little pdf helper module to public.
      Description from PW Weekly:
       
      Modules Directory: https://modules.processwire.com/modules/rock-pdf/
      Download & Docs: https://github.com/BernhardBaumrock/RockPDF
       
      You can combine it easily with RockReplacer: 
      See also a little showcase of the RockPdf module in this thread:
       
×
×
  • Create New...