Jump to content

loukote

Members
  • Content Count

    39
  • Joined

  • Last visited

Everything posted by loukote

  1. This sounds like a solution that would work. I still wonder whether it is the way to go as i creates a dependency elsewhere, thus a need for a proper documentation. And also because the impacted template is a system template... Anyway, thank you @Robin S.
  2. In a template i need to find all pages with a full name but the stored data is first name and surname. So from the doc it seams this module will not help (" you cannot directly query a Concat field from $pages->find(), for example."). As i don't know where to ask, i dare to ask here: is there a way to achieve the above by some PW magic, something like concatenation of fields $pages->find('concat("firstname surname")='.$fullname), where $fullname could be for example "Paul van Ripper" so guessing where the surname starts would inevitably lead to mistakes.
  3. Edit: OK, this was a bit hidden but actually related to what i believed it was not: in the module the setting was set to require the username, not the email. Thus the replacement from an ampersand to a dash. _______________________ Hi, When attempting to reset their passwords, the users receive the email with the reset-password link only sometimes. The logs show the email addresses supplied. Many of them appear to have the ampersand replaced by a dash. Somewhere above there is a question about cases where an ampersand is replaced by a dash but that part of the thread concern sign-up of a new user and so appears irrelevant to my problem. I was not lucky either by searching this site or elsewhere. Would any of you know why and how, or have an idea that would help?
  4. Hello, is it possible to have rich-text allowed in the form (including wysiwyg buttons) and output formatted by the comments module? Similarly as it in this form. I tried to look in the doc and the forum but either no one is interested, or i'm searching for wrong keywords... Thanks!
  5. Hi, I'm missing text formatting. To start with at least the most simplistic: new lines should be respected. The replies can't be edited. Or if so, then the link is very hidden 😉 Other than that: very useful!
  6. @David Karich , very useful, thanks! I mainly appreciate that there is no need to modify the template. Above you mention the ProCache module. Do I understand correctly that the counting will work correctly even with the standard PW template cache mechanism? One helpful feature would be the ability to display the page hits in the page tree only for given roles, that is using permissions. The reason behind is not secrecy but cleanliness, no clutter. Regards! ~loukote
  7. @Robin S This will help, thanks for the lesson!
  8. Perfect, thanks! Would you know whether there is a way to set the default order to other than by username?
  9. Hello @ffub, it looks like the field ORGANIZER required by the method PUBLISH (used by this module) is missing. More in the description of the protocol: https://tools.ietf.org/html/rfc5546.html#section-3.2.1 One picky android app complains and a validator confirms...
  10. @Autofahrn , one interested user here 🙂
  11. Hi @pwFoo any plans for two-factor authentication so as in the back-end login using the TFA module?
  12. @Robin S, off course it works. Sorry – i did not include it among the textformatters. When rechecking why and re-reading the installation notes, I did not misunderstood the sentence "Add the Remove Blocks textformatter to one or more fields.", thinking that it refers to the use, the curly braces. Thanks for your help!
  13. @diogo, a late take on your HannaCode into one that returns a series of thumbnails, possibly limited from N to N+J, for the current or another page, in a <div> to be used with a lightbox of a kind (ready for MagnificPopup). Here is the code for reference: !HannaCode:gallery:eyJuYW1lIjoiZ2FsbGVyeSIsInR5cGUiOiIyIiwiY29kZSI6IlwvKmhjX2F0dHJcbnA9XCIwXCJcbm49XCIwXCJcbmk9XCIwXCJcbmhjX2F0dHIqXC9cblwvXC8gQmFzZWQgb24gdGhpcyBwb3N0OiBodHRwczpcL1wvcHJvY2Vzc3dpcmUuY29tXC90YWxrXC90b3BpY1wvMTE4Mi1tb2R1bGUtaW1hZ2UtdGFnc1wvP2RvPWZpbmRDb21tZW50JmNvbW1lbnQ9NDAwMTVcblxuJG15UGFnZSAgICAgPSAkcCA/ICRwYWdlcy0+Z2V0KCRwKSA6ICRwYWdlO1xuJGZpZWxkTmFtZSAgPSAkbXlQYWdlLT5maWVsZHMtPmdldCgndHlwZT1GaWVsZHR5cGVJbWFnZScpO1xuJG15RmllbGQgICAgPSAkbXlQYWdlLT4kZmllbGROYW1lO1xuXG4kaW5kZXggICAgICA9ICRuIC0gMTtcbiRpbWFnZXMgICAgID0gJyc7XG5cbmlmKCRteUZpZWxkIGluc3RhbmNlb2YgUGFnZWltYWdlcyl7XG4gICAgaWYoJG4gJiYgJGkpe1xuICAgICAgICBcL1wvIElmICRuIGFuZCAkaSBkZWZpbmVkLCBpdGVyYXRlIGZyb20gJG4gZm9yICRpIHRpbWVzIGFuZCByZXR1cm4gdGhlc2UgKHdpdGggYSBsaWdodGJveC1saWtlIGdhbGxlcnkgaW4gbWluZClcbiAgICAgICAgZm9yICgkaiA9ICRpbmRleDsgJGogPD0gKCRpbmRleCArICRpIC0xKTsgJGorKykge1xuICAgICAgICAgICAgJGltYWdlID0gJG15RmllbGQtPmVxKCRqKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKCAhKCRpbWFnZSBpbnN0YW5jZW9mIFBhZ2VJbWFnZSkgKSBjb250aW51ZTtcbiAgICAgICAgICAgIFxuXHRcdCAgICAkdGh1bWIgPSAkaW1hZ2UtPnNpemUoMjIwLDE0Nyk7XG5cdFx0ICAgICRsYXJnZSA9ICRpbWFnZS0+d2lkdGgoMTAwMCk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIFwvXC8gc2FtZSBhcyBpbiBfZnVuYy5waHAgPiByZW5kZXJBdHRhY2hlZEltYWdlcygpIDogXG4gICAgICAgICAgICAkaW1hZ2UgPSBcIjxkaXYgY2xhc3M9J2NvbHVtbiBwb3B1cC1nYWxsZXJ5LWl0ZW0nPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGhyZWY9J3skbGFyZ2UtPnVybH0nIGNsYXNzPSdhbGlnbl9sZWZ0JyB0aXRsZT0neyRsYXJnZS0+ZGVzY3JpcHRpb259Jz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGltZyBzcmM9J3skdGh1bWItPnVybH0nIGFsdD0neyRpbWFnZS0+ZGVzY3JpcHRpb259Jz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSd0ZXh0LWNlbnRlcic+eyRpbWFnZS0+ZGVzY3JpcHRpb259PFwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxcL2E+XG4gICAgICAgICAgICAgICAgICAgICAgICA8XC9kaXY+XCI7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgICRpbWFnZXMgLj0gJGltYWdlO1xuICAgICAgICB9XG4gICAgfVxuICAgIFxufSBlbHNlIHtcbiAgICAkaW1hZ2VzID0gXCJcIjtcbn1cblxuaWYgKCRpbWFnZXMpICRnYWxsZXJ5ID0gXCI8ZGl2IGNsYXNzPSdwb3B1cC1nYWxsZXJ5IHJvdyBtZWRpdW0tdXAtMyBzbWFsbC11cC0yJz5cIi4kaW1hZ2VzLlwiPFwvZGl2PlxcbjxkaXYgc3R5bGU9J2NsZWFyOmJvdGg7Jz48XC9kaXY+XFxuXCI7XG5lY2hvICRnYWxsZXJ5OyJ9/!HannaCode Thank you for the inspiration!
  14. @Robin S Hi Robin, could it be that this module (that i would really like to use!) does not work on multi-lingual installations?
  15. When the page is displayed directly via its own template, languages switch as expected, that is correct title and body are displayed. Only when accessing them through $pages->find( $selector ) the language switching somehow fails. So nothing to see with bd($page->title); On the other hand, Tracy (discovering: it's great!) shows the result of bd($items); (Somehow i do not see a better way to dump it here.) The URL is there but i still need to understand how to display the body and title. So far so good, the family is calling...
  16. @tpr , thanks for offering help! Which full object? bd($page); ? I'm new to Tracy debugger and do not know how to export the result in a manner that would be readable. The template is as follows: <?php namespace ProcessWire; // basic-page.php template file // Primary content is the page's body copy $content = $page->body; // List all news $section_title = $pages->get('id='.$section_name_id)->title; $limit_news_to_subsites_string = ", Publish_in*=".$section_title; $selector ="template=news_entry, sort=-created" . $limit_news_to_subsites_string; $items = $pages->find( $selector ); $item_nr = 0; foreach($items as $item){ $item_nr++; $news_entry = renderNews($item, $item_nr, true, false, 'full', $user); // Output this piece of news $content .= "<div class='news_entry'>".$news_entry."</div>\n"; } When the language is either French or German, the counter $item_nr==0, for English and Luxembourgish it is ==1 or more, depending on the number of test news items. I tried to activate and deactivate the languages on news/item pages (items to be displayed) and the news page itself (the one that should list them all). No change. The only difference i see is on the admin panel: the languages that return news items do have a drag-and-drop icon and text (lb), not those that return zero news items (de). But this likelu has something to do with the language packs: for FR and DE there is one, for LB there is none.
  17. Sorry, the template used find(), not get(). So it's something else. PW is 3.0.110, upgraded to PW 3.0.111 results in the same behavior. Standard pages work fine. Only the news-list page where subpage are pulled through the api (first $pages->find(), then foreach() ) behaves this way (counts/returns a number of items for some languages and none for others). This is the case whether the field (title, body) is translated or not. is there a way in the api to check whether a page language is active?
  18. Dear forum members, I'm facing the following issue: on a website with multi-language support, there is a template having a multi-language title, ML body and few more fields. The "parent" template looks for pages (news items) using a selector: $pages->get("template=news_entry, sort=-created, Publish_in*=main") The selector does not change with the language. The page (and it's parent) have the multi-language support enabled. The pages (parent getting the pages using the above selector and the "news entry") have the cache disabled and the languages active. Now the problem: a test news entry shows up (selector finds a page) in the default language and one other, it does not show up in two others. The one non-default in which it shows up was installed later. I went through the documentation but I'm blank on what needs to be checked. Would you have any ideas on what needs to be corrected or checked? I would really appreciate!
  19. @ffub Thanks for the module! To make it work as an export of one event (to be inserted in a calendar), the X-WR-CALNAME needs to be optional. See https://stackoverflow.com/questions/9212329/ical-import-creates-new-calendar-when-open-the-ics-file#9384896
  20. @Zeka @darrenc Each si te has its own strategies when it comes to FU. Common to them is the use of roles to decide which block should have what content. This is an argument that supports caching for logged in users is only useful per role, not for all together. Having a similar issue with a website I'd be interested in a solution if it exists.
  21. Tom, thanks. That's one of the things that I tried, despite the fact that it was empty. Filled in, saved, emptied again. Nothing...
  22. Hi, For testing, i've filled field Visibility > Show this field only if with a selector that had a typo. Now, despite the fact that the field is blank and that there is no override in the template that uses it, the selector somehow lives in the template and causes an error when a page with the template is saved. So far i checked to make sure that the override is not causing the issue (blank so as the input of the field itself) and filled both with something else (id=1), saved the field and the template again and cleared caches (setup > cache admin). So i seek your kind help to get rid of it. (Here is the backtrace:) ProcessWire: ProcessPageEdit: Unknown Selector operator: '==' -- was your selector value properly escaped? field='1', value='3', selector: '1==3' DEBUG MODE BACKTRACE ($config->debug == true): #0 /mnt/data/accounts/l/lama/data/www/wire/core/Selectors.php(439): ProcessWire\Selectors->create('1', '==', '3') #1 /mnt/data/accounts/l/lama/data/www/wire/core/Selectors.php(159): ProcessWire\Selectors->extractString('1==3') #2 /mnt/data/accounts/l/lama/data/www/wire/core/Selectors.php(145): ProcessWire\Selectors->setSelectorString('1==3') #3 /mnt/data/accounts/l/lama/data/www/wire/core/Selectors.php(125): ProcessWire\Selectors->init('1==3') #4 /mnt/data/accounts/l/lama/data/www/wire/modules/Inputfield/InputfieldForm.module(193): ProcessWire\Selectors->__construct('1==3') #5 /mnt/data/accounts/l/lama/data/www/wire/modules/Inputfield/InputfieldForm.module(149): ProcessWire\InputfieldForm->processInputShowIf(Object(ProcessWire\WireInputData), Array) #6 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(383): ProcessWire\InputfieldForm->___processInput(Object(ProcessWire\WireInputData)) #7 /mnt/data/accounts/l/lama/data/www/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___processInput', Array) #8 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\InputfieldForm), 'processInput', Array) #9 /mnt/data/accounts/l/lama/data/www/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module(1493): ProcessWire\Wire->__call('processInput', Array) #10 /mnt/data/accounts/l/lama/data/www/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module(1493): ProcessWire\InputfieldForm->processInput(Object(ProcessWire\WireInputData)) #11 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(383): ProcessWire\ProcessPageEdit->___processInput(Object(ProcessWire\InputfieldForm)) #12 /mnt/data/accounts/l/lama/data/www/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___processInput', Array) #13 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessPageEdit), 'processInput', Array) #14 /mnt/data/accounts/l/lama/data/www/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module(1356): ProcessWire\Wire->__call('processInput', Array) #15 /mnt/data/accounts/l/lama/data/www/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module(1356): ProcessWire\ProcessPageEdit->processInput(Object(ProcessWire\InputfieldForm)) #16 /mnt/data/accounts/l/lama/data/www/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module(409): ProcessWire\ProcessPageEdit->processSave() #17 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(380): ProcessWire\ProcessPageEdit->___execute() #18 /mnt/data/accounts/l/lama/data/www/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___execute', Array) #19 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessPageEdit), 'execute', Array) #20 /mnt/data/accounts/l/lama/data/www/wire/core/ProcessController.php(244): ProcessWire\Wire->__call('execute', Array) #21 /mnt/data/accounts/l/lama/data/www/wire/core/ProcessController.php(244): ProcessWire\ProcessPageEdit->execute() #22 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(380): ProcessWire\ProcessController->___execute() #23 /mnt/data/accounts/l/lama/data/www/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___execute', Array) #24 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessController), 'execute', Array) #25 /mnt/data/accounts/l/lama/data/www/wire/core/admin.php(113): ProcessWire\Wire->__call('execute', Array) #26 /mnt/data/accounts/l/lama/data/www/wire/core/admin.php(113): ProcessWire\ProcessController->execute() #27 /mnt/data/accounts/l/lama/data/www/wire/modules/AdminTheme/AdminThemeDefault/controller.php(13): require('/mnt/data/accou...') #28 /mnt/data/accounts/l/lama/data/www/site/templates/admin.php(15): require('/mnt/data/accou...') #29 /mnt/data/accounts/l/lama/data/www/wire/core/TemplateFile.php(268): require('/mnt/data/accou...') #30 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(380): ProcessWire\TemplateFile->___render() #31 /mnt/data/accounts/l/lama/data/www/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___render', Array) #32 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\TemplateFile), 'render', Array) #33 /mnt/data/accounts/l/lama/data/www/wire/modules/PageRender.module(514): ProcessWire\Wire->__call('render', Array) #34 /mnt/data/accounts/l/lama/data/www/wire/modules/PageRender.module(514): ProcessWire\TemplateFile->render() #35 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(383): ProcessWire\PageRender->___renderPage(Object(ProcessWire\HookEvent)) #36 /mnt/data/accounts/l/lama/data/www/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___renderPage', Array) #37 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\PageRender), 'renderPage', Array) #38 /mnt/data/accounts/l/lama/data/www/wire/core/WireHooks.php(782): ProcessWire\Wire->__call('renderPage', Array) #39 /mnt/data/accounts/l/lama/data/www/wire/core/WireHooks.php(782): ProcessWire\PageRender->renderPage(Object(ProcessWire\HookEvent)) #40 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Page), 'render', Array) #41 /mnt/data/accounts/l/lama/data/www/wire/modules/Process/ProcessPageView.module(205): ProcessWire\Wire->__call('render', Array) #42 /mnt/data/accounts/l/lama/data/www/wire/modules/Process/ProcessPageView.module(205): ProcessWire\Page->render() #43 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(383): ProcessWire\ProcessPageView->___execute(true) #44 /mnt/data/accounts/l/lama/data/www/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___execute', Array) #45 /mnt/data/accounts/l/lama/data/www/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessPageView), 'execute', Array) #46 /mnt/data/accounts/l/lama/data/www/index.php(55): ProcessWire\Wire->__call('execute', Array) #47 /mnt/data/accounts/l/lama/data/www/index.php(55): ProcessWire\ProcessPageView->execute(true) #48 {main}
  23. @abdus That's exactly what i supposed, tried, and what did not work. Try to call from that template code a function defined in _func.php...
  24. @abdus inclusion works, the issue with the function that seems not being defined in what is the current scope. Surely something due to my lack of understanding.
×
×
  • Create New...