Jump to content

pwfans

Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by pwfans

  1. Hello, I try this module in php 8.1 environment, using processwire forgot password module : Fatal Error: Uncaught Error: Undefined constant "CURLOPT_POST" in /var/www/domainname/public_html/www1/site/modules/WireMailgun/WireMailgun.module:730 Stack trace: 1. /var/www/domainname/public_html/www1/site/modules/WireMailgun/WireMailgun.module(640): WireMailgun->apiSend() 2. /var/www/domainname/public_html/www1/wire/core/Wire.php(413): WireMailgun->___send() 3. /var/www/domainname/public_html/www1/wire/core/WireHooks.php(952): Wire->_callMethod() 4. /var/www/domainname/public_html/www1/wire/core/Wire.php(484): WireHooks->runHooks() ... Maybe not compatible with php 8 yet ?
  2. Excellent ! Yes it's worked, thank you. In my case rockfinder3 about 4 times faster than findRaw ?, and usefull feature is empty data automatically become NULL, so no need further work. ?
  3. Hello, How to output data in template ? no result using foreach(); it is working when using findRaw. $items = $rockfinder->find("parent=/foo/")->addColumns(['title','text','date',]); //d($items); foreach ($items as $item) { echo $item['title'].$item['text'].$item['date']; }
  4. Just found this module, match to project needs, thanks a lot. Questions on frontend : 1. Is it possible to show allowed roles / username for each page protected ? 2. Or displaying allowed pages for roles / username. 3. What is $page->prohibited use for ?
  5. Update, error line 515 happen only when updating value, using csv upload method or paste in method, the value seem updated tho.
  6. Confirmed, i have this warning too, using csv upload and text, pw 3.0.184 and module 1.08, import result seem on and off, some not imported
  7. Is it possible to update current value while also add new item (if any) for current repeater using dynamic row ?
  8. You need creating form using dynamic row <input type="text" name="fieldname[]"> Then, using this php code to fill the repeaters <?php $fields = count($_POST['fieldname']); $p = new Page(); $p->template = 'template_name'; $p->parent = $pages->get('/parent_name/'); $p->name = 'page-name'; for ( $i=0;$i<$fields;++$i ) { $repeater = $p->repeater_name->getNewItem(); $repeater->field_in_repeater = $input->post->fieldname[$i]; $repeater->save(); } $p->save();
  9. Or using ternary operator : <select> <?php $field = $fields->get('field_name'); $options = $field->type->getOptions($field); $selectedField = $page->field_name->title; foreach ($options as $option) { echo "<option value='".$option."' ".($option->title == $selectedField ? "selected":"").">".$option->title.'</option>'; } ?> </select>
  10. For example, sometimes we need to change title/name/template for about 80 pages from about 600+ pages. We use PW for intranet application. Thank you for your offer anyway @adrian, we will discuss this with our IT staff first.
  11. Ahh ok, too bad BCE can't handle many pages, it's already has a nice interface for bulk edit.
  12. Hello, On my PW tree, some of parents have thousands child pages, and some tens of thousands child pages, using BCE load child pages is heavy and cannot using edit mode because of error memory/timeout. Is that possible to add pagination like on edit mode just like lister mode ? or is there any way to use this module with thousands child pages ?
  13. Site B get data from site A using : $items = $siteA->pages->find("parent=/productA/,limit=10"); foreach ($items as $item) { .... } $items->renderPager(); Pagination displayed correctly but they page number path also goes to siteA, which is off course not work when clicked. How to do this pagination properly in multi-instance ? thanks
  14. @bernhard sorry, i make you confuse by my bad english ? I mean, try to place this : <?php $pdf = $modules->get('RockPdf'); $pdf->write("pdf content"); $pdf->show(); ?> before any html content, at first line if possible.
  15. For anybody facing this problem which in my case invalid pdf will generate error "one or more XREF chunks were not found". Solved it by placing the rockpdf instance php code block on top of anything else.
  16. @kongondo Thanks a lot ! just knew functions API can be enabled by this way ?
  17. I'm using 2 multi instance, both same version (3.0.148) with this state at config.php $config->useFunctionsAPI = false;
  18. I also thinking about how to "reset" page ID, in my case after web development finish, there are thousand pages used while at development stage for testing, database backup module from ryan give a very convenience way to "reset/back to safe point" but it s not bulletproof solution in my case, restoring database backup will also delete all pages, templates, fields that need to used after development finished. Now i use recycle way, i unpublished those redundant pages, and make API used them first whenever need new page until those redundant page all use up.
  19. @maddmac Never have a project using formbuilder yet but if it is about front end, I think you can implement what this module get inspired from: https://leaverou.github.io/awesomplete/ Quit simple to implement, thanks to creator.
  20. Maybe below code can help for simple group by date for example : $list = $pages->find("template=event"); $groups = array(); foreach ($list as $item) { $groups["$item->date"][] = $item->id; } foreach($groups as $key => $gr){ echo $key."<br>"; }
  21. @MoritzLost Thank you ! works like expected
  22. Hello all, Is there a way to find cookies that generated using dynamic name ? like "name_randomcode" eg: name_123z, name_321x, etc ..
  23. php code to create multiple pages : if ($input->post->submit) { $amount = count($input->post->field_1); for($i=0;$i<$amount;$i++) { $p = new Page(); $p->template = "template_1"; $p->parent = wire('pages')->get("/parent_1/"); $p->title = $input->post->field_1[$i]; $p->name = $input->post->field_1[$i]; foreach ($input->post->field_2 as $result) { $p->text.= $result." "; } $p->save(); } } html code : <tr> <td><input type="text" name="field_1"></td> <td> <select name="field_2[]" multiple="multiple"> <option value="opt_1">opt_1</option> <option value="opt_2">opt_2</option> <option value="opt_3">opt_3</option> </select> </td> </tr> <tr> <td><input type="text" name="field_1"></td> <td> <select name="field_2[]" multiple="multiple"> <option value="opt_1">opt_1</option> <option value="opt_2">opt_2</option> <option value="opt_3">opt_3</option> </select> </td> </tr> ... and another <tr>..</tr> addition using javascript There is off course incorrect value on field_2, they will contain same data get from field_2 on first row. Have try on google search and not found any solution yet, there are talk about multi-dimensional array but still not understand how to implement that.
  24. Thanks a lot @teppo and @adrian I ended up with @teppo's way using selector string, and using check_access=0 (just knew this) works like expected !
×
×
  • Create New...