• Content count

  • Joined

  • Last visited

Community Reputation

17 Good

About monchu

  • Rank
    Distinguished Member

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

1,502 profile views
  1. yes it is doable however, you don't have to create a file anytime you create a new template in admin. you create a template file if you want to 'view' the page using that template
  2. You don't have to edit .htaccess file, just edit your config.php at $config->https = true;
  3. Try to clean compiled files and refresh first if still got the error try to uninstall any 3rd party modules
  4. I still prefer the Page Reference because the flexibility to get more values from the page itself
  5. On each process page I usually added an option field for i.e named it as 'toggles' to restrict user's view access. So in wire('pages')->find('template=your_template, toggles=your_user_roles'), you can restrict the user's access. At the moment I'm developing the process for thousands of property addresses and contractors, the queries are quite fast. It always relies on how you design the process itself. In term of security, at least until today pw doesn't have any security issue. As long as you're sure to manage your front-end script carefully I think pw core is really good in the security part.
  6. I'm using pw for a web app as well. I'm not PHP expert just a self-taught programmer learn from copy and paste What I did wrong for the first dev with pw I was not using pencil and paper to design the process first ... So just for sharing to your question: Page in PW is not just a content; I use PW front-end as a database form to process certain action. Each process will refer to the user's role Create the template to accommodate that process and setup user's access right for each template. No need to create a file template if it's not a content template. Finally, configure the access right on the field level. But be careful here, to write down in detail in your documentation, or just use hook for that purpose.
  7. I'm not sure LostKobrakai, in my case, once I deleted that line then I'm able to add a field. the error gone.
  8. If you're using site-regular during pw installation, you have to remove this $config->dbEngine = 'InnoDB'; from config.php
  9. You can just add a 'None' option as a selection for user to tick nothing and manipulate it in your code
  10. You don't have to hide it. In your Google Console Panel just add the domain name URL with wild card or only certain url addresses for that API.
  11. Hi, to upgrade or downgrade what I always do is to rename the existing wire folder then copy a new wire folder. In general thats the only thing you need to do for pw upgrade. Once you're happy with the upgrade then you can remove the old wire folder. You only have to replace .htaccess and index.php if you upgrade from pw 2.xx to 3.xx
  12. I also found the same problem for adding FieldtypeOptions through API. Below are the codes that I'm using which is work well for other field types. From the json export the FieldtypeOptions array value is in this line "export_options": {"default": "1=on|On\n2=off|Off\n3=indexon|Index On\n4=indexoff|Index Off"} public function extraFields() { $fields = array( 'invoice_stat' => array('id'=>'112', 'type'=>'FieldtypeOptions', 'flags'=>'0', 'name'=>'invoice_stat', 'label'=>'Status', 'description'=>'', 'derefAsPage'=>'1', 'collapsed'=>'0', 'columnWidth'=>'', 'parent_id'=>'', 'template_id'=>'', 'findPagesSelector'=>'', 'labelFieldName'=>'.', 'inputfieldClass'=>'InputfieldSelect', 'usePageEdit'=>'0', 'labelFieldFormat'=>'{pg_alias}', 'tags'=>'', 'allowUnpub'=>'', 'showIf'=>'', 'required'=>'', 'requiredIf'=>'', 'findPagesCode'=>'', 'defaultValue'=>'1=on|On\n2=off|Off\n3=indexon|Index On\n4=indexoff|Index Off', 'addable'=>''), ); foreach ($fields as $field) { $f = new Field(); $f->type = $this->modules->get($field['type']); //$f->id = $field['id']; $f->name = $field['name']; $f->label = $field['label']; if (isset($field['inputfieldClass'])) $f->inputfieldClass = $field['inputfieldClass']; if (isset($field['inputfield'])) $f->inputfield = $field['inputfield']; if (isset($field['export_options'])) $f->export_options = $field['export_options']; if (isset($field['flags'])) $f->flags = $field['flags']; if (isset($field['description'])) $f->description = $field['description']; if (isset($field['notes'])) $f->notes = $field['notes']; if (isset($field['derefAsPage'])) $f->derefAsPage = $field['derefAsPage']; if (isset($field['collapsed'])) $f->collapsed = $field['collapsed']; if (isset($field['parent_id'])) $f->parent_id = $field['parent_id']; if (isset($field['labelFieldName'])) $f->labelFieldName = $field['labelFieldName']; if (isset($field['tags'])) $f->tags = $field['tags']; if (isset($field['allowUnpub'])) $f->allowUnpub = $field['allowUnpub']; if (isset($field['showIf'])) $f->showIf = $field['showIf']; if (isset($field['columnWidth'])) $f->columnWidth = $field['columnWidth']; if (isset($field['required'])) $f->required = $field['required']; if (isset($field['requiredIf'])) $f->requiredIf = $field['requiredIf']; if (isset($field['template_id'])) $f->template_id = $field['template_id']; if (isset($field['findPagesSelector'])) $f->findPagesSelector = $field['findPagesSelector']; if (isset($field['findPagesCode'])) $f->findPagesCode = $field['findPagesCode']; if (isset($field['labelFieldFormat'])) $f->labelFieldFormat = $field['labelFieldFormat']; if (isset($field['defaultValue'])) $f->defaultValue = $field['defaultValue']; if (isset($field['addable'])) $f->addable = $field['addable']; $f->save(); } }
  13. if you have a backup you can get the error file from this folder /site/assets/logs/errors.txt
  14. module

    Hi pmarki, can I use this module for pw 3.xx version?
  15. As a sample, if you open _main.php under the processwire installation => site-default folder, you can add google adsense scripts before </head> tag or at the end of that file before the closing body tag - </body>