Peter Falkenberg Brown

  • Content Count

  • Joined

  • Last visited

  • Days Won


Peter Falkenberg Brown last won the day on September 25 2014

Peter Falkenberg Brown had the most liked content!

Community Reputation

116 Excellent

About Peter Falkenberg Brown

  • Rank
    Sr. Member

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Maine, USA
  • Interests
    Writing, publishing, public speaking, video blogging on "Love, Freedom, & the World."

    "The Love, Freedom, & the World Channel":
    @falkenbrown -


Recent Profile Visitors

7,374 profile views
  1. Peter Falkenberg Brown

    Hi Elabx, Thanks for that link! It answers my question completely. Form Builder looks like it rocks! I shall buy it. Peter
  2. 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
  3. Peter Falkenberg Brown

    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
  4. Peter Falkenberg Brown

    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
  5. Peter Falkenberg Brown

    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: 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: 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=''> NY TIMES FEED: <rss xmlns:dc="" xmlns:media="" xmlns:atom="" xmlns:nyt="" version="2.0"> I believe that the module should be modified, for Chrome support. Any thoughts? Thanks! Peter
  6. Peter Falkenberg Brown

    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
  7. Peter Falkenberg Brown

    Hi Abdus, Thanks.... I tried that based on your comment, and I got this error: Error: Class 'Page' not found... Peter
  8. Peter Falkenberg Brown

    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/', ''); $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/', ''); $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
  9. 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
  10. Peter Falkenberg Brown

    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
  11. Peter Falkenberg Brown

    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
  12. Peter Falkenberg Brown

    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
  13. 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
  14. Peter Falkenberg Brown

    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
  15. Peter Falkenberg Brown

    Dear Robin, That resolved it. Thanks! However, I'm curious: the other 3.0.61 site works fine, without that namespace declaration. Any thoughts on why that might be so? Also, all the files in my system are include files, running off a controller file. All of the field templates are defined to pull up this file: custom_template_controller.php, which then pulls up various page files, like 'home.php', 'section.php', 'article.php', etc. Those top level includes then include around a dozen or more smaller include files, like the menu, the header, etc, etc. I'm wondering why the menu file choked, but the other includes did not. Because of the Hook code? Here's the code in the top control file: <?php include("./inc_vars.php"); include("./inc_functions.php"); #.................................................................... # block future publish dates; don't block home page (id 1) if ( ( $page->id == '1' ) || ( ! empty( $publish_date ) and $publish_date <= $now ) ) { # page can be displayed } else { throw new Wire404Exception(); } #.................................................................... include("./$custom_template_file"); Thanks for your help! Peter