Jump to content

Sinmok

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by Sinmok

  1. Hi all, I'm trying to figure out how to set the Admin theme for the login and reset password pages. I copied the AdminThemeUIKit, folder from core into site/templates/modules and renamed the module and my modifications work fine once you have logged in. The issue is that the login page and reset password pages still use the default theme under from core. Things I've tried Assigning this new theme against the guest role Updating $config->defaultAdminTheme in site/config.php Checking the box "Use this admin theme for login screen" All with no luck. Any suggestions? Thanks.
  2. I'm trying to filter pages based on the values of one or more of their descendant pages. Here's my tree Project 1 Tasks folder Task group 1 Task 1 (assigned_to_user=user1) Task 2 Project 2 Tasks folder Task group 1 Task 1 (assigned_to_user=user2) Task 2 I'm trying to find all "projects" where one of the descending "tasks" assigned_to_user field = user1 So in the example above only "Project1" should return because project 2 has no tasks assigned_to_user=user1 How can I do this as efficiently as possible considering there may be 100's of projects and several thousand tasks? I hope this makes sense! Thanks!
  3. This does not work. The selector compiles but does not return any matches.
  4. I had no idea you could reference parent and children in a selector! I'll give this a go, thanks.
  5. I can't find any documentation on the children('') selector. Where did you see it?
  6. Hi all, Been a while ? I'm trying to achieve two kinds of selectors. One to select pages based on a parents field value and one to select pages where all children match a condition. For example, I am hoping to do something like this: <? //I want pages of template type task where the PARENT page field "closed" = 0 $groups = $pages->find("template=task,parent-of-page.closed=0") ?> Finally, I would like to select pages where all children follow a condition <?php //I want pages of template type group where ALL of the pages children field called my_int_field = 0 $matches = $pages->find("template=group, children.my_int_field=0"); ?> Are these two scenarios currently possible without iterating over a simpler selector first? Thanks!
  7. RT @GarethSoye: Hmmmm https://t.co/InBpLKx4Qm

  8. RT @Totalbiscuit: Well, I don't know if there is really a right way to tell people this, so I guess here goes. The CT did not (cont) http:/…

  9. I was hoping to get some ideas on how to implement "interactive elements" within CKEditor fields. For example, one of the requests is to be able to embed a clickable button/image that brings up a Lightbox and shows some sort of content. Bearing in mind the majority of users editing the CKEditor fields are not at all tech savvy and barely understand what HTML is. I know about and have used Hanna code before to solve this issue but I was wondering how else you could accomplish this sort of task? How have you overcome these sorts of issues before?
  10. HSBC files show how Swiss bank helped clients dodge taxes and hide millions http://t.co/ILTlPbyK9q

  11. Hello all, Is it at all possible to use the new InputFieldIcon field in my own templates? I don't see the option to select it when creating a new field. Thanks,
  12. The version was 2.3.0, I don't know if it affects newer versions. This has most certainly affected other projects because I remember asking questions and being told has_parent was the answer, but no matter what I did, has_parent just wouldn't work. That project was using a lot of cloned pages, too.. I won't be using Page cloning any more as a safety pre-caution until we can get verification!
  13. A client made the pages, so I can't be 100% certain but they do like using their page-clone tools so it is highly likely it has something to do with it.
  14. Wow, that worked. What causes this? Is there any way to prevent it / workaround?
  15. Also worth noting that the following does not work either: $p = $pages->get(1080) // returns the page I wanted $r = $p->find("") //returns empty.. //as does $r = $p->find("id>0") //also returns empty however $p->children //DOES return a page array This DOES work on other pages that has children. Whaaa
  16. I am absolutely sure they are the correct page ids. $p = $pages->get(1080) // returns the page i want $result = $pages->find("has_parent=$p") // still empty and produced the same result..
  17. Hello, I'm having trouble with a has_parent selector..which seems to work..only sometimes. I've got a page tree like so (ids are made up for demo purposes) Home Page 1 (id = 1050) sub 1 sub 2 Page 2 (id = 1080) sub 3 sub 4 Page 3 (id = 1090) sub 5 sub 6 sub 7 sub 8 sub 9 The really weird thing is that the same selector with different page id returns something unexpected..despite the only change being the page id for example, i'm getting $result = $pages->find("has_parent=1050") //returns a page array of 2 pages $result = $pages->find("has_parent=1080") // returns an empty page array (WHY?!) $result = $pages->find("has_parent=1090") //returns a page array of 5 pages is there anything that could be causing the selector for page id 1080 to return nothing? the templates, access control and all that are all exactly the same Are there any other known variables that might affect the result of a has_page selector? I'm using ProcessWire 2.3.0 Edit: Basically, all I need is a PageArray of all descendants of a given page - do you know of another way of doing this?
  18. Childish Goonies (Childish Gambino vs. Immortal Technique) [Grave Danger...: http://t.co/h5bqH45Qhi via @YouTube

  19. Hi all, Trying to create a simple script that iterates over each page and simply calls the save function. I've got a file called saveall.php with the following code: <?php include 'index.php'; function sitemapListPage($page) { $page->save(); if($page->numChildren) { foreach($page->children as $child){ sitemapListPage($child); } } } sitemapListPage(wire("pages")->get("/")); ?> This code sample is adapted from the ProcessWire sitemap plugin, but I've tried other methods and nothing seems to work. I want to call save() as I have a beforeSave hook from a module that I want to run. However for some reason, running this script causes me to get the follow error, on every page: If I loop through each page and print out the id/title of each page in the loop, they display fine. Any idea what might be causing this? I'm using PW 2.3.0 EDIT: Never mind - figured out the error was coming from the installed module
  20. PW's user system doesn't do what I need it to do, so im storing front end users as pages within my page tree. So when they login i'd need to match their u/n and pass to a page.
  21. I've got a Password field on some custom pages (Not users) How do I find these pages by the password set? $pages->find("password=hello999"); doesn't seem to work Cheers
  22. Yeah, ideally this would all happen in the Processwire admin area. Small module that checks roles sounds like the best approach, I'm guessing I just need to hook into Page::save and check if the template is a user, and if so, what their roles are.
  23. Hello all, Need a bit of advice. I have a page structure where users with a specific role either can or can't view the page. The problem is, is that I need to be able to have users who can add other users..but only assign them to specific roles. For example: A manager can add users and assign the roles: Supervisor or worker A supervisor can add users but only assign the new users with the role of worker A worker can't add any users. Is this currently possible to do in processwire? If not, how would you go about doing it?
  24. Think. Decent android game.. Get it at: http://t.co/Ep4OuqZnJr

×
×
  • Create New...