Toby's Comments
-
-
Toby Waterhole Founder
Jun 21, 2023 Please note that running Waterhole on shared hosting is not officially supported.
-
- Development
- How to add a Stimulus controller?
Answer Toby Waterhole FounderJun 21, 2023 Hi @mtdmy, you'll need to:
- Create a new Stimulus controller at
resources/js/controllers/hello_controller.js
, and then register it with Waterhole's Stimulus instance inresources/js/app.js
:
import HelloController from './controllers/hello_controller'; window.Stimulus.register('hello', HelloController);
Set up a JavaScript compilation step - probably the easiest way is to use Laravel Mix. Output your compiled JavaScript to
resources/dist/app.js
.Add this script to Waterhole's JavaScript bundle in your service provider:
Extend\Script::add(resource_path('dist/app.js'));
Hopefully that's enough to get you started – let me know if you have any specific questions.
-
- Support
- Keep me logged in
Toby Waterhole FounderJun 21, 2023 Hey @René! It doesn't seem to happen to me on this forum, at least
Checking the "Remember me" box should set a cookie called
remember_web_[random string]
with an expiry of 1 year. Can you confirm that this is being set correctly? -
Answer Toby Waterhole FounderJun 13, 2023 In reply to binksbinksJun 13, 2023 this one https://chrome.google.com/webstore/detail/%E7%81%AB%E5%B1%B1%E7%BF%BB%E8%AF%91-%E5%88%92%E8%AF%8D%E5%92%8C%E7%BD%91%E9%A1%B5%E7%BF%BB%E8%AF%91/klgfhbiooeogdfodpopgppeadghjjemkThis seems to be a conflict between Turbo Drive (a library that Waterhole uses to speed up page navigation) and this extension. Turbo Drive is simply replacing the
<body>
via XHR, so it's a bug with the extension if it can't handle that. I would suggest contacting the extension developer to submit a bug report.A workaround is to reload the page, and then it will work again (up until you navigate to another page).
-
Toby Waterhole Founder
Jun 13, 2023 @binks What browser extension are you using? (So I can investigate the cause)
-
Toby Waterhole Founder
Jun 4, 2023 In reply to WulfheartWulfheartJun 3, 2023 @Toby What are your ideas in this direction? I would also like to have similar capabilities but I am unsure how to implement them yet (in another project).Probably something pretty similar to DiscourseConnect, which allows authentication to be handled completely off-site.
-
- Development
- Paywall for User Groups
Answer Toby Waterhole FounderJun 4, 2023 Yep, @Wulfheart is correct. Waterhole doesn't currently support any integration with Zapier or Trigger – though a JSON API is on the roadmap which would potentially make these possible.
For now, the recommended way would be to write some Laravel code to listen for a Stripe webhook and then add the Waterhole user to the desired group:
use Waterhole\Models\User; $user = User::where('email', $email)->firstOrFail(); $user->groups()->attach(5);
-
Toby Waterhole Founder
Jun 4, 2023 Thanks for the suggestion @Subarist. In the next release, comments will have a stacked layout on small screens (the body and replies will be full-width beneath the avatar/username), making them much more readable.
-
- Development
- Is there a public roadmap?
Toby Waterhole FounderJun 4, 2023 Hey @Manuel, good question!
I don't currently have a well-defined roadmap to publish, except to say that the focus for the next few releases will be mostly on adding essential moderation features that Waterhole is missing (eg. pinned posts, soft-deletion, reporting, anti-spam), as well as integration features (like a JSON API).
The roadmap beyond that is a work-in-progress that will be influenced by public demand and client requests. Hopefully at some stage I will be able to publish a more concrete roadmap.
Feel free to add your most desired features to the Ideas channel so they can receive votes from others, and we can discuss exact implementations etc.
-
- Support
- UTF-8 display Issues
Answer Toby Waterhole FounderJun 4, 2023 Thanks for these reports @Subarist, they will be fixed in the next release. In the future, it would be a great help if you could post bug reports to the GitHub issue tracker
-
- Support
- Class "Locale" not found
Toby Waterhole FounderJun 4, 2023 Hi @Adeala Ademola, have you tried all of the steps in the Troubleshooting documentation? When posting in the Support channel, please include as much information as possible, including any relevant information in the logs, and detail what debugging steps you have tried (eg. clearing the cache).
-
Toby Waterhole Founder
Jun 4, 2023 In reply to SubaristSubaristMay 30, 2023 I know why we misunderstood... It's so small that I didn't notice it especially when the navi bar is a bit long... Can we specify a default language? image.pngCan we specify a default language?
In most cases you shouldn't need to, since Waterhole defaults to the closest matching preferred language to the
Accept-Language
header sent by the browser. If there's no good match, it will default to the first locale defined inExtend\Locales
(English). If you needed to change this you could remove the English locale:Extend\Locales::remove('en');
-
- Ideas
- Text width
Toby Waterhole FounderMay 30, 2023 Thanks for the feedback @René! You're right – I've adjusted the default theme slightly in 0.2. May make further adjustments in the future, though probably won't take it all the way down to 70 characters.
Couple things you can tweak with custom CSS:
.container { max-width: 72rem; } /* and/or */ :root { --measure: 92ch; }
-
Toby Waterhole Founder
May 30, 2023 I'm not sure I quite understand the problem, so I'll just explain how the language system works.
In order to become available, languages must be registered using the
Locales
extender. For example, inWaterholeServiceProvider
, you would add:Extend\Locales::add('Traditional Chinese', 'zh-Hant');
Waterhole uses the following algorithm to determine which language to use:
- If the user has selected a language, use that. (If they are logged in, it's stored in their preferences; otherwise it's stored in the session.)
- Otherwise, use the closest matching preferred language from the
Accept-Language
header sent by the browser.
The
app.locale
setting is not actually used for Waterhole requests.You should keep
app.fallback_locale
set toen
so that any strings that don't have azh
translation will fall back to English instead of printing out the translation key.
Hi @Joe,
Yes, this is something that I'm planning to add official support/docs for. For now it's untested and probably fairly limited (eg. there's no way to configure a separate DB connection for Waterhole). But the gist would be:
composer require waterholeforum/core
into your Laravel projectIn terms of auth integration, there's no solution at the moment but it's also on the roadmap for one of the next couple releases.