
Toby's Comments
-
-
Support
- Embedding a Video Test
-
-
-
Development
- Reply Chaining
Toby
Waterhole Founder
Sep 27, 2024 Thanks for your question @Tom H. Waterhole doesn't support this currently, but the database and replies system has been designed with this in mind as a possible future addition. In theory this could be implemented now as an extension (by completely reimplementing the "show post" page) but it would require a decent amount of development work.
-
-
-
Blog
- Waterhole 0.4
Toby
Waterhole Founder
Sep 27, 2024 In reply toriegel02
riegel02
Sep 20, 2024 Any ETA on the next update? (not pushing, just curious)No ETA, but can confirm that the JSON API implementation is mostly complete (it will be read-only for now), as well as the changes to the extension API. It's not a particularly exciting release, but it's coming!
-
-
Toby
Waterhole Founder
Sep 16, 2024 Hi @Gareth. If you've integrated Waterhole as a package into your Laravel app, then you can access the Waterhole models directly:
$posts = Waterhole\Models\Post::latest()->take(10)->get();
If your Waterhole installation is separate from your app, then an upcoming Waterhole release will contain a JSON API which will allow you to retrieve data from your Waterhole installation remotely.
-
Toby
Waterhole Founder
Sep 1, 2024 Hi @Pete Swan, thanks for your question.
Take a look at the Laravel Authentication Integration docs. When implementing the
HasWaterholeUser
trait on your application'sUser
model, you will want to override thetoWaterholeUser()
method so that it only returns aPendingUser
object if the user has the correct role that allows them to access the forum:public function toWaterholeUser(): ?PendingUser { if (!$this->roles->contains(ROLE_ID)) { return null; } return new PendingUser( identifier: $this->getAuthIdentifier(), email: $this->email, name: $this->name, ); }
-
-
Support
- Hardering Waterhole
Toby
Waterhole Founder
Jul 23, 2024 Waterhole already requires the user to confirm their password when accessing the CP, so if you have a secure password it should already be pretty hardened. Multi-factor authentication is on the roadmap.
Probably not worth doing HTTP Basic Auth IMO, because it's not very secure. Restricting access per IP address could be a good extra measure.
-
-
-
Lounge
- The Waterhole stack
Toby
Waterhole Founder
Jul 23, 2024 In reply toStormlight
Stormlight
Jul 20, 2024 @Toby I'm currently using Livewire alongside Waterhole but after reading this, I am considering switching to Hotwire. I started my project off with the Waterhole Skeleton Repo (composer create-projec...In general, yes, it's wise to add a package you explicitly depend on to your project's
composer.json
file, rather than assuming that it is included via one of your other dependencies. This way you can specify your own version constraint, and then if there is an incompatibility between the version you depend on and the version Waterhole depends on, Composer will yell at you.If you want to depend on a version of the package that Waterhole is not compatible with, then you would need to either wait for Waterhole to update or separate Waterhole into its own project.
-
-
-
Support
- Dose it support RTL?
Toby
Waterhole Founder
Jul 18, 2024 There is currently no support for RTL, but this is something I'd like to add in the future.
-
-
-
Development
- How Can We Generate RSS Feeds?
Answer Toby
Waterhole Founder
Jul 17, 2024 Waterhole exposes an RSS feed for all posts (as you've linked), and each channel (e.g. https://waterhole.dev/community/channels/blog/posts.rss). In the future we may add feeds for comments/specific posts too.
-
-
Toby
Waterhole Founder
Jul 16, 2024 The sidebar links can be managed in the Structure section of the Control Panel. Docs
-
-
Lounge
- The Waterhole stack
Toby
Waterhole Founder
Jul 10, 2024 In reply to ManojManojJul 10, 2024 I really wanted to know, Why Hotwire? why not use Livewire for this project? I only reason i'm still thinking about buying this package is Hotwire choice, not a deal breaker but i don't want to know...@Manoj Hotwire and Livewire are both great, but they are quite different approaches to building Laravel apps.
Hotwire is an approach to progressive enhancement. You are basically just building a traditional hypermedia Laravel Blade app with forms and links. Hotwire is a light sprinkle of JavaScript on top which enhances those forms and links to use AJAX rather than requiring a full page reload. The app will still work fine if JavaScript is disabled or fails to load.
Livewire, on the other hand, is a more fundamentally different approach. You use Livewire components which have proprietary paradigms for managing state and interactivity between the client and server. If JavaScript is disabled or fails to load, the app won't work.
Hotwire's approach makes a lot of sense to me, which is why I chose it for Waterhole. It's simple, light, resilient, performant, and has a great developer experience.
-
-
Answer Toby
Waterhole Founder
Jun 24, 2024 In reply toriegel02
riegel02
Jun 23, 2024 Okay, I was too happy that I found solution and didn't notice that I cannot turn off or replace emojis in the editor. Users can still pick up emojis and they all are coming from CDN instead of being h...@riegel02 To change where emojis are hosted, you can change the
emoji_url
setting inconfig/waterhole/design.php
. Note this is a separate thing from the emoji-picker-element data source discussed in my previous comment. -
-
Lounge
- The Waterhole stack
Toby
Waterhole Founder
Jun 3, 2024 Hi @Michael, thanks very much for your kind words.
In my other job I work with both React and Vue, and coming back to Waterhole is always breath of fresh air. I find the Laravel + Hotwire stack much simpler to work with and reason about. There's no client-side state management to worry about, no rendering performance issues, and working directly with the models/database is refreshing.
I'm a huge fan of Laravel's Blade components in keeping the view layer nice and tidy. And I really like the Hotwire paradigm, because at the end of the day, it feels like I'm building a really basic web 1.0 app, just with a bit of progressive enhancement. I would highly recommend it!
-
-
Toby
Waterhole Founder
May 27, 2024 Good question @riegel02!
default.js
is bundled at runtime from a few separate JS files undervendor/waterhole/core/resources/dist
- you might have more luck making changes in those files, but then they will still be overwritten whenever you update Waterhole, so this wouldn't be the recommended way to do it.I don't think what ChatGPT has suggested will work, because the browser's request to cdn.jsdelivr.net will bypass your server completely.
In theory, the way to do this would be to add a custom script to monitor for
<emoji-picker>
elements and switch their data source to your own:- Create a new file at
resources/js/emojiPicker.js
:
function updateEmojiPickerDataSource() { document.querySelectorAll('emoji-picker').forEach((el) => { // https://github.com/nolanlawson/emoji-picker-element?tab=readme-ov-file#javascript-api el.dataSource = "DATA_SOURCE_URL"; }); } // Update emoji-picker elements already on the page updateEmojiPickerDataSource(); // Observer for new emoji-picker elements added to the page const observer = new MutationObserver(updateEmojiPickerDataSource); observer.observe(document.documentElement, { childList: true, subtree: true, });
- Add it to your forum using the
Script
extender inapp/Providers/WaterholeServiceProvider.php
:
Extend\Script::add(resource_path('js/emojiPicker.js'));
However, unfortunately this is not actually working - I am still seeing requests to the cdn.jsdelivr.net domain when navigating between pages. I've run out of time to debug right now, but will keep thinking about how this can be achieved!
- Create a new file at
-
Toby
Waterhole Founder
May 23, 2024 In reply toriegel02
riegel02
May 23, 2024 Quick question. Do you run Redis? Just wonder if setting it up is worth for small communities.We do, but I don't think there would be any noticeable performance difference in a small community.
Hey @Tyler DuPont, while Waterhole will automatically embed .mp4 links, unfortunately embedding a YouTube video isn't as simple as appending the .mp4 extension to the URL.
However there is a TextFormatter plugin that can automatically embed YouTube videos (among other things). Take a look at Waterhole's Formatter documentation to learn how to configure the formatter, and the TextFormatter MediaEmbed plugin. The code will end up looking something like this: