-
Posts
4,054 -
Joined
-
Last visited
-
Days Won
67
Everything posted by Pete
-
Questions and Answers forum desperately needed. AKA mark as solved.
Pete replied to dotnetic's topic in Wishlist & Roadmap
There might be a way to workaround this though. What I really don't want to do is write a plugin for the forum software since they change stuff so often and I've seen plugin module developers over there get ticked off as they don't get any warning when core functionality changes or is removed. What I could potentially do is add a button that only the topic starter and moderators can see (easy enough logic in the templates - survives upgrades usually too which is something you have to worry about with this software) that then sends an AJAX request to a standalone script with a standalone table that stores "useful answer" information. It should then technically be possible to check that table using as little forum-related code as possible. It needs some looking into, but the question I asked here needs some debate first I think: Again, still not making any promises. I find that when I make promises sometimes years go by without me actually doing what I said I'd do ? The rare exception being the Dev Directory actually happening ? -
Questions and Answers forum desperately needed. AKA mark as solved.
Pete replied to dotnetic's topic in Wishlist & Roadmap
Ugh... spoke too soon. I thought the software stored the "best answer" in a separate table maybe but it's a field in the topic table, so you can only set one post ID per topic and not multiple ? -
Questions and Answers forum desperately needed. AKA mark as solved.
Pete replied to dotnetic's topic in Wishlist & Roadmap
I've found a module that looks like it lets you set a "best answer" on a normal discussion topic, so as not to break the discussion flow. I've asked the author if he thinks it's technically possible to change the code to mark more than one answer as "best" and am awaiting his answer. But the question I have is this: how should the best answer/answers even be displayed? When we used Q&A forums in the past people didn't like the fact that the best answer appeared right at the top and removed it from its original position in the topic, so should it be that the best answer appears right below the first post (the question) as well as where it originally was in the thread, highlighted in both cases? I think that makes the most sense and if we can get it to work for multiple answers then that's even better. I don't mind leaving it that only moderators and the original poster select the best answers - I think there are enough moderators here to flag the best content without implementing voting buttons. I'm not suggesting voting buttons are wrong, but there's no easy way to use them to automatically turn a reply into a best answer without a lot of custom code - and Iike I say the forum code is very confusing! ? Anyway, no promises on any of this. -
Questions and Answers forum desperately needed. AKA mark as solved.
Pete replied to dotnetic's topic in Wishlist & Roadmap
Thanks, I just tried it out on my local dev copy and they've not improved on any of the flaws. You still can't set more than one answer as the best You can't reply to answers (like StackExchange does) so there can be no discussion as upvotes/downvotes break the flow You can't mix and match QA topics and normal topics in the same forum (less of an issue for a Getting Support forum) Any of the sorting (by date or votes) is per-member and not set in the admin So the big problem is it breaks the discussion flow completely still. I'll have a poke around and see if there are any third-party modules that might do what we want because this is still very incomplete in terms of features unfortunately. -
Questions and Answers forum desperately needed. AKA mark as solved.
Pete replied to dotnetic's topic in Wishlist & Roadmap
We can change as many forums as you like to Q&A forums but yes there were issues with it. Here's where someone hits the nail on the head when requesting the forum devs make it more like StackExchange: https://invisioncommunity.com/forums/topic/438364-qa-forum-types-add-comment-feature-please/ So SE lets you comment on the chosen answer. The forum software pulls the chosen answer out of the topic flow (from memory) and the upvoting/downvoting means you can't have a meaningful conversation in a Q&A topic. I will have a look on a local copy to see if they've updated the functionality since we last looked used it but I honestly wouldn't count on it - they seem to spend more time on implementing cross-device support for emojis than improving some useful features ?(okay so that's a bit harsh, but they do seem to have a weird priority to their feature rollouts). -
You want an updated video? But I remember it when it was nearly new! *checks video date, feels old* ? I had a similar experience to others - I was looking for a CMS that could meet my non-standard requirements - I remember seeing the site and some of the docs back then and being confused. Fortunately I came back to it a few weeks later and finally watched the video and that sold it to me instantly.
-
It might actually be useful to do session_start actually since it doesn't matter that the forum software then wipes it out as it'll get wiped out in turn by PW's session again later on. I shall have a play.
-
Oooh, follow-up question - how would I go about accessing a variable stored in PW's session at this stage: $this->addHookBefore("Session::init", function(HookEvent $event) { I'm guessing there's a way to temporarily get the session data at that point maybe? Just thought of a scenario where I'd need to grab a variable from PW's session and check it before running the external script (so I don't always need to keep running the script if I already have the data in the PW session - seems wasteful to load a bunch of external classes every time).
-
Thanks, changing it to this worked: $this->wire('files')->compileInclude(wire('config')->paths->root . 'talk/init.php', array('includes'=>true,'namespace'=>true,'modules'=>true,'skipIfNamespace'=>true)); I guess it was a different combination of options else it wanted them to be named (likely the latter now I look at it more closely). Got there in the end - thanks guys! P.S. you've just both helped me do a better forum member integration for the new PW website by the way ? Making two very different scripts play nice was NOT easy!
-
I actually thought I was onto a winner with this little gem: $this->wire('files')->compileInclude(wire('config')->paths->root . 'talk/init.php', [false, false, false, true]); See notes here: https://processwire.com/api/ref/wirefiletools/compile-include/ I thought that would work as the included file DOES have a namespace at the top, though not a PW one, and the last option should have skipped it ? You beat me to it by seconds, but alas it doesn't seem to be doing the job.
-
Thanks, this seems to work great! Now if only I could get FileCompiler to stop compiling the externally-included application files I'd be onto a winner (wasn't expecting it to go crazy and it breaks on a crucial file!). Seems the only way to stop that is to add // FileCompiler=0 to the top of the relevant external script page, but that isn't upgrade-proof for the external script. It would be great if there was a way to tell file compiler to leave that whole directory alone.
-
I've got my dunce hat on today - how would I put something in a variable before init that I could then access after init? It's been a long time since I did anything like that but it sounds like a good option ? Maybe if wire() is available before I could to wire()->test = 'something' and access that later? I just can't envision the code in my head to write it.
-
Hi folks I need to grab some data from a separate script before PW's session kicks in to avoid sessions wiping each other out in the wrong order. I see you can hook before session::init, and in the PW wire/core/Session.php class there's a $data array it looks like you can populate around line 267 @session_start(); if(!empty($this->data)) { foreach($this->data as $key => $value) $this->set($key, $value); } but I can't for the life of me work out how to populate that data array so that something like $data = array('test' => 'this is a test') gets passed to the session as $session->test Anyone got any ideas? I think I'm looking along the right lines on this one - hook before session::init, do the dirty bit of getting data from the other script, store it in the $data array and let PW's session wipe out the other one. Otherwise the other script wipes out PW's session instead and whilst PW can still remember lots of stuff like what page it's on, the loss of PW's session causes problems when dealing with currently-logged-in user etc. Because of these conflicting sessions between two separate scripts that I can't work around any other way, my only other option is to call file_get_contents on a local url which totally works but seems wasteful if I can do something like what I'm trying to above instead. Any help would be greatly appreciated!
-
Thanks to all who got in touch. I have found a developer to take this one on now.
-
Hi folks Due to some unforeseen personal problems I am having to halt all client work for a few weeks minimum and there is one project that I need to hand over to another PW developer as a matter of urgency. It's a site using the default Bootstrap 4.1 profile with some custom JS. Site has an extensive docs section and FAQ system that I've built (some iOS troubleshooting required on the custom bits - some touch-related quirks still remain). Good experience getting your hands dirty with problem-solving in terms of hooking/overriding some functionality in the core (think I've mostly completed that bit but you would need to understand what I've done still ? ). Basically looking for a seasoned developer with good frontend skills as well. Please let me know if you're interested by sending me a private message and I'll provide more details at that point.
-
Great module - any chance you can look into making it scan the field for different language versions as sometimes these have different images?
-
There's a UIKit admin theme bug when you switch on AoS - see here: https://github.com/processwire/processwire-issues/issues/706 The bug doesn't exist when you switch AoS off so just needs some style tweaks somewhere in AoS but I didn't investigate further than that sorry.
-
Thanks - that definitely narrows it down to Uikit then. One step closer ?
-
This also happens on LightWire actually when using the UIKit admin theme. The CSS class that overrides the colour is this: It's bizarre that I can't override it even when using a custom CKE CSS file and adding color: #fffff !important (I kinda thought !important would do the trick).
-
Hi, when applying CodeMirror in AOS, when viewing source the text is black on a dark background. Nothing I've tried seems to be able to override this (custom stylesheets etc). Any ideas?
-
Hi folks SCAYT (Spell Check As You Type) is a great CKEditor plugin, but does anyone know if it's possible to get it working with multi-language fields? As in configure it to check for English in the English version of a CKE field and German in another for example?
-
Language Support - Tab Text Colours - Improvement Suggestion
Pete replied to prestoav's topic in Wishlist & Roadmap
I just added a request this morning - such a handy feature. -
Never mind - ryan confirmed it's a bug and is fixed on latest dev.
-
Hi all I've hit an error I can’t work out – I have a multilang CKEditor field and the settings for that tell it to save drag-n-drop images into an Images field on the same page. Problem is when I then switch to another language tab on the CKE field and drag and drop an image it gives this error: 1019 is the language page for German on my site. I thought I would be clever and be able to create a field called content__1019 with the same settings but it won’t allow fieldnames with double underscores. Ideally I need a way to set images dragged into the German tab to upload to a dedicated "Images_DE" field on that page to keep the two image fields separate. If not then at least the main images field. Is there a setting I have overlooked?
-
Looks like they're on Wordpress now? ?
- 33 replies
-
- Photography
- Travel photography
-
(and 1 more)
Tagged with: