Jump to content

Noel Boss

Members
  • Content Count

    148
  • Joined

  • Last visited

  • Days Won

    6

Noel Boss last won the day on December 2 2018

Noel Boss had the most liked content!

Community Reputation

246 Excellent

1 Follower

About Noel Boss

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    Zurich
  • Interests
    I have a passion for Jesus and the Church and love great development tools – first of all Processwire.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I think, you might replace the entire hook then; https://processwire.com/docs/modules/hooks/#how-can-my-hook-replace-another-method-entirely
  2. Thanks @Zeka, I know the priority thing, but in case of init and ready, this is not of much use…
  3. Hi, anyone knows why this does not work? $pages->find('parent|id='.$page); Unless I miss something, this should find all children plus the current page, but it only finds children. I would like to use it as $expires for cacheing stuff. How do you expire chaches of the current page and all children?
  4. Hi Folks I want to access $user->language inside the init hook because I want to make some access checks; $this->wire()->addHookAfter('Page::viewable', $this, 'checkAccessHook'); – but I get only the default language: $user->language->name > default However, I do have the correct user ID and I would have expected that at least using pages->get I can fetch the correct language via a custom lookup?! $pages->get('id=$user->id, include=all')->language; But nope... still just default. Any ideas? ––– Alternatively, @ryan if you are listening – I think there is a hook missing to inject access restrictions etc. – somewhere deep down (and early) in the system – that also works for find() operations etc. Most everything is there with PW but this has been a major pain-point for our current project with complicated user access restrictions and configurations. If we could hook into somewhere, that would be amazing. Currently it's really tricky and quickly gets messy when we have user dependecies and with the order if init() and ready() and page::viewable()
  5. Hi @Lance O., yes. This is how I did it; I used the LoginRegister module of Ryan on a Page with a "PageUserProfile" template: // Code on the template PageUserProfile $input->get->profile = 1; $loginRegister = $modules->get('LoginRegister'); $user->of(false); echo $loginRegister->execute(); Then I use my own module and inside the init() function, I add two hooks: <?php /** * © ICF Church – <web@icf.ch> */ namespace ProcessWire; class TemplateUser extends WireData implements Module { protected $template = 'user'; public function init() { // handle profile images $this->addHookBefore('Page(template=PageUserProfile)::render', $this, 'profileImageUpload', ['priority' => 6]); $this->addHookAfter('Page(template=PageUserProfile)::render', $this, 'profileImageRemove', ['priority' => 99]); } /** * getModuleInfo is a module required by all modules to tell ProcessWire about them. * * @return array */ public static function getModuleInfo() { return [ 'title' => 'Template User Controller', 'version' => '0.0.1', 'summary' => 'Helps with profile image', 'href' => '', 'singular' => true, 'autoload' => true, 'author' => 'Noël Bossart', 'icon' => 'unlock', ]; } /** * Hock to add profile image to user object. * * @param HookEvent $event */ public function profileImageUpload(HookEvent $event) { $user = wire('user'); $input = wire('input'); if ($input->post->profile_submit) { $upload_path = $user->filesManager->getTempPath(); // name of the inputfield from the LoginRegister Module: $f = new WireUpload('profile_image'); $f->setMaxFiles(1); //$f->setMaxFileSize(1 * 1024 * 1024); $f->setOverwrite(true); $f->setOverwriteFilename('userimage'); $f->setDestinationPath($upload_path); $f->setValidExtensions(['jpg', 'jpeg', 'png', 'gif']); // remove image… if (strpos(implode(array_keys($_POST)), 'delete_profile_image_') !== false) { $user->of(false); $user->image->removeAll(); $user->save(); } $files = $f->execute(); if ($f->getErrors()) { foreach ($files as $filename) { @unlink($upload_path.$filename); } foreach ($f->getErrors() as $e) { echo $e; } } elseif (is_array($files) && count($files)) { $user->of(false); $user->image->removeAll(); // wirearray (line added by @horst: explanation is three posts beneath) foreach ($files as $file) { $user->image->add($upload_path.$file); } $user->save(); foreach ($files as $file) { @unlink($upload_path.$file); } } } } /** * Hock to remove profile image from user * * @param HookEvent $event */ public function profileImageRemove(HookEvent $event) { // remove image… if (strpos(implode(array_keys($_POST)), 'delete_profile_image_') !== false) { $this->user->of(false); $this->user->image->removeAll(); } } }
  6. @flydev I did not use the code as is but changed and extended some of it.
  7. Did you miss the readme or did I mess up and should make anything more clear there? https://github.com/noelboss/AdminThemeBoss/blob/master/README.md#modify-yourself
  8. @maxf5 - fixing it – is an issue with AOS, release 0.5.3 does fix it. And I've also further refined the login screens: Well, I had designed colourful login screens, but did not really like them. If you still want to look at these and maybe give some feedback, you are welcome:
  9. I’ve updated the version number. There is now a shiny new release page where you can subscribe to updates for new releases of AdminThemeBoss!
  10. One could use a c9.io instance... or docker.
  11. Hello everybody, I‘ve just released version 0.5.1 with @Chris Bennett‘s toggle checkboxes. a redesigned login screen and many small imrovements and fixes! Check out more screenshots at github. I hope you like the changes...
  12. Thanks @Chris Bennett ! Just integrated it in my latest release: Looks nice!
  13. Thats one aspect I love about how you handle PW and the community! The feeling of beeing left in the dark about the future is common for other nice projects and fules uncertainty about it. The constant high quality updates an Blogposts makes me very comfortable and trustfully in PW! Thanks so much @ryan!!! I totally agree and 100% understand all your explanations above. My hope is that some talented designers and PW enthusiasts can support you on the design an UX side of things like @teppo constantly supports PW with very high quality content trough weekly.pw I myself are not a designer but would love to help in implementing some of the designs and ideas on the frontend side...
  14. Great work @ryan! Especially love the new search!!! I also like the results view of the search alot, clean and with the smart ability to filter by kind. Thanks for listening to our feedback about the skyscraper ornaments. Also, love the API search! What stands out to me is that the screenshots all together (with the exemption of the sites pages) look very uniform – mostly text, headings, lists. Very clean and organised, I like that, but visually there is not much to distinguish. Now I get that you are focusing on the content and structure of the site - so it might just be to early for feedback on this topic: I think that especially on the marketing focused pages, focusing on presenting ProcessWire for new users, stakeholders and designers & marketing departments, more images and specially crafted pages would make sense. But I would even argue that for more developer oriented pages, some images would be helpful. I'm a visual person and nice images for blogs, even modules would go a long way in making the experience on processwire.com a pleasing and joyful experience. Now I totally understand that you probably need support from a few UX and UI gurus but I guess, there are a lot of us from the community who would be more than happy to stepp in and offer support. A few examples from pages I stumbled across the last couple of days: Well crafted homepage with gimmicks (feature-slider): https://ora.pm/home or https://craftcms.com Nice visual blog posts: https://ora.pm/blog Visually appealing modules directory (with a nice touch for developers, the ability to sell your own modules): https://statamic.com/marketplace/addons Presenting many features visually (nice menu on the left): https://craftcms.com/features/all Blog, module and tutorials directory: The new Laracast website probably has a good middle-ground with nice graphical touches while still not to heavily reliant on custom visuals: https://laracasts.com/series One last thought, maybe "features" would be a better title for the "about" page because it's less about an organisation and more about a product. This is by no means negativ criticism, I really like the current progress of our new beloved CMSs home and would only like to offer some inspiration and my thoughts in hope that it helps boost PW. Ps. Sorry for the double post on the blog – from now on I will only post here… did not think about it when reading the blog.
  15. Thank you very much for this great Article and Congrats to the new/old site looks fantastic! One question, what do you mean by that; are you talking about a custom checkbox you added on all relevant templates?
×
×
  • Create New...