Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. The function is a closure, which does have it's own variable scope, so local variables like $page or $user are not populated. You'd need to use one of those: wire('user') $this->user $event->user
  2. If you want editors to have frontend access, but not be editable you should either allow editors to have frontend access by default or create a editor-frontend role. If they shouldn't be editable then they are not the same as other members anymore. Edit: An alternative approach (more cumulative) could be superuser editor member frontend guest Give frontend to both editors and members so you only manage this role once, and allow editing of members to prevent editors from being edited.
  3. Could it be that you're still running a older index.php version than the 2.7.2 one?
  4. Are you sure the server does actually have an equivalent amount of horsepower available compared to your computer? Image resizing is highly cpu intensive and therefore dependent on the servers hardware.
  5. I'm currently on mobile, so I won't add much here. I just think people should know this: https://medium.com/@jitbit/target-blank-the-most-underestimated-vulnerability-ever-96e328301f4c#.4u4t4drfs
  6. Repeaters are actually using real templates, they are just marked as system templates and therefore hidden by default like the user template. Only the new matrix fieldtype is using a somehow combined generic templates for each of the different data types in a single matrix field.
  7. Maybe that was the reason to install the module? @Ipa This might be an addition from after Ryan added the module to the mods directory.
  8. Just a note, closest() isn't even needed here, because we already know the current page doesn't have a value for foo. ->parents("foo!=''") will do the same excluding the current page from the possible resultset. It's rather this where closest() shines. $foo = $page->closest("foo!=''")->foo
  9. First of all $input->get->s is basically the same as $_GET['s'], but without having the whole checking if the array key is actually set (isset …) mess. Secondly you're giving anyone the possibility to apply any changes your code is creating to any page in your system, which isn't great. You should make sure only applicable pages are selected in your $pages->get() call by adding additional selectors (at least disable all admin pages with 'parent!=2'). And lastly you should check if you successfully found a valid page before doing anything else.
  10. That's basically the approach I used here: https://processwire.com/talk/topic/10817-field-inheritance/ The benefit of it is, that the field can stay empty and will therefore automatically adopt any changes to the parent page's value as long as it doesn't have an own value specified.
  11. You simply do nothing and it should work exactly like beforehand. That's 90% of the reason the file compiler does exist in the first place. So the question is rather why it doesn't work for you.
  12. RT @jcmeloni: I'm hiring another awesome Software Engineer (Java) @Hobsons ... is it you (or a friend)? Please RT! https://t.co/qSu3vDdHia

  13. Warum nicht einfach den FB-Post verlinken, statt zu einer (m.M.n. eher nutzlosen) "Thema - Facebook" Seite. @SZ https://t.co/G9bAoDCpp8

  14. getTotal is not reevaluated as it's meant to be used for pagination and only the db can know the unlimited number of pages for a certain selector. That's why you need a single selector to select pages if you need to work with pagination.
  15. That's expected. The chosen library was created to be a seemless enhanced select field (meaning it will be fully useable without js), which is why it does not have any ajax capabilities and therefore has the same problem as all other non ajaxy inputfields when loading a ton of pages.
  16. I've created the name format this way, when I started creating this module for my own purposes and I never had it matter except when testing things right before releasing the module here. But I'm considering to add seconds to the timestamp as well, especially as those new template and field migrations can really speed up the creation of those migrations.
  17. Just keep in mind that $pages->find() can use those date strings, whereas further in memory filtering of pages can only handle raw timestamps.
  18. Double clicking the trash icon does (also) work.
  19. Hook into Users::added and add the role to those users there.
  20. I'd suggest using the WireUpload class instead of trying to emulate what it does: https://gist.github.com/somatonic/5233338 It's also best to let the file / image field move added files to the correct location and not moving them there beforehand.
  21. Setting the correct user/group for your files should solve this issue. It sounds like uploading via ftp didn't do that.
  22. There's a $ to much in $newspage->$news_items
  23. I just added a small code snippet so that custom global fields are also added to templates when using a TemplateMigration.
  24. Image tags do not have any ids (nor titles). They are just plain strings. Ryan's example does build up an array like that: array('myTag' => 1, 'myTag2' => 5, …) The ksort() should sort the array by the keys a.k.a. the tags.
×
×
  • Create New...