All Activity

This stream auto-updates     

  1. Past hour
  2. This module is great, very useful and i'm using it on a project; I guess my PHP version (7.2.10 ) doesn't like this: (FieldtypeConfigForm, line 69) if(count($values)){ but this works if(wireCount($values)){
  3. Today
  4. LostKobrakai

    It's certainly not valid forever, but once a token is compromised there's no way to just invalidate that single token before it's going to expire on it's own. By using plain old sessions you have the ability to do so. And depending on the context 24h can be quite a long time.
  5. Yesterday
  6. adrian

    Yeah, you might be right about the XML sitemap idea. I think for some sites it could be ok to convert slugs to titles etc, but obviously some would be less useful. I might still have a play on a rainy day though I really love the idea of using the PW modules directory as a way to install these action pseudo modules. I'll make the adjustments to AdminActions to support this. Thanks for a great idea!
  7. kongondo

    Is the client going to type in the data one by one or are you importing from a file, .e.g a CSV or JSON file? How many people potentially in the datasheet? Will this be done once or will the people be regularly updated? Can the people be saved as pages (hidden in admin) or you'd rather have them in a table external to ProcessWire? Manage People Datasheet You might need to create a simple Process Module, maybe even a one pager that lists the 'people'. You can include some simple actions like delete or edit people. To add people, a click on some button could open a modal window for you to add a person (depends on whether you are importing a file of people or typing manually). There's also the module RockGrid that you can use for listing the 'people'. I don't know if it can do data imports though. I think it works with ProcessWire pages only, but am not sure. User registration Since creating users is a manual process, you have a lot of control here. How you check if a user is on the allowed people list depends on the approach you take above, i.e. whether people are pages or are in a custom database. If they are pages, you can use $pages API, e.g. $newUser = $pages->get("template=people, first_name=$firstName,last_name=$lastName"); Then check if that returned something. If yes, register this user. If you are using a custom table, you'd need to use SQL to fetch, insert, update, etc, people. ProcessWire has a $database API that you can use Your other option is a custom Fieldtype but that is a bit more technical, going by how you've described your current skill set. Depending on your timescales, you might be able to get some help in the forums. If this is needed fairly soon, you might want to consider hiring an experienced ProcessWire developer to carry out the work for you.
  8. adrian

    Nice! Glad to hear it's already proving useful
  9. netcarver

    Hi @adrian thanks for the latest update to add autoload support (and to Ryan for putting it into the core this week) as I can now use Tracy in the preview tab in FormBuilder to do a little StreetAddress work. Much appreciated!
  10. Robin S

    I think authors maintaining actions in their own repos is the way to go. I know from past experience that when tinkering around I often do several commits after I think I've done my "final commit" for a version as I spot little errors or think of new ideas. I wouldn't want to have to bother you or me with pull requests for these. Having a list of third-party actions in the readme sounds like a good idea, but I have another idea too. I think it would be cool if we could leverage the power of the modules directory and ProcessWireUpgrade for actions, so users can see when updates are available and easily pull those updates in. So the idea is that each third-party action that extends ProcessAdminActions would have its own "pseudo-module" - a module file containing just the required getModuleInfo() method. So for my action above the module folder would look like this: And ActionUnorderedListToPages.module would consist of this: <?php namespace ProcessWire; class ActionUnorderedListToPages extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Unordered List to Pages', 'description' => 'Creates a structure of new pages from an unordered list.', 'version' => '0.1.0', 'author' => 'Robin Sallis', 'href' => 'https://github.com/Toutouwai/ActionUnorderedListToPages', 'extends' => 'ProcessAdminActions' ); } } ProcessAdminActions would look for third-party actions like this... $third_party_actions = $this->wire('modules')->findByInfo('extends=ProcessAdminActions'); ...and then get the action by looking for an ".action.php" file in the module directory. ProcessAdminActions could hopefully grab the action title/description from getModuleInfo() rather than this needing to be duplicated inside the action file (but no big deal if that wont fly). So this would require coding some extra features in ProcessAdminActions but I think being able to use the modules directory would be really cool. And the exact details of how all this would work is up for discussion of course - this is just me brainstorming here. What do you think? I might be wrong but this sounds like it wouldn't work very reliably. Sitemaps generally just have the URL to the resource and that seems like it would problematic to parse into the desired page structure in many cases: There is no page title in an XML sitemap so pages would have to use the slug name as page title, which may not be that close to the desired title - so potentially requiring a lot of manual fixes later and not making the action much of a time-saver. Many sites don't have the tidy connection between URL and page structure that PW has - worst are ones like /index.php?id=1234&view=detail&foo=bar. I'm not sure what the action would be able to do with this. XML sitemaps often include entries for non-page resources such as PDF files. If you think the XML sitemap idea can work I'm happy to be proved wrong. Maybe you want to have a play around with it?
  11. adrian

    Another idea that is probably taking something that is currently simple and effective and overly complicating it - I have a habit of that , but what about: About | basic-page Contact | contact History | basic-page People | people John Smith | person Jane Doe | person Blog | blogs Events | events as a way of specifying the template to be assigned to each page? There could even be a selected default template so only when one is specified will that default be overridden. Maybe it is too much, but I just wanted to throw it out there
  12. pwired

    Not trying to hijack this Google AMP thread but one should read this too about Google: Trying to setup a censored search engine in china where search results on democracy and human rights are made invisible. Internal memos about this subject by Google employees who try to make this public news are forced to delete these memos. Source: the intercept
  13. kongondo

    Thanks @adrian. I was looking for that one but couldn't find it. I had a feeling I'd read about it somewhere. How would it work in this case, just throw in the page ref field in the selector part?
  14. adrian

    Maybe also of interest: https://processwire.com/blog/posts/processwire-3.0.107-core-updates/#what-pages-point-to-this-one
  15. I am not sure what you mean. I'm using bootstrap table and some PHP for the database operations. I can copy most parts from code had written before. I know how it works, so it is easy for me. That's all. It has nothing to do with Processwire. P.S. See also http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/filter-control.html http://issues.wenzhixin.net.cn/bootstrap-table/#extensions/editable.html
  16. Dennis Spohr

    I just tried it. On a clean install (3.0.98) it works like it should be. My other installation has the same version. I don't have any idea why it doesn't work there.
  17. msavard

    Wow, that works great, thank you! I didn't realize I could just check for the reference field=current page. That does make it really easy though.
  18. kongondo

    $faqs = $pages->find("template=template-of-faq-pages, page_ref_field_of_faqs=$page, limit=10"); we are limiting to 10 hits in this example.
  19. Hi! I have a big problem with a client of mine. I have to do something that i don't do very often with processwire, and i'm very afraid that i'm not gonna able to do it. So i write to search some help from you experts. The website that i'm gonna create will have a database with infos about users. This users are not the actual registrered users, but possible users. I'll try my best to explain this. What i will have is a datasheet in the database with infos about all the users (name, surname, fiscal Code) that can register to the website. So during registration the website is confront with this database of people, and accept or not your registration to the website. Now. The problems are: the client need a page in the CMS to insert this people in the first place (Custom Admin Page?) in the database. I read what i need to create it, but i don't understand what i need to do next. What i need to do for reading and writing to the database, with data, directly from a custom admin page in processwire? The other thing is. I can do this control during registration? I Can extend fields in the user account? I'm completely in your hands.
  20. I have a bunch of FAQ pages that each have a page reference field on them. When I go to a page on the site I would like to pull back a list of all the FAQs that include the current page in it's page reference field. Is that possible? matt
  21. biber

    Hi @kongondo, I'm still a beginner, so it takes time to come along. But I will try to use your script tomorrow. Thanks a lot Günter
  22. bernhard

    I've just not created any yet
  23. I would be interested how you do that
  24. kongondo

    Use the API :-). Log in as a super user and throw the following code in some template file and visit a page that uses that template. Delete the code from the template file when done. if($user->isSuperuser()) { $p = $pages->get(1029); // delete some images based on some condition foreach ($p->images as $img) { if($someCondition) continue;# if some condition met, skip deleting this image $p->images->delete($img); } // if deleting all #$p->images->deleteAll(); } Alternatively, use the API to create thumbs in the size ProcessWire would have generated.
  25. szabesz

    FYI. Well worth the read: https://www.i-programmer.info/news/81-web-general/12149-google-gives-amp-open-governance-still-not-good-enough.html "It doesn't matter if Google hands AMP over to an entirely benevolent foundation, as long as Google is adjusting its search and hosting the cache, it has too much control. The web served by Google isn't an open and free web, it is a walled garden in waiting."
  26. biber

    Thanks for Your replys. @adrian: Debug mode is enabled, but none of the logs shows any error. I don't think, I have the right to increase PHP memory. @kongondo: Yes, I think about dividing this page into smaller pieces. But how can I delete an amount of images without the edit-funktion on my backend? As I described, deleting files in the directory >site >assets >files >1029 by FTP does not help.
  27. kongondo

    . Yeah. What @adrian said. PHP is most likely running out of memory when ProcessWire tries to create thumbs for those images. Second time round, they should load fine (assuming the thumbs creation finished). Maybe also see if you need to rethink your approach? 300 images on one page, from a UX point of view can be 'not-so-friendly'?
  28. ProcessWire 3.0.114 is a relatively minor core version update. Most of the ProcessWire stuff I've been working on this week isn't quite ready to commit/release, so will save for later. This version adds a $database->supportsTransaction() method that returns a true or false as to whether or not the current DB engine supports transactions. Or if you give it (as an argument) the name of a table in the database, it'll return a true/false specific to that table. This version also adds importFiles() and replaceFiles() methods to $page->filesManager, which is what manages all the files for a page. These methods aren't likely to be useful in site development, but are useful for a module I'm working on, and maybe useful to other modules, so I went ahead and added them. Finally, probably the most interesting update in this version is that modules can now specify autoload order. This is something that Adrian requested, as TracyDebugger needs to load before other modules, so this update simplifies that. If you develop a module that has a similar need, be sure to see the notes for the autoload getModuleInfo() property in the Module class. That's all there is this week, so I'm not going to do a blog post this week, but stay tuned for more next week! Have a great weekend.
  1. Load more activity
  • From Twitter

    • Get notified of updates

    • ProcessWire Weekly #227 - September 15 2018
      In the 227th issue of ProcessWire Weekly we'll walk you through the latest core updates, properly introduce the Street Address Fieldtype and Inputfield combination, and take a quick dive into our latest site of the week – Engfer Consulting. Read on! / Subscribe / More at weekly.pw