Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/2020 in all areas

  1. Check this out: https://processwire.com/blog/posts/pw-3.0.137/#on-demand-mirroring-of-remote-web-server-files-to-your-dev-environment
    4 points
  2. Your text is a string, not an object That's what the error is about. You can use PHP's DOMDocument Class and the method getElementsByTagName(). Here's a tutorial (with a h2 example :-)): https://codingreflections.com/php-parse-html/ I am not sure about performance issues with the class if it has to parse lots of text/HTML.
    2 points
  3. @xportde, the ouput is trimmed of whitespace because the field render makes use of TemplateFile::render and by default the trim option is set to true. /** * Trim leading/trailing whitespace from rendered output? * * @var bool * */ protected $trim = true; There's no built-in way to change that setting in the render() call but you can change it with a hook if it's important: $wire->addHookBefore('TemplateFile::render', function(HookEvent $event) { $tpl = $event->object; if($tpl->field && $tpl->field->name === 'your_field_name') { $tpl->setTrim(false); } });
    2 points
  4. Hi Robin - thank you for your improvement on that. I guess there is a typo in CustomInputfieldDependencies.module @Line 52, the comma breaks the installation… $this->hideInputfield($inputfield, $field,);
    2 points
  5. @digitex, thanks for alerting me to this issue. I've made a change in v0.2.0 that should solve the issue. A note for all users of the module... Before v0.2.0 the Custom Inputfield Dependencies module did not render an inputfield in Page Edit if it determined that the inputfield should be hidden. But this creates problems if the inputfield and its neighbours have column widths of less than 100%. So from v0.2.0 onwards hidden fields will be rendered in Page Edit and hidden with CSS, so effectively the same type of hiding as occurs with the core inputfield dependencies feature.
    2 points
  6. I have read this several times and it's not sinking in. It seems to me though that you are probably over complicating the logic? Maybe best to break this down and get the functionality sorted first then adding to it. Suggested: Get the selectors right. I'd even do this on a template without any CSS, a blank page and Tracy keeping me for company. Am I getting the correct results? Is the ajax working OK? Still on a blank page, selectors to return paginated results. Do these methods work? PaginagedArray https://processwire.com/api/ref/paginated-array/ Bring in MarkupNav (or your own if custom). Does it work? https://processwire.com/api/ref/markup-pager-nav/ Do the footer search. Check Tracy to see if inputs are getting mixed up, etc.. If everything works, bring in the CSS and real template file ?
    1 point
  7. 1 point
  8. @Robin S I just installed the latest version and upgraded from 1.9 to 2.1 (this morning). BRILLIANT!!!! Beautifully done. It works perfectly. Thanks again for a very handy module.
    1 point
  9. For anyone finding this thread after a google search: The solution with ProcessWire 3x is $field = wire('modules')->get('InputfieldText'); $field->name = 'headline_default'; $field->label = "Please enter the promo headline:"; $field->useLanguages = true; // add this line $inputfields->add($field);
    1 point
  10. @gornycreative, thanks for the report. I was able to reproduce that in PW 3.0.161 when the Connect Page Fields module config has been saved with one or more of the field selects left empty. Should be fixed in v0.3.1.
    1 point
  11. thank you everyone!! bernhard, this last link is awesome - just tried it. great stuff, also with a nice UI. Just what I was looking for.
    1 point
  12. I just wanted to let you know I ran into an unusual error message with PW 161 revolving around selectors. I was getting a strange popup whenever page creation was operating - stating there was an invalid selector : | I uninstalled and then reinstalled the plugin and the problem went away. Not entirely sure why that would happen (I clear compiled files, cache etc) Just thought I would put a note here in case you were able to replicate the issue. I was upgrading from 160 to 161 and I know Ryan was doing a lot of selector work.
    1 point
  13. Hi, here is what I used in last project for about 10 000 pages and and it is very simple and basic script. It's read csv file line by line and create pages, but to avoid execution time limits and to get some other options (eg. "pause" option and later "continue", real-time monitoring, etc.) I use very simple Ajax loop. Here is attachment and inside it is some "how-to" txt file. unzip-and-place-content-inside-templates.zip Please note that I use this for ~10 000 pages (in my case, processing time ~1s/page) and for more than that number you can try to do some optimisations and test it. There are few places for that. Teoretically it can works few days, but is it worth? ? Regards.
    1 point
  14. Does ProcessWire have a bookmarklet that allows you to quickly save/post images, text, videos or any other content from web pages to ProcessWire pages/fields?
    1 point
×
×
  • Create New...