
joe_g
Members-
Posts
339 -
Joined
-
Last visited
Everything posted by joe_g
-
Hi there, I've got a client who would like to store the selected language, if it's not the default language. The only way I can think of is to use localstorage from js, but that would mean loading the whole front page, then reloading it again in the right language - ew! Is there a better way that vibes with the built in language functionality? I'm hoping to avoid session cookies and such. Also, I'm not sure how the language redirect really works. I suppose it's done in htaccess somehow, but to capture it before it happens I wouldn't know where to 'inject' that functionality. maybe the best solution is to not bother?
-
Thank you both! I feel I have a lot to discover now! Hopefully I won't make another vue app for a while ? J
-
Hi there, I had a brief look at livewire and hotwire - and I love the concepts behind them. I really dislike having to choose between making a SPA or a server side site, the two paradigms are so different and hard to mix. If I understand live-/hotwire right it could mean a single paradigm for both client and server data manipulation, which I haven't experience since visual basic 6 :P To be able to model a regular PW site and then sprinkle it with app-like behaviours here and there would be absolutely incredible. I almost considering stepping over to Laravel for this reason, but it's a big step for me. Neither livewire or hotwire seems to exist without Rails or Laravel. So this seems to be a must. Anyone had experience with this, or something similar? Is there something similar that would work with PW?
-
Oh wow, if this works the way i think it does this could really be it. I can combine **= with limit=20, for example and only get the most related. Thanks! ps. I've been meaning to learn more about selectors, they've really expanded last couple of years.
-
Popularity has it's use, and I'm doing that as well for a different visualization. But in this project I'm mainly looking for similarity. "obscure" similarity is more important than "popular" similarity. Lets say a project have 1000 project that share some popular tags, but there is only 2 that share the same (obscure) tag - on top of the popular ones - those 2 are the most important to show. If I prioritize popularity those 2 projects will be buried somewhere. This probably needs to be some custom sql, just not sure how to write it.
-
Thanks both. RockFinder looks great, didn't know about that module before. But I wonder if it can do what I need. I suppose bot findRaw and rockFinder would need to first load all pages that has 1 or more keywords in common - in my case that can be a lot of pages since some keywords are very generic. Lets say I have 20k projects and half of them might have the keyword "collaboration". What I need is the intersection of the most common, and only the first 'X first' hits. I suppose the only way that can be done is with sql, since the data is purely relative (unlike how rockFinder works, there is no dataset to "start" with - i can't start with 10k pages). Now, how to solve it haha - that's going to be a bit challenging.
-
Hi there, Is there I can sort by "number of things in common". For example, I have "projects" with "tags". I'd like to show the 20 projects that is "most related". So first show the projects with 3 tags in common, then 2 tags in common, etc. Perhaps something like: $pages>find("template=project,limit=20,tags={$tags},sort=in-common-[tags]") Is there a way I could do this in a scalable manner? (As in, avoid getting all results and loop through them)? Custom SQL? thanks!
-
how to header('Content-type: text/calendar'); from a template
joe_g replied to joe_g's topic in General Support
Thank you! Indeed it worked, after adding the namespace. It's embarrassing but I still don't full understand namespaces. Or rather, I kinda do but I'm not sure when I need to declare "namespace ProcessWire;" in a PW template... -
how to header('Content-type: text/calendar'); from a template
joe_g replied to joe_g's topic in General Support
Hi all, I'm trying to generate .ics / iCalendar files from PW, but PW strips custom headers. Is there a way I can do this? Many thanks. (This is a repost, sorry - trying a better title for better traction) -
Hi there, If I try to add a custom header it gets removed by PW header('Content-type: text/calendar; charset=utf-8'); I can see that $http->setHeader was introduced in v.193, but not yet in the stable branch. I assume it should work with the new way to set a header. What can i do to achieve this in the stable branch? thanks!
-
->find('template=repeater_xxx') only works when logged in
joe_g replied to joe_g's topic in General Support
Very nice. That worked, thanks. That lead me to try at set the access. check_access=0 feels like a workaround. But, somehow it doesn't work with guest access enabled - You wouldn't happen to know why? -
Hi, selecting repeater items only works if i'm logged in If i'm not logged in this gives an empty result $pages->find('template=repeater_times') How can I make this work when I'm logged out? thanks
-
oh i see "repeater_times" does the job
-
Hi there, How can I select all repeater items in a selector. Lets say I have a template "event" with the repeater "times". I'd like to get all "times" and store them in a PageArray, regardless from where in the site they are. I this possible? I would like to be able to do something like ->find('template=event.times,startdate>'.now()); I know I cant do that....., but is there a way to do something similar? tx! J
-
Amazing. Thank you! It works perfectly. What wasn't clear to me is how the dependencies translated to PW. Now I know: 1. look in the source for all dependencies recursively until I there is no more 2. download all of them 3. add all of them to PW 4. enable all of them 5. profit What's your thoughts on using the online ckeditor builder? When I try it out it gives a whole package with lots of stuff - of which some would maybe conflict with PW's install, perhaps. Table, for example is already installed. The whole CKEditor ecosystem is seemingly really powerful, but would be good to have a more automated process for installing it. J
-
Hi there, I'm trying to install the 'detail' plugin https://github.com/akilli/ckeditor4-detail But, after enabling it i get a 404 in the network tab and the text field doesn't display at all: http://domain.com/wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.12.1/plugins/api/plugin.js?t=2015030801.162 The plugin isn't supposed to have any dependencies.. I think. Also the 'api' folder doesn't exist under plugins. So now I'm not sure how to go troubleshoot this further. thanks! J
-
Hi there, On one site (on tsohost.com) i get this error message that I'm using too many db connections. The site will hang for half a minute then work again. I wonder, is max 30 low, or normal? It's the first time in a decade I encounter this issue in PW. I'm doing some custom logging so i do new Page() and ->save() for some pages, could this mess with the db connection pooling? Do i need to explicitely close any connections?? I would imagine I don't need to do anything like that, or? many thanks J
-
Help me stop using shared hosting - what's your VPS/docker setup?
joe_g replied to joe_g's topic in General Support
Relevant discussion: https://news.ycombinator.com/item?id=28838132 -
Help me stop using shared hosting - what's your VPS/docker setup?
joe_g replied to joe_g's topic in General Support
Yes, this helps for deployment and updates. I use git-ftp which is similar in philosophy, perhaps. Was hoping to find a more robust solution with docker, where I can swap containers at deploy perhaps, for easier rollbacks and also maybe quicker to reproduce? But I'm not sure if I actually need this, or I'm making it too complicated. -
Help me stop using shared hosting - what's your VPS/docker setup?
joe_g replied to joe_g's topic in General Support
Was looking into this actually, but then you'd want to isolate the sites from each other which means php-fpm etc. I got it running recently, so its not impossible, but it feels way less robust than some docker based setup. If something is up with apache/nginx ALL sites go down, etc. -
Help me stop using shared hosting - what's your VPS/docker setup?
joe_g replied to joe_g's topic in General Support
How do you use proxmox? -
Help me stop using shared hosting - what's your VPS/docker setup?
joe_g replied to joe_g's topic in General Support
Thank you . Had a look and it looks great, however I was hoping to avoid tying up my entire professional life to some service with a subscription model and tiers. I might rather try and go the longer route I think, whatever that means... -
Dear everyone, I've used PW in probably, at least, 100 project the last 10 years. I've been wanting to quit shared hosting since at least five years but I don't have a good idea exactly how yet (as a 1-man company) and I was hoping to get insights and inspiration in your workflows. I've prepared by moving over entirely to Linux, and I'm runing a bunch of VPS's for some personal projects. I also do all my dev work remote, on a VPS. I can set up debian reasonably okay, I think. My biggest issues are: 1. Every shared hosting has a different interface and different constraints 2. I can't easily copy live -> staging -> test, working with updated data is a manual hassle 3. I currently have no shared hosting that ticks all boxes (in the Netherlands) 4. Since PW is a CMS I have to update the live data-model manually (there is no 'migrate up'). I don't think I can solve this problem through any devops magic, but still worth mentioning as one of the biggest pain points. The answer to this problem might be to step over to Laravel, or similar, I assume. My goals and hopes are: -1. (Edit): **FOSS**. I would want to avoid tying up my professional life to any service with tiers and a subscription model 0. **Have the same basic architecture for all projects** 1. Automate backup and restore, and streamline it across all projects 2. Streamline replication from live -> staging and -> test, so I can work on a fresh copy of data without having to use phpmyadmin 3. Have a more robust and portable and setup where I can spawn vps's with a click 4. have a more robust deployment process (better than git-ftp) that is easy to reverse. I realize this is a very wide devops question, but I'm curious about how you do it - the ones who who took this step away from shared hosting. I know someone who runs a rails shop, and hes using docker/kubernetes - that is probably the answer, I think. But I still wonder exactly how this would apply to PW. jg
-
And the answer is to install this plugin: https://github.com/ClaudeSeo/ckeditor-fontweight seems to work fine!