From: Blake C. <li...@li...> - 2003-09-05 16:05:46
|
Has anyone written anything that allows an admin with a seclev of say > 10k to send a message, web message, to all users at once? Thanks |
From: alex <al...@ow...> - 2003-09-05 17:07:38
|
At 17:04 05/09/03, you wrote: >Has anyone written anything that allows an admin with a seclev of say > >10k to send a message, web message, to all users at once? >Thanks I would argue that you never want to do this - or should only do this in extreme circumstances - like the site shutting down. And in that case one would just use the database with something *like* select email from users Goodluck. Alex |
From: Blake C. <li...@li...> - 2003-09-05 17:52:42
|
Thanks Alex, Maybe I'll explain my idea a bit... I'd like to be able to leave messages for users, usually all users, about a new feature, or just some kind of reminder, or helpful hint. e.g. "Hey you, did you know you can moderate comments? Here's how..." or "Hey you, did you know you have your own journal"? Or some such things that will help people learn about all the things they are able to do, or if I have something to tell them. Just little things to get people to participate more. The idea here was to use the web_messages tables, and since there is a little more invovled that just doing an "insert into" it seems like a web form would be the way to go. Since I am perl & slashcode stupid still, I was hoping someone had beat me to it on this idea. Does anyone else ever feel the need to communicate with all your users in ways other than just email? I hate to email folks when they don't ask for it, I think we all get enough email. -Blake alex writes: > At 17:04 05/09/03, you wrote: >> Has anyone written anything that allows an admin with a seclev of say > >> 10k to send a message, web message, to all users at once? >> Thanks > > > I would argue that you never want to do this - or should only do this in > extreme circumstances - like the site shutting down. > > And in that case one would just use the database with something *like* > > select email from users > > Goodluck. > > Alex |
From: shane <sh...@lo...> - 2003-09-05 17:53:33
|
On Friday 05 September 2003 13:07, alex wrote: > At 17:04 05/09/03, you wrote: > >Has anyone written anything that allows an admin with a seclev of say > > >10k to send a message, web message, to all users at once? > >Thanks > > I would argue that you never want to do this - or should only do this in > extreme > circumstances - like the site shutting down. > > And in that case one would just use the database with something *like* > > select email from users > > Goodluck. > > Alex Alex, Blake was asking about web messages, not email messages. To send every use a web message, which 'web message' would you use? Most message codes from the Slash::Messages plugin are for things like daily newsletter, relationship change, comment reply, etc. Some of those will let the user pick whether they want the announcement via email or web, others are only web/email. So - even if you wrote up some quick code to spam all the users via a particular message_code, not all of your users would get the message because they may not have configured their messaging preferences to receive that particular message type. So you'd have to first force_subscribe them to the message_code for the type that you want to send to them. Then send it. The sending is easy, it only take a few lines of code via the message plugin's calls. The force-subscribing, well, you'd have to create entries for each user in the userdata table for the plugin, I think that's users_messages or messages_users or something to that affect. If I were you, I'd just post a story to the site, and assume that people had signed up for the daily headlines/newsletter message types so they'll find out about the news if they're not browsing the website. Shane |
From: Blake C. <li...@li...> - 2003-09-05 18:01:43
|
> To send every use a web message, which 'web message' would you use? > Most message codes from the Slash::Messages plugin are for things like daily > newsletter, relationship change, comment reply, etc. Actually I was thinking of adding a new one, something along the lines of "A Message from LISNews" or something like that. > So - even if you wrote up some quick code to spam all the users via a > particular message_code, not all of your users would get the message because > they may not have configured their messaging preferences to receive that > particular message type. Yeah, I'd force them all into it. I *think* web messages are less intrusive, and I am guessing no one will be offened, it's not like I am selling them herbal viagara. My thinking here is, as a member of slahsdot I wouldn't mind an update from Rob once a month on what's going on, but I really don't need more email, so a web_message wouldn't be bothersome. Maybe that's just me? > The sending is easy, it only take a few lines of code via the > message plugin's calls. :-) At this point, nothing is easy for me, I looked thought the Slash::Message perldoc, and I *guessd* it would be easy for someone further along than I at this point, but I've had no success in making a plugin or extending slash at all yet. I just can't seem to get the basics down yet. I'm still addicted to PHP I think. Thanks Shane! |
From: Blake C. <li...@li...> - 2003-09-30 21:14:04
|
I'm not sure what happened, but comments.pl has died on me, and the errors being generated don't make much sense to me. As far as I know nothing in the file, or the Db has changed. Can anyone shed any light on where to start tracking this one down? Here's what I'm seeing: Subroutine main redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 14. Subroutine _buildargs redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 301. Subroutine getError redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 320. Subroutine delete redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 329. Subroutine displayComments redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 343. Subroutine commentIndex redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 371. Subroutine commentIndexUserCreated redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 465. Subroutine commentIndexCreator redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 529. Subroutine commentIndexPersonal redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 590. Subroutine _createDiscussion redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 640. Subroutine createDiscussion redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 705. Subroutine editComment redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 716. Subroutine validateComment redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 769. Subroutine previewForm redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 973. Subroutine submitComment redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1061. Subroutine _send_comment_msg redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1313. Subroutine moderate redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1343. Subroutine deleteThread redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1432. Subroutine undoModeration redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1477. Subroutine isTroll redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1519. Subroutine main redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 14. Subroutine _buildargs redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 301. Subroutine getError redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 320. Subroutine delete redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 329. Subroutine displayComments redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 343. Subroutine commentIndex redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 371. Subroutine commentIndexUserCreated redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 465. Subroutine commentIndexCreator redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 529. Subroutine commentIndexPersonal redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 590. Subroutine _createDiscussion redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 640. Subroutine createDiscussion redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 705. Subroutine editComment redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 716. Subroutine validateComment redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 769. Subroutine previewForm redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 973. Subroutine submitComment redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1061. Subroutine _send_comment_msg redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1313. Subroutine moderate redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1343. Subroutine deleteThread redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1432. Subroutine undoModeration redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1477. Subroutine isTroll redefined at /usr/local/slash/site/www.lisnews.com/htdocs/comments.pl line 1519. [Tue Sep 30 16:07:57 2003] [error] /comments.pl:Slash::DB::Utility:/usr/lib/perl5/site_perl/5.6.1/i386-linux/Sl ash/DB/Utility.pm:635:DB=slash -- no error string -- SELECT * FROM discussions WHERE ts <= now() AND type='open' ORDER BY hits DESC LIMIT 0, 31 [Tue Sep 30 16:07:57 2003] [error] Which was called by:Slash::Search:/usr/lib/perl5/site_perl/5.6.1/Slash/Search.pm:509:DB=slash -- no error string -- SELECT * FROM discussions WHERE ts <= now() AND type='open' ORDER BY hits DESC LIMIT 0, 31! [Tue Sep 30 16:07:57 2003] [error] Can't call method "fetchrow_hashref" on an undefined value at /usr/lib/perl5/site_perl/5.6.1/i386-linux/Slash/DB/Utility.pm line 637.! |
From: Jamie M. <ja...@mc...> - 2003-10-02 03:14:01
|
li...@li... (Blake Carver) writes: > Subroutine main redefined Do you have any repetition in your apache .conf files, perhaps an Include that's in there twice? Check /usr/local/apache/conf/httpd.conf and chase down the chain of files that get Include'd -- probably /usr/local/slash/httpd/slashd.conf and /usr/local/slash/site/www.lisnews.com/www.lisnews.com.conf . -- Jamie McCarthy http://mccarthy.vg/ ja...@mc... |
From: shane <sh...@lo...> - 2003-09-30 22:19:14
|
On Tuesday 30 September 2003 17:12, Blake Carver wrote: > I'm not sure what happened, but comments.pl has died on me, and the errors > being generated don't make much sense to me. As far as I know nothing in > the file, or the Db has changed. > > Can anyone shed any light on where to start tracking this one down? What version of comments.pl are you using? Look in it's header. |
From: Blake C. <li...@li...> - 2003-10-01 01:55:01
|
Ack, sorry...should've included that. I've actually now tried 2 older ones from the CVS, and the very latest from the CVS. All gave me the same error, which leads me to believe that it's not really that file, it's something else. I'm begining to think that it has to do with me installing the Mail::SpamAssassin Perl module this morning, since I think it started happening just after I did that. -Blake ----- Original Message ----- From: "shane" <sh...@lo...> To: <sla...@li...> Sent: Tuesday, September 30, 2003 6:19 PM Subject: Re: [Slashcode-general] comments.pl has croaked > On Tuesday 30 September 2003 17:12, Blake Carver wrote: > > I'm not sure what happened, but comments.pl has died on me, and the errors > > being generated don't make much sense to me. As far as I know nothing in > > the file, or the Db has changed. > > > > Can anyone shed any light on where to start tracking this one down? > > What version of comments.pl are you using? Look in it's header. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Slashcode-general mailing list > Sla...@li... > https://lists.sourceforge.net/lists/listinfo/slashcode-general > > |
From: shane <sh...@lo...> - 2003-10-01 09:40:28
|
On Tuesday 30 September 2003 21:54, Blake Carver wrote: > Ack, sorry...should've included that. > > I've actually now tried 2 older ones from the CVS, and the very latest from > the CVS. All gave me the same error, which leads me to believe that it's > not really that file, it's something else. > > I'm begining to think that it has to do with me installing the > Mail::SpamAssassin Perl module this morning, since I think it started > happening just after I did that. $cat -n /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Slash/DB/Utility.pm | less 614 sub sqlSelectAllHashref { 615 my($self, $id, $select, $from, $where, $other) = @_; 616 # Yes, if $id is not in $select things will be bad 617 618 # Allow $id to be an arrayref to collect multiple rows of result s 619 # keyed by more than one column. E.g. if you "GROUP BY foo, bar " 620 # then pass "[qw( foo bar )]" for $id and the column "baz" will 621 # be at $returnable->{$foovalue}{$barvalue}{baz}. 622 $id = [ $id ] if !ref($id); 623 624 my $sql = "SELECT $select "; 625 $sql .= "FROM $from " if $from; 626 $sql .= "WHERE $where " if $where; 627 $sql .= "$other" if $other; 628 629 my $qlid = $self->_querylog_start("SELECT", $from); 630 my $sth = $self->sqlSelectMany($select, $from, $where, $other); 631 my $returnable = { }; 632 while (my $row = $sth->fetchrow_hashref) { 633 my $reference = $returnable; 634 for my $next_id (@$id) { 635 $reference = \%{$reference->{$row->{$next_id}}}; 636 } 637 %$reference = %$row; 638 } 639 $sth->finish; 640 $self->_querylog_finish($qlid); 641 642 return $returnable; 643 } Seeing as that is *very* stable code (as far as I'm aware, I mean if there wre problems with it, man, everyone who runs slash would be having a rough week) I'm guessing your perl (ie your mysql/db) modules are screwed. I'd check that out first. I'd also go into mysql and run that query by hand from the cli, to make sure the table structure's OK. |