-
Posts
11,097 -
Joined
-
Last visited
-
Days Won
365
Everything posted by adrian
-
Thanks for the kudos - and yes, I will look into adding that Xdebug helper module (https://componette.com/jsmitka/nette-xdebug-helper/). There is actually another one that I didn't mention in the post: https://componette.com/milo/xdebugtracepanel/ which is for showing Xdebug traces in a Tracy panel - it is currently abandoned, but the author says he is working on a new version, but not sure on the status of that. I shouldn't be, and I am not really - I was just silly enough to check my email the other day and saw a request from Ryan for a blog post. I am actually away on an extended trip, so I don' really mind
-
The latest PW blog post is all about TracyDebugger: https://processwire.com/blog/posts/introducing-tracy-debugger/ Hope you guys find some new info and tips in there - sorry, it's a pretty long read
-
Might be an option. I'll have a play with the new ajax stuff in the latest version of Tracy and see if it's worth it.
-
Can I just say that even though it looks cool, it is almost as bad as a 90's splashscreen to me - please don't help to perpetuate the return of that evil! PS - I wouldn't mind it so much if it went straight to the slideshow - but the delay on his name when I can't do anything is my biggest beef with it.
-
Call to undefined method DirectoryIterator::getExtension()
adrian replied to Outcydaz's topic in General Support
Hi @Tom Walcher and welcome to the forums. It is for getting variations of an image - cropped, resized, etc. So based on a quick look, you probably won't see these variations listed in your images field. Not ideal, but maybe not critical for you needs - hard to say. The getExtension method for DirectoryIterator was added in PHP 5.3.6 so that is your key issue. There are other places it is used in the PW core though too: https://github.com/ryancramerdesign/ProcessWire/search?utf8=%E2%9C%93&q=%22-%3EgetExtension%22 So you might have other issues when viewing log files through Setup > Logs or dealing with multi-language stuff. It actually wouldn't be hard at all to replace this method with another approach to getting the file extension, but given that PHP 5.3.3 is 6 years old I think you might be better off hassling your hosting provider to update their system -
Thanks for the report @tpr and for the solution @LostKobrakai. Sorry, I am on the road at the moment (mostly vacation) and so my response time could be several days. It sounds like you have everything working as needed at the moment, but let me know if you think that perhaps Tracy needs to handle this better. Not the same thing I know, but the latest version of Tracy (the core project) now provides details on ajax requests - might be coming soon to this module, but there is a PHP 5.4.4 requirement, so might have to wait until PW drops 5.3 support.
-
@jploch, It sounds like you have the same needs as @Christophe. I have been meaning to take care of this but haven't managed to get to it just yet. I am currently traveling (mostly vacation), so can't guarantee when I will get to this, but it would be good to get this done shortly and tune this up for official release in the modules directory.
-
Hi @MikeB, Sorry that you are seeing those errors. I can't figure out why here at the moment. I could add a check to make sure that $value is an object before the code on lines 140 and 145 is processed, but I would like to be able to replicate what you are seeing first. Presumably you are getting this error when saving a page with this template in the admin? Is the phone field in a normal template, or is it part of repeater, or some other combined field situation? Let me know more and I am sure this will be an easy fix. PS - I am on the road at the moment, so forgive me if my responses are delayed.
-
I am not completely sure either, but here are a couple of links that mention the concept: http://research.microsoft.com/en-us/people/xingx/tic1.pdf http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=1407778&url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D1407778 http://link.springer.com/chapter/10.1007%2F978-3-540-74784-0_17 Without really having read these, I think an example might be serving up smaller images for mobile devices, or maybe he is talking about AWD vs RWD? Maybe I need to read some more, or maybe Guy will chime in and explain!
-
regarding Multiple templates or parents for users
adrian replied to adrianmak's topic in General Support
-
Thanks for the kudos Peter: http://significatojournal.com/bliss/an-exaltation-of-creativity-and-bliss/the-significato-journal-is-now-a-mobile-first-responsive-website/
-
Here's an article that is mostly about Concete 5, but makes some comparisons with PW - maybe some ideas in there! http://www.spiria.com/en/blog/websites/concrete-5-top-user-friendly-cms Note that Guy also wrote a dedicated PW post: http://www.spiria.com/en/blog/websites/processwire-light-powerful-elegant Not sure if that has been posted here before or not.
-
Assign edit roles to pages according to its template
adrian replied to wheelmaker24's topic in General Support
Sorry, no time for a detailed answer, but this might be helpful: This hooks into the check for whether a page is editable. Currently it is preventing access (returning false) for any page with the "mytemplate" template. You could modify this to check for certain users/roles. $this->addHookAfter('Page::editable', function($event) { if($event->object->template == "mytemplate") { $event->return = false; } }); You might also find some useful code/ideas in these two modules: http://modules.processwire.com/modules/admin-restrict-branch/ http://modules.processwire.com/modules/page-protector/ Hope that helps to get you going! -
It's still there for me. Remember this will only be on the main module config settings page, not the settings tabs for individual pages. Also, note that once you have protected the homepage, this shortcut is no longer available - it doesn't have any purpose in this case.
-
@ottogal - I just tested here to confirm it is still working as expected with PW 3 and everything seems to be fine. Unfortunately I am traveling at the moment with very limited internet access so I don't really have much time to help you at the moment. Is it possible you also have some other modules that are impacting access permissions? I would try testing on a clean PW install to see if you can narrow down the issue. I'll check back in again when I can to see where you're at.
-
It sounds like you are using the PageProtector module. It only prevents users from viewing pages on the front-end. I can't tell if that's what you want or if you expect them to also not be able to view and edit them in the backend? Also, you say that you selected all roles, except the member role. Do the members also have one of the other selected roles? Including "guest"?
-
Hi @paulkoan - welcome to the forums. Can you please let us know the version of PW you are running. Could you also right click and inspect element and show us the classes attached to the button. Any chance you are adding any custom css via "AdminCustomFiles" or some other way?
-
You don't appear to be saving the page anywhere, so do this: $p->save('textJSon'); after you set the $value
-
Hi Peter - have you seen this: https://github.com/plauclair/WireMailMailgun
-
Based on line 112 having the word "include" on it, I am guessing it might be related to this: https://github.com/ryancramerdesign/ProcessWire/issues/1739 although I would have thought that your error message would have been from site/assets/cache/FileCompile/site/modules/ServicePages/ServicePages.module
-
You'd know the line numbers from any error messages that Tracy has reported. You can of course always enter line #1 for some scenarios. Maybe it would be nice if I had a trigger for inserting at the last line as well? But, agreed it is probably a little obscure as a feature - I'll see how much I end up using it and see if others find a use for it.
-
Thanks for your writeup also @matjazp - great to have this stuff documented! I have committed a fix for the blank line number issue you were having. Please let me know if it works now. New Feature I have just added a new feature - it's a bit experimental, and I am not sure just how useful it is so would appreciate feedback. It provides the ability to insert debugging statements (actually any code you want) at designtaed lines in the compiled template at runtime. I see this as useful if you want to quickly debug something on a live site without having to edit the files on the server. In this example I am inserting two barDump (bd) statements into the home.php template file at lines 61 and 63 and noting which one is before the variable is iterated and which one is after. The code for the home.php file looks like this: And this is the result in the dumps panel: Obviously the scenario and the inserted debug statements could be quite different, but hopefully you get the idea. Note: Any lines of code inserted like this are only executed for superusers, so you could even use this as a way to insert lines of code that affect the output on the page without it affecting other users and guests. Also, be sure to remove any statements when you are done debugging, because the template file is re-compiled every time the page is loaded when this field is populated.
-
Awesome writeup - thanks @tpr!
-
@matjazp - thanks for the info on the changes to list() in PHP 7 - I hadn't seen that yet, although from reading about it, I don't think it actually affects that code. No problem at all - I assume the only places where this is affecting you are the links to the template file from the PW Info panel (both in the template info section and the icon at the bottom)? Are there any other locations with links without line numbers that I haven't thought of? Awesome - care to share any tips for setting it up? Did you work with this file: https://github.com/adrianbj/TracyDebugger/blob/master/tracy/tools/open-in-editor/open-editor.js Thanks!