Jump to content

Pete

Administrators
  • Posts

    4,046
  • Joined

  • Last visited

  • Days Won

    67

Everything posted by Pete

  1. Cool stuff - I like the PW and PHP version requirements. Since we have a way to automatically install modules, can we have "installs" go and try to fetch the module from the modules directory? It would be really neat if it did that as long as people don't abuse it.
  2. This module creates a blank dashboard page in your site admin and sets it as default when you login instead of the page list. It came from a need in a few projects where I was creating modules for various user roles to use and I didn't want them to see the page list at all, but needed to display various stats and quick access buttons. For example, if you have a person who is creating invoices or doing other back-office stuff in various other Process modules then as an admin you wouldn't want them to access the page tree anyway, and there are other scenarios where you might want to have a dashboard instead of launching straight into the page list. It also requires (and adds) a permission - "dashboard" - so you can create new roles and assign the dashboard permission to those roles - something you might want to do fairly commonly if you have a lot of admin modules that you want to restrict access to. Editing the template is simple - there is a dashboard.php template file in the /site/modules/ProcessDashboard/ folder (decided to leave it in there to keep it safe, but I might be tempted to move it into /site/templates/ ) as well as .js and .css files ready to add your code to. You can use the API as you usually would to create your dashboard experience. For example, display data based on user roles or even specific users using code like this: if ($user->hasRole('invoices') { echo "Hi staff member $user->name. View invoices to be processed below: ... ..."; } if ($user->name == 'pete') { // Show some super-awesome stuff here } You can also do away with the dashboard.php template file and edit the module directly, putting your code and output in the execute() function (the way most Process modules are written) but I decided to include the separate template file to make it easier for more people to use. This does touch on areas a few other modules have addressed to some degree (like diogo's Custom Admin Pages) but this is designed for one purpose - instant dashboard creation. You can download the module here: http://modules.processwire.com/modules/process-dashboard/ This module also uses code from diogo's ProcessHomeAdmin module so that the default admin page can be overridden.
  3. It did indeed resolve my problem - thanks again to a 2 year old solution from Soma
  4. This may have my answer as long as admin roles aren't required to see Pages list to log into the admin: http://processwire.com/talk/topic/916-admin-page-permissions/ Will try it when I'm home and report back.
  5. Hi chaps I've created a custom admin page to act as a dashboard and used one of diogo's modules to set it as default. What I'm struggling with is creating a role that can see the dashboard but not the Pages tab for staff that I don't want to be able to edit or see the page tree. If I give my dashboard page a new template then I can assign that role, but if I take away the page edit permission from that role then they can't see the admin. If I give them the page edit permission then they can see the Pages tab but they can't see the admin page in the page tree so they also can't see my dashboard. Is there a way around this? Seems like something that would really restrict being able to create custom admin pages with associated permissions.
  6. @Diogo - with this module in PW 2.4, it loads the theme from /wire/templates-admin/ instead of the new admin theme. Not sure why there is still an admin theme in /wire/templates-admin/ in the latest download I have no idea why it's not defaulting to the new theme as every other admin page does
  7. Sorry diogo - bit of a late reply It does work if you actually follow the instructions and change the default admin page to use the Process (I was being an idiot and changing my new admin page to use the process).
  8. Pete

    New Logo

    I added that to the layout.css file to fix the issue - thanks. I also set the top buttons back to display: none in global.css as ryan mentioned they should be hidden on mobile.
  9. Fixed that - thanks for the code
  10. I don't think there's any need in changing the homepage to "core" and putting a "home" page underneath it. The way it's setup by default is that all content is a child of the homepage - the homepage being the start of the website. Why not simply create a "Profile" page under home and put these pages under the Profile page: Calendar | Messages | Projects | etc ? If the user is logged in you then show the Profile page else show a Login page. Or are you trying to have customised home pages for each user?
  11. I've changed the PHP version on that page, but I feel it should also mention PDO and maybe some other things - I'll PM ryan in a bit to make sure he sees this. If all else fails though, the installer tells you which PHP version you need - hence the message. Granted the website should be kept up to date, but if the installer requests something then that's the required version. Squeeze seems to be something to do with Debian perhaps: https://packages.debian.org/squeeze/ ? Not sure what it is and never seen it before to be honest.
  12. Hehe, it's a case of no jobs coming along for a while and then three coming along at once. Not that I'm complaining!
  13. Yeah, in my version you don't need it to be in a function unless you are using this code on many different templates? If it's just in one template then the function isn't needed.
  14. It doesn't particularly need to be in a function, also I'm not sure why you're using wire() since in a template you can just use $page directly - anyway, you can get rid of the } else { if you start it a bit like this instead: $out = ''; // Starting with this means you don't need } else { as it's defined and empty to begin with if ($page->slider->count() > 0) { // There's no overhead in just doing this count directly instead of assigning it to another variable // ... more of your code here foreach ($page->slider as $albumimage) { // Again, you can just user $page->slider directly here // ... the rest of your code here
  15. If I had any spare capacity I'd be interested in working with you further Nik, however I'm booked solid for several months at least.
  16. But he needs to find the page with that JSON string I think, which is much more difficult given single and double quotes. The only way I can think of to do this is have another JSON field called something like "sanitizedmyjson" and on page save, strip out all quotes and store that copy in that field, then do the sanitized selector based on that field. Sanitizer probably strips out other stuff too, but you get the idea.
  17. GoCardless is for Direct Debits, and you don't get the money as quick as other solutions (minimum 7 days I think for the first payment whilst the DD is being set up) but it is good for certain things, especially as credit/debit cards expire but DD's are based on your bank account details - and how often do people change bank? Less often than their cards expire Stripe is really good - better fees than PayPal and better interface. You can pretty much implement their Checkout example and you're up and running in no time (relatively speaking): https://stripe.com/docs/checkout
  18. Pete

    New Logo

    Oops, at the same time I've been changing display: none to display: block in global.css Is this going to cause an issue ryan? I'll leave it to you since two people editing CSS at the same time usually ends in disaster and overwritten styles!
  19. Pete

    New Logo

    I spotted the buttons were missing and assumed ryan removed them for some reason. @kngondo and houseofdeadleg - this appears to happen in Chrome and not FF. Weird. I assume it's been doing it all the time.
  20. In fact, here are a few posts on large-scale websites: http://processwire.com/talk/topic/4349-thousands-of-pages-one-site-with-multiple-pages-or-one-install-with-multiple-sites/?p=42909 http://processwire.com/talk/topic/1527-largest-project-performance-multi-server/
  21. If you look at the database you'll see that each field is it's own database table. This is usually the first thing to freak some people out a bit when using ProcessWire (I was confused when I started!), but when you understand the power of pages (and that a couple of joins behind the scenes can often be more efficient than pulling in a massive table whether you wanted the data from every field or not) it will start to make sense. ProcessWire has been tested with at least tens of thousands of pages (and I think well over 100,000 as well) and performance doesn't seem to be a huge issue. As with any programming, as long as your selectors (PW's version of DB queries) are sensible then you should be fine. There are also a number of caching options such as MarkupCache, template caching and the ProCache module that can drastically speed up your site in a variety of ways - where appropriate. The beauty of pages is that fields can be re-used. The Body field can apply to many templates, but it's still just one table in the database. Same with any other field. You also get the ability to use Page fieldtype which let you reference other pages cleverly and which you wouldn't easily be able to do otherwise. The bottom line I guess is, there wouldn't be this number of people active in the community if it didn't work well. If it didn't work for the range of sites we've built with it, we wouldn't be using it. Yes, there is a lot to get your head around, and I found that there was a lot of baggage I'd brought from other CMS's that I had to un-learn, but once it all clicked I never looked back. Building a website in a fraction of the time I used to be able to? Yes please!
  22. Hi there This may be what you are after: http://modules.processwire.com/modules/service-pages/
  23. I'm pretty sure that wouldn't be an issue - that's why it's configurable EDIT: Other than probably having to log back into the admin after you change it.
  24. I'm not entirely sure what you are trying to achieve with this? If you can explain what it is you want it to do more clearly that would help us to help you more. If you just require multi-language support though, have you seen this page: http://processwire.com/api/multi-language-support/ ? That can be used to translate any text field.
  25. If you managed to solve it, could you perhaps post your solution to be marked as the answer?
×
×
  • Create New...