Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Re: [webmaster33] Suggestion: Show current state of Watch thread

Quote Reply
Re: [webmaster33] Suggestion: Show current state of Watch thread In reply to
Good idea! You could probably do this with a global.

is_watched =>
sub {
my $id = shift;
return $DB->table('ThreadWatch')->count( { user_id_fk => $USER->{user_id}, thread_id_fk => $id });
}

and then do:

<%if is_watched($post_root_id)%>
.. display stop watch
<%else%>
.. display watch
<%endif%>

Cheers,

Alex
--
Gossamer Threads Inc.
Subject Author Views Date
Thread Suggestion: Show current state of Watch thread webmaster33 3461 Oct 26, 2003, 10:45 PM
Thread Re: [webmaster33] Suggestion: Show current state of Watch thread
Alex 3273 Oct 27, 2003, 10:02 AM
Post Re: [Alex] Suggestion: Show current state of Watch thread
webmaster33 3295 Oct 28, 2003, 10:41 AM
Post Re: [Alex] Suggestion: Show current state of Watch thread
webmaster33 3131 Apr 16, 2005, 7:24 AM