Difference between revisions of "Extensions:User Watching"
Tag: 2017 source edit |
|||
| Line 11: | Line 11: | ||
== Configuration == | == Configuration == | ||
| − | < | + | Not much to configure unless you don't want the default settings for how many to display per pages. |
| + | |||
| + | To change the amount of artwork to showcase in the Watching page, find the getWatching function in WatchController and fine this line: | ||
| + | <code>$submissions = GallerySubmission::whereIn('user_id', $ids)->with(['gallery', 'user'])->visible($user)->latest()->paginate(20)->appends($request->query());</code> | ||
| + | |||
| + | You can change the 20 in paginate(20) to whichever number you prefer. | ||
| + | |||
| + | To change the amount on the dashboard, go to getIndex function in HomeController and find this line: | ||
| + | <code>$watchedSubmissions = GallerySubmission::whereIn('user_id', $followingIds)->with(['gallery', 'user'])->visible($user)->latest()->take(8)->get();</code> | ||
| + | You can change the 8 in take(8) to whichever you prefer to show on the dashboard. | ||
| + | |||
== Usage == | == Usage == | ||
<!-- Is there anything users should know about using your extension? --> | <!-- Is there anything users should know about using your extension? --> | ||
Revision as of 16:43, 25 February 2026
| Description | Adds a simple watching feature for users to watch others and see their gallery submissions. |
|---|---|
| Author(s) | Camyza |
| Status | stable |
| Github | extension/user-watching-v3 |
| LK Version | 3.0.0 |
| Contains a Migration | |
Adds a simple watching feature for users to watch other users to see their gallery submissions on the dashboard and on their own Watching page underneath the user submenu in the navigation bar.
Installation
Pull the extension and deal with any conflicts that will arise.
Do the following commands once you resolve all conflicts.
php artisan migratephp artisan update-extension-trackerphp artisan optimizex2
Configuration
Not much to configure unless you don't want the default settings for how many to display per pages.
To change the amount of artwork to showcase in the Watching page, find the getWatching function in WatchController and fine this line:
$submissions = GallerySubmission::whereIn('user_id', $ids)->with(['gallery', 'user'])->visible($user)->latest()->paginate(20)->appends($request->query());
You can change the 20 in paginate(20) to whichever number you prefer.
To change the amount on the dashboard, go to getIndex function in HomeController and find this line:
$watchedSubmissions = GallerySubmission::whereIn('user_id', $followingIds)->with(['gallery', 'user'])->visible($user)->latest()->take(8)->get();
You can change the 8 in take(8) to whichever you prefer to show on the dashboard.