Difference between revisions of "Extensions:User Watching"

From Lorekeeper Wiki
Jump to navigation Jump to search
Line 14: Line 14:
  
 
To change the amount of artwork to showcase in the Watching page, find the getWatching function in WatchController and fine this line:  
 
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>
+
* <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.
 
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:
 
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>
+
* <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.
 
You can change the 8 in take(8) to whichever you prefer to show on the dashboard.
  

Revision as of 16:45, 25 February 2026

user-watching-v3
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 migrate
  • php artisan update-extension-tracker
  • php artisan optimize x2

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.

Usage

Troubleshooting

Images

See Also