Jump to content

joe_g

Members
  • Posts

    398
  • Joined

  • Last visited

Recent Profile Visitors

7,191 profile views

joe_g's Achievements

Sr. Member

Sr. Member (5/6)

63

Reputation

5

Community Answers

  1. Aha, now I get it! You suggest doing it in chunks of 100. Interesting, this I have to try! thanks.
  2. Hey yes, thank you. I tried this (findID) but it's too slow unfortunately, since I read all records for every request. I did consider caching, perhaps doing this nightly and cache the response, but it felt too complicated (and might also lead to weird cases with mismatch). I think the alternative is to do this with SQL, the grouping needs to happen on a sql-level. That's also a bit complicated, probably :D Especially since I usually don't spend too much time with the actual schema underneath processwire...
  3. Thanks everyone. In the end I went for the most basic solution. It doesn't happen very often so i just add the language alternatives as they are needed. In this case it was field_es, next month it might be field_pl. It's so easy to do so, so in the end not a point to automate.
  4. Yes, it's a sidescroll so you can easily swipe right as if the pages form a timeline. Since a page corresponds to the amount of stuff you already see on the current page you get a kind of intuitive feel for how much a year contains. A sort of physical representation of everything that has happened. Although it could become years instead of pages for past years, but it gets a bit tricky with a 2 level pagination perhaps. I imagine you click 2022, see pages and you would need to go back to 2024. Now, since you brought this up. The whole thing could potentially be only months and years instead of pages - but that is equally hard to calculate. Not all months have events and should be represented. Yes it would need to be custom sql, i suppose
  5. Hey experts, I had this cool idea I would love to implement, but so far I didn't manage to do it with good enough performance. I've got some date fields on a page, and I'd like to have years indicate on the pagination pages, like so: What I tried is to read all the results, read all the years for each results, then slice them up in pages. This is way to slow, obviously. Only thing i could think of is to make a nightly batch job that calculates the pagination, but it starts to get a bit messy and could easily be out of sync. This is no life-and-death situation, it's just something I would like to do. If you have any ideas how to solve this I'm curious to hear it.
  6. Hey experts, I ran into this today: A client has a site with lots of languages (12). I just learned about multilingual fields where any field can become multilingual, which is great. My problem is that I don't know what languages the client want to make language-specific images for. In most cases the default images-field is fine, but sometimes there is a secondary language (in this case Spanish). Is there a way I can allow the client to add a language to a multilanguage field? Perhaps a combo of repeater and images field, or some sort? I suppose I could create a version for every language. The drawback is that I would have to remember to update this field in parallel with the real languages. If the client adds polish tomorrow, I would have to add a polish alternative version of these images. It's not the end of the world, and that is probably what I will end up doing, just curious if there is more neat way? thanks!
  7. Interesting! I didn't know about HLS and doing it myself doesn't seem too bad actually
  8. One strategy would be to store all the original video files on the website as file uploads, and then use mux for conversion and delivery. At least then there a pinch less of a lock-in. Then, maybe at some point there might be a self-hosted mux alternative (or I make one based on ffmpeg). That could be a way to do things?
  9. Hey all, My projects involves more and more video. For a couple of years I've been self hosting mp4's. It works okay but it's always a hassle with determining the bitrate and getting the clients to understand that kind of thing. I don't want to go back to the bad old days of embedding. Mux.com looks good, but then all video material is locked up in their servers and it's hard to move. I don't love the idea to be tied to them forever. My dream would be to have something similar to image->width(500), such as video->bitrate(3000) for 3mb per second, for example. So that the editors can upload whatever video file. I think this would be not that hard to achieve with ffmpeg? I've been toying with the idea to do something like this myself. Anyone else? J
  10. yes, you made me understand 'viewable', that's great. But i can't control internal links done in ckedit (for example). Maybe ckedit is linked to /es/page and that doesn't yet exist (but perhaps a week later someone makes a spanish translation). It should work both now and later.
  11. i use hetzner for everything since some years
  12. @gebeer Is what you describe some native setting or is it part of your module?
  13. The problem is not the language switch, it's everywhere else the page is linked. It wouldn't be enough to check if it's 'viewable' in the language switch - it would have to happen everywhere. That would be hard. But the 302 redirect setting makes this a non-problem
  14. Thank you both. @virtualgadjo I would love to stick to the native "active" if i can, however it's a bit cumbersome to check if a page is "viewable" *everywhere* when its being linked to. It could be in the language switch, but it is linked in lots of places. I Example: /es/hola-amigo (spanish page) /about (default about) /nl/about (dutch about) /es/about (NOT ACTIVE, DOESN'T EXIST) If i link from /es/hola-amigo to /es/about (without checking if it's viewable) i get a 404. What I like it to do is to instead go to /about .........Aaaaaaaaaaaaaaaaaaand after looking around a bit, there it is. This is what I didn't know existed because I didn't look hard enough 🤦‍♂️🤦‍♂️🤦‍♂️🤦‍♂️ thanks for the help! J
  15. Yes thank you. I don't think I explained myself very well. So I have a website with 13 potential languages, not all of them are used everywhere. Most pages have 2-3 languages out of these 13. I would like to show a language switch for the languages that has been translated (in most cases 2-3 languages). The problem is that there is no easy way for me to know what languages has actually been translated. I can't go through all the fields and compare them to the default language because it's tons of repeaters with text fields with footnotes and whatnot. It would easily be over 20-30 textfields to compare so this would be inefficient. So, I would need some kind of mechanism or switch that the editor can use to say "this language is in use". I can't use the "active" switch because if i switch it off the page gives a 404. Ideally, active=off would mean "return the page with the default language", but that's not how it works. I would like to add my own checkbox called "use this language", but I don't think there is anything like a "Multilingual Checkbox"? What i do now is that i compare the title with default, if it's different then I assume the page is translated. This does't work very well since the title sometimes stays the same. The client is not so happy with this solution. The only way to achieve this that I can think of is to have a text field called "is this page translated" that the editor would fill in with anything (such as "yes"). But that feels soo hacky and weird. Is there a better way?
×
×
  • Create New...