Jump to content

Peter Falkenberg Brown

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Peter Falkenberg Brown

  1. Thanks, @Pete I logged in successfully. Peter
  2. Hi, The Developer site is still broken. Can't log in. When I fill out my username and email at: https://directory.processwire.com/login/ it simply refreshes the screen without logging in. I've tried it in Firefox 72.0.2 and in Chrome. @ryan - thanks for looking at this. Peter
  3. Hi, When I try to log into the PW Developer forum to create a profile, it breaks and takes me to: https://login/ Yours, Peter
  4. @Robin S @netcarver Hi Robin and Steve, Robin, the method you outlined above, with the ready.php code, worked perfectly! Thank you! The module from @kixe generated errors, and after looking at a thread on it, I used your ready.php code instead. Using the date/time method in the field could, I suppose, encounter a race conflict, but in this case, there's only one admin user. @ryan Ryan: I do think this deserves the addition of the id field in the code, and/or a switch option to do this exact function, with the auto-increment id, especially to avoid race conditions. But... this works for me, today. Thanks again to both of you! Peter
  5. @netcarver Thanks, Steve, for your response. I'll dig into it! @ryan and Ryan and Dev Team: I really do think that this would be a fabulous feature for ProcessWire: - in every template, have a setting that could turn on a function to fill in the name and title fields with the auto-increment ID automatically, skipping that initial step where you see those two fields, and going right away to the main edit screen, where one would see the title value and the displayed url as the ID number. In my work with PW, there have been numerous times when I wanted the name and title field to only be the ID, and it was a pain to have to program around that issue. I think you'd get a LOT of positive feedback about this feature, especially if the setting was also in the API, i.e. add a record without having to specify the title and name field, but have them populated by the auto-increment ID. Thanks! Peter
  6. Hi Netcarver and Ryan and All, This is exactly what I'm looking for, I think. I have a client who wants to add page content quickly, with just 3 input field (publish_date, body, tags) and not have to mess with the title or name fields, which we want to default to the page id. Now, one has to type in something like "n" (for new) in those fields, and then change them on the next screen by hand to the generated ID field. I've programmed a user interface in a previous application (i.e. not using the admin pages), where I would fill in those fields with a temporary random number, and then replace them with the the actual page ids (I probably should have figured out how to grab the auto-increment number instead). But doing an auto generate function like this for title and name should, in my opinion, be an option in PW, like a setting for a template that says: "Check here if you want to bypass the title and name fields (on page creation), and have them filled in automatically with the auto-increment ID." That would be GREAT. Since that's not real yet, is the code above ready for production use, or is there something that someone else has done that will do this? Thanks! Peter
  7. Hi Jacmaes, Thanks for answering. Looks like Ryan needs to update his shop listings: ProDevTools doesn't list ProMailer as part of it. And there's no single site version over there either. Hmm... of course, Ryan must be incredibly busy. :-) I'll wait and see if a single site version of ProMailer appears... at least for a little while. Thanks again! Peter
  8. Hi Ryan, I'm intending to purchase ProMailer -- looks FANTASTIC. Do you have a "Single" version? I only saw Dev and Agency. Thanks, Peter
  9. Thank you all, for these comprehensive replies! I'll check out the links, etc. The right tool for the right job is indeed the point. So far, at least, I'm VERY happy with ProcessWire. Who knows: I may never need Laravel at all. Time will tell. Thanks again! Peter
  10. Howdy PW Gurus Who Also Know Laravel or Symfony, I built a few web applications with PW, and was very happy with the result. For example: - an email to web help ticket system, with a front-end login - a Linux account management and multi-server account creation app, with a front-end login and PW server scripts run from the command line - a complex business app to test the viability of business ideas against a variety of metrics and algorithms, with a front-end login. The front-end logins displayed pages specific to the app needs, entirely bypassing the normal PW admin backend. => My question is: since PW can build the types of apps above, what can Laravel and Symfony do that PW cannot? Thanks for any insights! Peter
  11. Hi Elabx, Thanks for that link! It answers my question completely. Form Builder looks like it rocks! I shall buy it. Peter
  12. Hi Ryan and All, I've been using a Perl script called "SimpleForm" that I've written and updated over the years. One reason I like it is because I created pre-processing and post-processing functions that allowed me to add any type of custom code I wanted to do, either before the data was processed as a submit, or afterwards. However, it doesn't fit into the PW framework, since it's in Perl. Thus, I'm exploring buying Form Builder, but in reading the feature list, I couldn't quite get whether it allows this type of totally customizable, code-able pre and post processing. I might have missed that, but can someone let me know if Form builder has that functionality? Also, I want to be able to collect and save data, then send someone to the free PayPal site, and then have the person return to a PW page where the form data can be updated "as paid." Has that been done with Form Builder? Thanks! Peter
  13. Hi Macrura, You are exactly right. I don't remember placing this line in the module backend data field "Default Link to XSL Stylesheet" "/site/templates/styles/rss_feed.xsl" but it was there. So, I removed it, and then uncommented the line in the module, and all was well. I suppose I could have placed that value in the data field: I just don't remember doing so, and never had that file on my system. Oh well... mystery solved, and the module has no error. It was human error! Oy. Ugh. Thank you VERY much for clarifying this. Peter
  14. Hi Dragan, Yep, that worked. This is the line that I had to comment out: /* if($this->xsl) $out .= "<?xml-stylesheet type='text/xsl' href='{$this->xsl}' ?>\n"; */ This would be a good thing to fix in the module, I do believe. This is one of Ryan's core modules, I think. Thanks! Peter
  15. Hi Ryan and Team, I'm using the module "RSS Feed Generator" v1.0.2, in PW 3.0.42. (I'm going to upgrade when 3.1 comes out.) I just noticed that my rss feed here: http://significatojournal.com/rss/ doesn't display anything in Chrome (but works in Firefox). (The source xml is being generated.) I also saw that Chrome requires an RSS extension to display RSS: https://chrome.google.com/webstore/detail/rss-feed-reader/pnjaodmkngahhkoihejjehlcdlnohgmp?hl=en so I installed it, but still nothing. I then went to the NY Times and saw that their feed worked in Chrome *if* the extension was installed. I compared the raw xml at the NY Times against the raw xml in my feed, and saw a significant difference. However, since the xml is generated by the module, I didn't really want to mess with it. Here are the two snippets from the headers. (The rss tree looks similar -- it's just the first set of declarations that look different.) RSS FEED GENERATOR AT SIGNIFICATOJOURNAL.COM: <?xml version='1.0' encoding='utf-8' ?> <?xml-stylesheet type='text/xsl' href='/site/templates/styles/rss_feed.xsl' ?> <rss version='2.0' xmlns:dc='http://purl.org/dc/elements/1.1/'> NY TIMES FEED: <rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:nyt="http://www.nytimes.com/namespaces/rss/2.0" version="2.0"> I believe that the module should be modified, for Chrome support. Any thoughts? Thanks! Peter
  16. Dear Abdus, That worked! Thank you! Really appreciate help from you, and BitPoet, and OF COURSE, Ryan and team for making such a great CMF! Peter
  17. Hi Abdus, Thanks.... I tried that based on your comment, and I got this error: Error: Class 'Page' not found... Peter
  18. Dear BitPoet, Thanks very much for this! I could just feel in my bones that I had forgotten something wonderful about PW. I think I saw that blog post in my email when it came out, but then the info didn't stick in my brain. I'm able to read the data from "DOMAIN_1" but when I try to save it into DOMAIN_2, the page object still belongs to DOMAIN_1 and gets saved into that domain. I have some generic code below. # FileCompiler=0 require('/home/DOMAIN_1/public_html/wire/core/ProcessWire.php'); $DOMAIN_1_site = new \ProcessWire\ProcessWire('/home/DOMAIN_1/public_html/', 'http://DOMAIN_1.com/'); $DOMAIN_1_selectors = "SELECTORS HERE"; $DOMAIN_1_results = $DOMAIN_1_site->pages->find("$DOMAIN_1_selectors"); foreach ( $DOMAIN_1_results as $DOMAIN_1_result ) { $DOMAIN_1_url = $DOMAIN_1_result->url; $DOMAIN_1_name = $DOMAIN_1_result->name; . . . more fields here . . . #........................................................................ ### CODE HERE TO INSERT DOMAIN_1 PAGE INTO DOMAIN_2 $DOMAIN_2_site = new \ProcessWire\ProcessWire('/home/DOMAIN_2/public_html/', 'http://DOMAIN_2.com/'); $DOMAIN_2_new_page = new \ProcessWire\Page(); # THIS BREAKS: $DOMAIN_2_new_page is still attached to DOMAIN_1 # and gets saved into the domain 1 database. . . . more code here . . . } Any help is much appreciated. Seems like I'm not properly initializing the vars for DOMAIN_2. Thanks! Peter
  19. Dear PW Gurus, I searched and didn't find this answer -- hope I didn't miss something. I have 3 production installations of PW on my server --- 3 different domains. I'm developing a PHP script that will run from the shell prompt, and pull a certain number of pages from domain A, and then insert those pages into domain B and C. (The field template structure is identical between the 3.) My script starts by connecting to the PW installation for domain A by using this include: include("/home/USER_DIR/public_html/index.php"); which of course connects the script to that particular database. (All 3 domains use a separate DB and separate installation of PW.) Install A uses PW v3.0.61 running under CentOS. I think I'm missing some wonderfulness in PW, but I'm stumped over how to take the data from A and then do an include statement to the B install (to insert the pages into B) and then do the same thing with C. I would think that the second statement: include("/home/USER_DIR_B/public_html/index.php"); would conflict with all of the variables, etc that are pulled in with the first include, and then so on, with "C." Is this a perfect examples of why someone should use name spaces? I admit that I've never used them, so I'm at the bottom rung of knowledge about the syntax, etc, to do that. The script is truly uncomplicated, otherwise, ie. - read 3 or 4 pages worth of fields into variables - insert them into B and C's installations. - done. Any thoughts? I'm running this script as root, (which I've done with the "A" part, so that the permission issue would not be a problem. Thanks in advance for any help! Peter
  20. Dear Robin and BitPoet, Wow!! This is why I love ProcessWire. The details above are exactly what I need. And of course it was already there --- I just hadn't kept up to date with all of the new documentation, during the last couple of years when I was focused on other projects besides PW app development. So... gotta catch up. Thanks to you both! Peter
  21. Hi Robin, Thanks... that code is clear and understandable. I think I'm a bit stuck on the fact that I'm not using template files with this app --- I'm only accessing the data from the admin pages, so unless I'm missing something, I would think that the code above would have to be incorporated into one of the admin template files. Is that correct, and if so, any thoughts on which one? One of the downsides of copying out the admin template files to the site directory, in my opinion, is that the default admin template files get overwritten on certain updates. Kind of messing with the core, in my opinion. I think it would be really cool if PW had an add-on module which could define a calculated field like this. Or even make it a special "calc" field type. Yours, Peter
  22. Hi Robin, Although I've built large front end apps with PW's API, I've never tried to modify the admin back end. Based on the interface that it has, I'm under the impression that one would have to modify the files under wire/templates-admin, or make a copy of the admin template into the site folder and modify code there. Do you have any tips on the best way to achieve your idea above? Are there any examples of this type of Pages::saveReady call that you know of? Thanks! Peter
  23. Hi All, I might have missed something, but I couldn't find this... I'm looking for a field type that will calculate a result based on numeric values in other fields in the same page, and store the data when the page is saved, and update it when the values change. (Rather than just displaying the values dynamically at run time, although I suppose that would be better than nothing.) I.e. "order_total" = "quantity" * "unit_price." with order_total being the calculating field type. Of course, I could write template php files that do this, but I'm trying to wrestle with the 3.x admin pages to essentially record data for an ordering system that will only be used by internal staff, so that I don't have to design a complete front-end for the system. I've got the customer field set, and the items, and the sales (i.e. "orders") pages set up. I'm trying out the repeater field to handle multiple items in one order, i.e. 4 copies of this, 10 copies of that, all pulled with page select fields from the items "table." (Rather than create one page for each "order item".) Most orders won't have more than 1 or 2 items, and I think they would max out at less than 10 order items. A native "calc" field type would help tremendously, or an admin spot to tell a float field to run a php file when saving or updating the page, that would do the calculations, would also work. Thanks! Peter
  24. Thanks, Robin, for that explanation. The # FileCompiler=0 declaration was in only one file. Also, my other site didn't have this problem. I wonder why... I thought I read somewhere that you could include the namespace declaration in the top include file, so I tried that in the controller file listed above, but it didn't work. But... in any case, adding that declaration did fix the issue. Thanks, again! Peter
  • Create New...