Jump to content

szabesz

Members
  • Posts

    2,846
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by szabesz

  1. Just for the record: It is also possible to test selectors easily with @adrian's Tracy Debugger module, e.g.: https://processwire.com/blog/posts/introducing-tracy-debugger/#console-panel and https://processwire.com/blog/posts/introducing-tracy-debugger/#want-a-quick-way-to-see-the-results-of-a-pw-selector
  2. You should be able to implement it the "other way round". If you know the actual number of all the images (both "missing" and not missing), and they are also named (or will be named) according to their position in the sequence, and you know that they are grouped by 20, then why don't you just create nested loops and work out your logic according to the current element you might find or not found uploaded to the actual page the iteration points to?
  3. Normally I locked down such features in any CMS I've used so far, but thanks for sharing anyway.
  4. @pwired Have you considered using @LostKobrakai's https://github.com/LostKobrakai/Paginator eg: Anyway @Tom. is right, we need more background to recommend a solution or two...
  5. Thanks for the report! Yeah, the default ProcessWire profiles do use the basic-page template for 404 too, and I recon this can lead to problems when it is forgotten. I did not think of it either in this case.
  6. Me too, but it works for me as it did before. Maybe something on your end?
  7. Sure, so that we get the formatted attribute. However, I would do: /* save the page object to database as child of the given parent */ $newPage->save(); /* turn on output formatting again, important before outputting in template files */ $newPage->of(true); Note that it is called formatting and not filtering.
  8. @EyeDentify Thanks for sharing! May I ask why you turned on output formatting before saving? It is recommended to save first, then turn it on (if it needs to be ON, like normally in the case of the frontend). See for example: https://processwire.com/blog/posts/processwire-2.6.9-core-updates-and-new-procache-version/#new-page-gt-setandsave-method API doc: https://processwire.com/api/ref/page/of/
  9. When you are not sure about this, you might want to: $of = $page->of(); and later on $page->of($of); like this: $of = $page->of(); $page->of(false); $page->set('property', 'value'); $page->save('property'); $page->of($of); source: https://processwire.com/blog/posts/processwire-2.6.9-core-updates-and-new-procache-version/#processwire-core-updates-for-2.6.9 BTW: you might want to give $page->setAndSave()a shot.
  10. That's '"strange", probably something else is going on then. Maybe other, more experienced PHP developers can join in and help as I've never experienced something like this.
  11. Hi Jason, I think it must be related to PHP"s output buffering, which I do not use so sorry for not being able to help more here, but I guess you should examine the way it works on the server in question. Note that I opted for wireRenderFile() to do the "buffering", that is to store rendered template partials in variables so that the complete page can be assembled later on.
  12. Sure, and one more disadvantage to add: my Ghostery browser plugin disables (i.e. removes) it. I use Ghostery with Safari and this is my browser when I simply surf the web, so Adblock Plus and Ghostery are set to disable all that they can. There might be others out there with the same habbit.
  13. Sure I've already suggested not to "pollute" the "root" (/site/templates) and a the possibility to configure it is welcome.
  14. Hello @Sunda and welcome to the Forums, If you are new to ProcessWire, probably the easiest way is to hack it with CSS and/or JS. You can have ProcessWire admin load your files this way: http://soma.urlich.ch/posts/custom-js-in-processwire-admin/ Credit: @Soma
  15. You are right, the recommended blog profile is missing some features that is implemented in Ryan's profile, but to my knowledge it is the most current blog profile that has been released recently. I myself use it as a base of my future projects too, and currently refactoring it to my needs and also to make it more beginner friendly than it is right now. My version of it still needs a lot of work, and probably will be done by the end of this year. I will also try to document it as much as time permits. You should definitely need to familiarize yourself with the basics of template files, I can recommend reading these: A 4 part series (based on Twig, but worth reading nevertheless): http://blog.mauriziobonani.com/processwire-basic-website-workflow-part-1/ and this one too: https://www.smashingmagazine.com/2016/07/the-aesthetic-of-non-opinionated-content-management-a-beginners-guide-to-processwire/
  16. Cool, thanks for sharing! Could you please also edit the first sentence of the post above the code? Maybe by crossing it out, and explaining the situation right after it. Leaving it like this is misleading when skimming through the posts and not reading every single character.
  17. https://www.tawk.to/timeline/ look for: "JANUARY - Launch of the 100% Free tawk.to Ticketing system that deeply integrates with our existing live chat platform."
  18. I'm interested in it, so if you could just jot it down as a short case study after you have finished the site, that would be cool
  19. Thanks @bernhard, I've never heard of it but what I read on their site is pretty impressive. They even have an integrated ticketing system . One thing is missing though: https://www.tawk.to/knowledgebase/integrations/ No ProcessWire integration (At least not yet...)
  20. I do not know why, but in authors.php it is thrown on purpose: if(!$author->id || !$author->hasRole($authorRole)) throw new Wire404Exception(); Just remove || !$author->hasRole($authorRole) and it should work. At least you get the list, but as I mentioned before, this profile is good for learning tricks and general concepts, but it is sort of outdated and is from the time when ProcessWire 2.2.9 and 2.3.x was in use. The API has grown a lot since then, so sometimes there are easier ways to accomplish the same.
  21. That function is now deprecated. You can create a Textformatter module if you want to, eg.:
  22. Probably it is more of a UI/UX design issue than a technical one. I think the default behavior of the menu item not showing up when the page is not available in a given language is ok, at least that is what I would go with anyway. If you just simply include the not translated page in the menu linking to its English counterpart, the visitor might easily believe that it is an error and/or the page has not been translated by mistake. You might want to find other means to present these pages in question to the visitors. For example if your site menu is not huge, you can put two site tree like menus in a "mega footer", labelled: "Pages in Portuguese:" and "Pages in English", so that visitors interested in the English version can still find it. Sure, pages are still a bit hidden this way, but it is just one idea of solving this, you might want something else that is more sophisticated than this.
  23. At first I was also confused by the similarities in the names of the two modules. I remember spending some time on processwire.com to figure out what is what in this regard.
×
×
  • Create New...