Jump to content

kongondo

PW-Moderators
  • Content Count

    5,998
  • Joined

  • Last visited

  • Days Won

    98

Everything posted by kongondo

  1. That's what @elabx said! :-) 😁😁 Good to see you (again) as always πŸ˜‚.
  2. @elabx was right :-) Here't two ways in addition to @dragan's above: Method 1: Call Hanna inside your function function SomeFunction(){ $out ="<div>"; // hanna in here $hanna = wire('modules')->get('TextformatterHannaCode');// @note: wire! $out .= $hanna->render("[[hello]]"); $out .="</div>"; return $out; } $out = SomeFunction(); echo $out; Method 2: Pass your function an argument/parameter with Hanna rendered output $hanna = $modules->get('TextformatterHannaCode'); $hannaString = $hanna->render("[[hello]]"); function SomeFunction2($string){ $out ="<div>"; // hanna in here $out .= $string; $out .="</div>"; return $out; } $out = SomeFunction2($hannaString); echo $out;
  3. Great! I am glad it got resolved!
  4. @Ben Sayers, I hope you can forgive my 'ineptitude'. I have been royally swamped. I tried to install Jumplinks but was inundated with the errors reported by others above, so I gave up on that. Anyway, that was just for testing redirects. My solution below, since Jumplinks isn't working for me (I tried all the way back to version 1.5.50), is to use ProcessWire session redirects. I don't know what that means for you in respect of SEO. I hope I am not polluting Jumplinks' support forum but I need to offer a bit of an explanation. The template blog-posts has URL segments enabled. If you visit: domain.tld/blog/posts/an-existing-post/ ProcessWire successfully resolves that since 'an-existing-post' exists. In other words, 'an-existing-post' is not considered a URL segment. If you visit: domain.tld/blog/posts/non-existent-post/ the URL does not resolve to an existing post. ProcessWire knows that and considers 'non-existing-post' to be a URL Segment. However, since we have URL segments enabled in blog-posts, ProcessWire lets us deal with the situation. We do this in blog-posts template file. I don't know how Jumplinks works but I assume if we threw a 404 error, it will pick up on that and redirect to our desired URI. Again, I am just guessing here. However, since Jumplinks did not work for me, I suggest the following (session redirect), even as a temporary measure. You can try the 404 option to see if it works. Please report back, thanks. At the top of your blog-posts template file, insert the following, just above your first include: if($input->urlSegment1) { // @todo: test this with Jumplinks. In that case, comment out "session" code below //throw new Wire404Exception(); // redirect to main blog page. if using this, comment out 404 exception code above $session->redirect('/blog/'); } include('./_head.php'); // include header markup I hope this helps. Apologies again for the delay.
  5. Hi @Ben Sayers. Actually, yes, I have. I was to write something earlier this week but didn't get time to get to it. I have two suggestions. Could I please get back to you here over the weekend? Thanks.
  6. I edited this to read "posts" NOT "post" to avoid further confusion πŸ˜ƒ. I think the key is in what @teppo stated above: Your blog-posts template (file) is not throwing a 404 exception for the missing (deleted) posts. I am not sure whether manually throwing a 404 will resolved the issue but I am sure the other guys will have better knowledge of this. Meanwhile, please show us the contents of your blog-posts template file.
  7. @teppo, @Ben Sayers, Given my conversation with Ben in the blog module forum and given the correction made therein (?what?) and given Teppo's suspicion of URL Segments, I now wonder whether Ben's issue has to do with the term 'blog' at all. I suspect it is the 'posts' in the URL Segment since the posts templates utilises URL Segments as I listed above. Edit: for clarification, Ben's correct address to the blog posts, is, f.ex. domain.com/blog/posts/some-post/
  8. Please confirm this. According to your post here: it seems your posts are structured as: (domain.com/blog/some-post/). This would make it a Blog Style 2 and not Blog Style 1 which would be structured as: /domain.com/blog/posts/some-post/
  9. Blog has only one hook, used in the backend, limited to save of a single blog post (addHookAfter) to set its blog published date (@note: this is NOT the PW published field but the blog pages date field) The following blog templates have URL segments enabled: Blog Archives (blog-archives) [virtual parent of blog archives; virtual since no real children; works becaue of URL Segments] Blog Authors (blog-authors) [virtual parent of blog authors; can also display multiple authors] Blog Comments (List) (blog-comments) [virtual parent of blog comments; can also display multiple comments] Blog Posts (blog-posts) [parent of posts; can also display all posts] Blog Tag (blog-tag) [a single blog tag] Cross-reference
  10. Hi @Ben Sayers, Sorry for the late response. I have never used Jumplinks before. I have read the posts you link to but cannot think of any reason why the blog module would be the cause of the issue. In addition, @wbmnfktr seems to have successfully tested blog and Jumplinks, so it must be something else in your install. However, in your post you say: What do you mean by removed? Secondly, what 'blog style' did you use on install?
  11. Thanks @Jens Martsch - dotnetic! Excellent write-up. You've sort of answered the question. What I meant was if you had images and such would they still live under /public? Thanks. I thought the integration would have required to point to a different index.xxx (maybe an index.php) file inside ModulesManager2's folder. Good to know this is not the case. I suppose then that the API endpoint in ModulesManager2 is execute()? A lot! Thanks.
  12. Hi @gornycreative, Apologies for the late response. I've only just seen your post. Interesting thoughts there, many thanks. Although there are no current plans to take Padloper in the direction of the product you've described, I'll keep your thoughts in mind. Many thanks.
  13. Hi @MateThemes, Unfortunately there will be a bit of a delay due to some unforeseen circumstances. It could be winter before we see the first release.
  14. Hi @jens.martsch, This looks awesome! Even without the todo list, this is a huge improvement to the current way of installing and searching for modules. I really like the listing of modules. Some quick questions: Why call it Modules Manager 2? Why not just ModulesManager? I might have missed it; Is it possible to read/find modules that have been moved physically to the modules folder on one's site but have not yet been installed? This will cater for modules that are not online in ProcessWire's module's directory Great work! PS: Nice overview video, btw!
  15. Variations 002 (released 16/09/2019) Happy to announce the latest release of Variations. Changelog ProcessWire 3.x support only. New GUI to match AdminThemeUiKit Save and exit or save and add more variations configuration or attributes (in modal) More granular control of custom column types and definitions: DECIMAL, FLOAT, DOUBLE, TINYINT, INT, VARCHAR, TEXT, DATETIME, TIMESTAMP, BOOLEAN, etc Decimal type better suited for price data compared to Float/Double Boolean type, useful for Yes/No type data, e.g. for sell out of stock? yes/no Datetime/Timestamp fields if required. Column definitions: null, precision, scale, length, default value, etc. Required fields: if column is not nullable and no default provided, it becomes a required field. E.g. can set price not to be null. Default fields: For uses such as prefixing SKU- Apologies that this has taken a while to update. Upgrading If upgrading from version 001, ProcessWire's Filecompiler will fight you. You might get errors such as Class ProcessVariations not found in file..... If you get such errors, first, try to clear your cache and compiled files several times. As a last resort, if clearing cache doesn't work (and I don't like this workaround), temporarily change the code in the offending file, e.g. in VariationsRender.php, where it says class VariationsRender extends ProcessVariations, change that to class VariationsRender extends WireData. Refresh the modules page until the errors disappear, then revert back to the original text (class VariationsRender extends ProcessVariations). I hate to ask you to do this but I've had it with the Filecompiler. Documentation Documentation can be found here. However, it still needs updating to reflect latest changes outlined above. For now, please note that we've added an extra setting for setting the default date and time formats for datetime/timestamp custom columns/subfields. This is available in the Input Tab of the field. Screenshots Thanks!
  16. Maybe rtrim can work as well? or that and mb_string? E.g. foreach($page->images_slider as $slide_image) { echo rtrim($slide_image->name,"{$slide_image->ext},."); } I haven't tested this much. I also cannot remember if ProcessWire allows dots in file names.
  17. Are these images saved in ProcessWire image fields?
  18. Edit: I misunderstood the question above...this post is not really relevant but I'll leave it here anyway :-). This is how I close PW modals (in Media Manager and other modules). /** * Close jQuery UI Modal. * * @param integer $s Number of milliseconds before closing modal. * */ function closeDialog($s = 1000) { setTimeout(function() { jQuery('iframe.ui-dialog-content').dialog('close'); }, $s); } // call the function // if adding media into a Media Manager Inputfield and closing the dialog is set // in this case data is an Ajax Response if (action === "insert" && data.insertAndClose) closeDialog(); Question, are pw-panels the same as pw modals?
  19. Are you sure about this? I use pw-modal-closed in several of my modules and code similar to below works ok. $(document).find('a.some_class, a.another_class').on('pw-modal-closed', function (evt, ui) { var $parent = $(this).parents('div.some_wrapper'); $parent.addClass('class_to_hide'); console.log('parent hidden'); console.log($parent,'PARENT') }); The correct div.some_wrapper has the class to hide it ('class_to_hide') applied to it. Are you using ProcessWire's JqueryMagnific?
  20. OK. Still won't work. Maybe set the button href yourself using JavaScript after you've done your manipulations? Alternatively, use InputfieldSubmit. It works with that Just my 2p πŸ™‚
  21. Haven't looked at this too closely, but you should be preventing the button click, not the <a> click, no?
  22. This module gets people confused πŸ˜‰. Yes, it is both. Page Table is a pro module based on a concept by @apeisa, coded by @ryan and sponsored by Avoine where Antti works. Avoine offered the module to the ProcessWire community for free (through their sponsorship). Edit: For some reason, the above link is not linking correctly to the single post where Ryan explains the difference between the modules. Here is the direct link. It is Ryan's 3rd post on page 2 of that thread. TLDR; Table and Page Table are different modules. Both are pro fields. The latter is available to us for free, thanks to Avoine. πŸ™‚
Γ—
Γ—
  • Create New...