Jump to content

mel47

Members
  • Posts

    362
  • Joined

  • Last visited

Everything posted by mel47

  1. Yeah, sure. $odd = ''; $even = ''; foreach ($page->plus as $key => $projet) { if ($key % 2) { $even .= "some html code : A"; } else { $odd .= "some html code (not the same) : B"; } } $content .= $odd; $content .= $even; But I end up with B, B, B, A, A, A I want B, A, B, A, B, A. I'm close, but not exactly what I need. I understand why, but I don't where add $content. Do I need an other loop at the end? Or it shouldn't be a if/else? Thanks
  2. Hi, I need to print in alternation a different markup such as : Markup1 for item 1 Markup2 for item 2 Markup1 for item 3 Markup2 for item 4 I tried different versions since I was thinking having found solution on previous posts, but it didn't do as I want. Or it print a class odd-even in a div or print the same markups but reordering as item 1, 3, 5, 2, 4, 6. Thanks! Mel
  3. Hi, I just wanted to update to 3.0.168 (from 3.0.156). I get this error. I'm not enough into core's code to know if the problem is related to the module or the core. I also found this issue that seems similar. Thanks! Mel
  4. Hello, I use this the Menu builder module. Easy and works very well. I'm also using bulma and was able to it without problem.
  5. Hello @MoritzLost Found a bug. If you let empty "body" in config, I get this error. Put any text and problem solved. Except that, everything working fine so far! Thanks.
  6. Oups, too newbie with Trello... but it do what I wanted!
  7. Thanks! Got it! Put it here if someone needed. const ADDED_BOARD = ''; //put here the id as previously described by MoritzLost $this->pages->addHookAfter('publishReady', function(HookEvent $event) { $processor = $event->object; $page = $event->arguments('page'); if($page->template != 'content') return; $TrelloWire = wire('modules')->get('TrelloWire'); $TrelloWireApi = $TrelloWire->api(); $card = $TrelloWire->buildCardData($page); if ($card->id) { $TrelloWireApi->moveCard($card->id, ADDED_BOARD); $page->message($this->_('Moved Trello card to "Added" Board')); } }); Mel
  8. Hi Thanks for the answer. For now, I was able to create the button for existing pages. However I'm stuck with triggering after publishing a page. I want to move to a different list. I'm there now, but I'm missing the part concerning retrieval of the lists. I tried different things but no success, I'm still learning hooks and API, I don't understand everything... $this->pages->addHookAfter('publishReady', function(HookEvent $event) { $processor = $event->object; $page = $event->arguments('page'); if($page->template != 'content') return; $TrelloWire = $processor->wire('modules')->get('TrelloWire'); $card = $TrelloWire->buildCardData($page); $TrelloWire->moveCard($card->id, ?????); }); Thanks for any help Mel
  9. Oh wow! I discovered Trello just last week (yes, more free time during lockdown...). We were planning to use it as a project management tool for my (non-tech) team to enriched the content of the website (yes, again, lockdown...). Basically, I created some lists : "to do", "done", "added to website". The module will allow me to create the page (unpublished) with an automated checklist (text, image, translations), so people will choose one card, assign to self and work on the subject. When everything will be checked, they will move to "done", until I added the new content to the website (I'm the only one having backend access and I want it stay like this). So for now, it's working. And I like the fact I could add some automatic text without having to copy manually. Could I ask something? I'm not sure I understand what is wirePopulateStringTags Do I can use this to pull out the creation date or the child pages? Can it could be possible to add a trigger on "publishing" a page in status change handling? And last question. I guess via a hook, I should be able to create a button to automating card creation for existing pages? Thanks a lot! Mel
  10. Thanks again. Solve my problem. Have to write french_Canada in C. Let's see what it the next thing that will not work... ?
  11. Thanks for quick answer. Unfortunately I don't have control on those decisions, I even strongly suggested my hosting I used since years for my own PW's site, but it was not the final choice. It works. For now I only discover a problem with date translation, related to setlocale, but couldn't find exactly what I should do. Still trying different version. I had fr_CA.UTF-8 in "C" translation. Mélanie
  12. Hi, I'm a little discouraged. The non-profit organisation for which I develop the website decided to move from a (bad) apache server to a windows server they have access for free. But I never worked with IIS, and I'm not sure how to pursue. I have for now 404 pages due to absence of rewrite. For sure, I read this pivotal post from @matjazp with the attached web.config file. But it was in 2016, probably with PW 2.x. My question is : can I still use this file? I'm on windows server 12 R2, PW 3.148, with procache (i guess the module the most related to rewrite rules). Thanks Mel
  13. Hi How I could find the version of the core if I only have the wire folder? My host have some problems and I can't access to admin backend for now. I need to know which version of core is currently installed. Thanks Mélanie
  14. Thanks @gebeer, I tried your module and it works really well. I was wondering if someone have an idea of a php code to fallback from ImageReferenceField to ImageField. I need to keep my "normal" images field in case I need to upload new images (and anyway I have too much images already uploaded to use exclusively ImageReference). Thanks
  15. OMG, my dream come true! ???I will use for sure multi form pages! And I will be able remove pages used for a simple yes/no! Thanks so so so much!
  16. Thanks everyone, but especially @LostKobrakai. This "owner" selector is wonderful! So for the sake of people searching on forum, it give this so simple selector: $CategUsed = $pages->find('categ.owner.template=activity'); Mel
  17. Hi, I have difficulty to find the good selector. Home ----Categories ------------categ -----Activities ----------activity (with a pageref to categ) I create a search form with multichoice to listing all categories ($categ = $pages->find("parent.id=1057, sort=title")). However, some categories are currently not used and I don't want them to be listed. How I can modify my selector the more efficient way? I was thinking of searching categories in all activity's pages and recreate the array. Or exclude pages category without references to them. Or something else simpler I don't know?? Thanks Mel
  18. Hi, I have a recurrent problem of an error " 'MarkupGoogleMap' was used before it was defined. ". In some browser, the map display correctly but in some (IE) it just doesn't work. I put the code in a JS validator, and I have the same error, but I don't know why and what I'm supposed to do, since I didn't play with this JS code. I also have " Expected 'mgmap1' at column 1, not column 37. " Thanks, Mel
  19. Hi, I'm wondering how unpublished (or hidden) pages could "disappear" from the menu, without having to remove it from the menu? The context : I have some pages in menu. My user need to unpublished a page not necessary for a temporary period. But it's not automatically removed from the menu. I now deleted from the menu, but I'm quite sure than she will want to re-published it, she will call me because it will not be present in the menu. (I gave her permissions on menu but if I could avoided to touch too much those settings, I will be happy... Anyway, in theory she shouldn't have to modify anything on that module on regular basis). Thanks Mel
  20. Hi I have a sudden problem for pdf creation. Do I just have to increased memory? I change recently PHP version to 7.1, I don't know if it's related. However, my developpement server is 7.2 and I don't have this error. Thanks Allowed memory size of 33554432 bytes exhausted (tried to allocate 176128 bytes) search► File: .../httpdocs/site/modules/WirePDF/WirePDF.module:76 76: require_once(\ProcessWire\wire('files')->compile(dirname(\ProcessWire\wire("config")->paths->root . 'site/modules/WirePDF/WirePDF.module') . '/mpdf/mpdf.php',array('includes'=>true,'namespace'=>true,'modules'=>false,'skipIfNamespace'=>false)));
  21. Solved. Had to return in PHP7.1 because zlib is "on" instead of "off" on my server when set to PHP7.2.
  22. Hi, New problem but I'm quite sure it was not there before, but I don't know since when. I upgrade to last version 1.1.1 but didn't help. I get this error. The grids (more than 1 with different queries) appear with "loading" but nothing happens. Error is from Chrome, but same one in Firefox. (index):2 Uncaught SyntaxError: Unexpected token W in JSON at position 1 at JSON.parse (<anonymous>) at XMLHttpRequest.xhr.onreadystatechange (RockGridItem.js?t=1550464515:271) Thanks
  23. Hello, Thanks for your module, it does exactly what I wanted without complication. However, have 1 question/suggestion. Since I will not be the one that will fill the documentation, I gave permissions to modify help-doc to my admin users. It works well, if they created the page from the tree hierarchy. However from admin menu, the "create doc" button and "edit" link will not appear. Looking to your code, only superuser will saw those. Could I override ride this without modifying directly in code? I guess adding a permission "admin-helper" could solve this? Thanks Mel PS For now I commented lines 91, 108, 127 in ProcessAdminHelp.module and solved my problem but I guess it's not the better way... ?
×
×
  • Create New...