Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by mel47

  1. Sorry to come back again on the subject, but does someone have an idea why we can't see data if we are logged as admin? Before (unfortunately, don't remember which PW version it was), it was displaying correctly. I'm willing to modify anything : role, permission, module to get it working. I just want to avoid to give super-admin rights. Thanks Mel
  2. Thanks for answer. Honestly for now, as I said RockGrid perfectly fit my needs. Here the JS error (appearing only to non super-admin users): Uncaught SyntaxError: JSON.parse: unexpected keyword at line 1 column 1 of the JSON data onreadystatechange http://localhost/dev/site/modules/FieldtypeRockGrid/RockGridItem.js?t=1635649449:290 getAjaxData http://localhost/dev/site/modules/FieldtypeRockGrid/RockGridItem.js?t=1635649449:288 init http://localhost/dev/site/modules/FieldtypeRockGrid/RockGrid.js?t=1635649449:188 init http://localhost/dev/site/modules/FieldtypeRockGrid/RockGrid.js?t=1635649449:223 initGrid_suivi_org http://localhost/dev/admin/gestion24h/suivi/organismes/:290 <anonymous> http://localhost/dev/admin/gestion24h/suivi/organismes/:301 RockGridItem.js:290:31 onreadystatechange http://localhost/dev/site/modules/FieldtypeRockGrid/RockGridItem.js?t=1635649449:290 (Asynchrone : EventHandlerNonNull) getAjaxData http://localhost/dev/site/modules/FieldtypeRockGrid/RockGridItem.js?t=1635649449:288 init http://localhost/dev/site/modules/FieldtypeRockGrid/RockGrid.js?t=1635649449:188 init http://localhost/dev/site/modules/FieldtypeRockGrid/RockGrid.js?t=1635649449:223 initGrid_suivi_org http://localhost/dev/admin/gestion24h/suivi/organismes/:290 <anonyme> http://localhost/dev/admin/gestion24h/suivi/organismes/:301 Mel
  3. Hi @bernhard I have a question. I used RF1 and RockGrid. I saw both are deprecated. Since for now, it suits my needs coupled to a lack of time to rewrite my queries, I don't really want to convert to RF3. But I now do need to show data to admin users (and not just superadmin). Currently the table, in a custom admin page, just show "loading". Can I kindly ask how I can display data my users? Sub-question : if rockgrid is deprecated, what else I should use? Thanks Mel
  4. Hi, I have this working line to find a specific image. $banniere = $pages->get(1)->images->findTag('banniere')->getTag($user->language->name); But now, I want to add getRandom(). I tried different versions $pages->get(1)->images->findTag('banniere')->getTag($user->language->name)->getRandom() $pages->get(1)->images->getRandom()->findTag('banniere')->getTag($user->language->name) but always received this error : Method Pageimage::getRandom does not exist or is not callable in this context. Is it compatible? How I can do that? Thanks! Mel EDIT : solved by myself. Error I commonly do, mixing up get() and find()... Sorry for the disturbance. $banniere = $pages->get(1)->images->findTag('banniere')->findTag($user->language->name)->getRandom();
  5. Hi, Thanks for your module. It works really, maybe too much! 😉 I'm wondering if there a way I can limit to the first occurrence of a link in a page by a hook or something. I like the automatic behavior of the module, however I have pages where I repeat the same word each 2-3 sentences, rendering the paragraph looks as a big link to the same page. Thanks Mel
  6. Hi, I'm not sure this will solve my problem. If I understand, your module will print og, but I want to do the opposite : grab og from a link. Correct me if i'm wrong, Mel
  7. mel47

    Hanna Code

    Hi, I know this module have not changed since many years, but could I suggest to add a description for each Hanna code? I come back to my setup page and have some codes that I didn't update since years and I don't know why/where they used through my website. I would like to have written a small description. Yes, you could tell me I should have written comments in the code itself, and it's what I would do starting from now... 🙄 But something on the setup page will be faster to read. Thanks!
  8. Hi, I have a really basic question, since I'm not sure in which direction I should search. I want to replicate the behavior we see on social media : the url preview of a website but on my PW site. I guess it should be related to opengraph, but in the other way around. However, I found a lot of information about implementation opengraph metatags, but it's always about adding metadata on your website, not scraping them and displayed them. Someone have pointers to help me to find how I could do that? (I also search for a module but didn't find, but I'm not sure I searched with the good keywords). Thanks!
  9. Hi, I have a strange question. I embed twitter link without problem, but the rendering is in spanish (and I tried many links with the same result). Believe me, I have absolutely nothing set to this language on my computer (either PW, or twitter cookie or anything). Have an idea how to revert back this to my language? Thanks Mel
  10. @adrian Forget that, I messed up. I was thinking pages shouldn't be created by API if this option was checked. I created a hook to solve my problem. But maybe you can help me. Which hook I should used? I tried different versions but the most working one is addHookAfter('saveReady'), but I need to re-save each page. I would like the hook worked either if I created a page via BCE or create/save from admin. My hook is to check if the page exist in the pageRef field, if so copy in an other pageRef field, if not do nothing. Thanks
  11. Hi, Question: when adding using BCE, is it attended behavior to create a page (in a pageRef field) even if this field doesn't allow it (unchecked like in image)? If yes, how I can prevent it? Thanks!
  12. Hi, Thanks for your module. I have a question. Does it have a way to sync already existing relationships? Just saving again the page doesn't seems to work, I have to remove and re-add the value. Thanks!
  13. 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
  14. 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
  15. 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
  16. 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.
  17. 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.
  18. Oups, too newbie with Trello... but it do what I wanted!
  19. 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
  20. 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
  21. 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
  22. Thanks again. Solve my problem. Have to write french_Canada in C. Let's see what it the next thing that will not work... 😉
  23. 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
  24. 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
  • Create New...