Page Index Toggle Pages: [1] 2 3 ... 12 Send TopicPrint
Very Hot Topic (More than 25 Replies) Board Whisper (Read 63281 times)
Fretzy
New Member
*
Offline



Posts: 12
Joined: Jan 1st, 2003
Gender: Male
Board Whisper
Jan 3rd, 2003 at 12:11am
Print Post  
Anyone know if there are any Mods that add the ability to whisper? To whisper you would use something like...

[whisper=username]WHISPER TEXT[/whisper]

and then only the person you listed in Username would be able to see the whisper text.

If not, I think this would be a useful mod, especially for RPG boards!



This mod is now made, the latest version which is practically bugridden can be found here
« Last Edit: Jun 30th, 2003 at 3:46pm by Christer Alexander »  
Back to top
WWWAIM  
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Board Whisper
Reply #1 - Jan 3rd, 2003 at 6:00pm
Print Post  
this'd probably be a nice mod, I guess.
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Board Whisper
Reply #2 - Jan 3rd, 2003 at 7:41pm
Print Post  
guess who sat down and is making it -.-
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
Fretzy
New Member
*
Offline



Posts: 12
Joined: Jan 1st, 2003
Gender: Male
Re: Board Whisper
Reply #3 - Jan 4th, 2003 at 12:03am
Print Post  
Hehehehehe.. hows it coming?
  
Back to top
WWWAIM  
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Board Whisper
Reply #4 - Jan 4th, 2003 at 12:10am
Print Post  
guess who is releasing a beta now -.-
« Last Edit: Jan 4th, 2003 at 12:54pm by Christer Alexander »  

whispermod1.mod ( 0 KB | Downloads )

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
Fretzy
New Member
*
Offline



Posts: 12
Joined: Jan 1st, 2003
Gender: Male
Re: Board Whisper
Reply #5 - Jan 4th, 2003 at 3:03am
Print Post  
Installed the mod, got the following error on every post I put up after it was installed (regardless of whether there was a whisper in it or not):


Quote:
Bareword found where operator expected at ./Sources/YaBBC.pl line 195, near "$message =~ s~\[/list" (Might be a runaway multi-line // string starting on line 185)


Also, and perhaps more importantly, when this mod was installed, and I tried to load the main YaBB.cgi page, the boards all disappeared.
  
Back to top
WWWAIM  
IP Logged
 
BHRA Webmaster
God Member
*****
Offline


Mod Author of the Year
2002

Posts: 5238
Location: BHRA Headquarters
Joined: Jan 18th, 2002
Gender: Male
Re: Board Whisper
Reply #6 - Jan 4th, 2003 at 11:47am
Print Post  
Code
Select All
	if($message =~ [highlight size=2 color=red background=]/[/highlight]\[whisper\=$username](.+?)\[\/whisper\][highlight size=3 color=red background=]~[/highlight] || $musername eq $username || $moderators{$username} || $settings[7] eq 'Administrator' ) {
 


(These should both be ~ or /, not one of each!)
  


World Domination, one smiley at a time!
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Board Whisper
Reply #7 - Jan 4th, 2003 at 12:52pm
Print Post  
darn...that's what happens when you code at 1AM -.-

New beta attached in previous post
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
BHRA Webmaster
God Member
*****
Offline


Mod Author of the Year
2002

Posts: 5238
Location: BHRA Headquarters
Joined: Jan 18th, 2002
Gender: Male
Re: Board Whisper
Reply #8 - Jan 4th, 2003 at 12:56pm
Print Post  
There were another couple of problems which prevented the whispered text from showing (and it got very confused if you whispered to more than one person in the same message!) Try the following instead:

Code
Select All
<edit file>
Sources/YaBBC.pl
</edit file>

<search for>
sub quotemsg {
</search for>

<add before>
sub whisper {
      my ($whisper_name, $whisper_msg) = @_;
      if ($whisper_name eq $username) {
            return qq~Whisper: $whisper_msg~;
      } elsif ($username eq $musername || $moderators{$username} || $settings[7] eq 'Administrator') {
            return qq~Whispers to $whisper_name: $whisper_msg~;
      } else {
            return qq~~;
      }
}

</add before>

<search for>
      $message =~ s~\/me\s+(.*)~<font color="#FF0000">* $displayname $1</font>~ig;
</search for>

<add after>
      $message =~ s~\[whisper\=(.+?)\](.+?)\[\/whisper\]~&whisper($1,$2)~eisg;
</add after> 



There are still some things that may need to be addressed:
1...When you quote a whispered message, it is visible in the message textarea on the post page.
2...The author of the message cannot see whispered text (the $musername variable isn't normally available in the YaBBC.pl file.)
3...The code above has two different messages depending on who is viewing the whispered message and who it was intended for. I think I prefer the one that admins/moderators see that includes the name of the intended recipient. This may have to be altered so that it shows the screen name instead of the username.
4...Some formatting will probably have to be added to whispered text to make it stand out from the rest.
  


World Domination, one smiley at a time!
Back to top
 
IP Logged
 
BHRA Webmaster
God Member
*****
Offline


Mod Author of the Year
2002

Posts: 5238
Location: BHRA Headquarters
Joined: Jan 18th, 2002
Gender: Male
Re: Board Whisper
Reply #9 - Jan 4th, 2003 at 1:03pm
Print Post  
5...Don't forget: When you add extra UBBC tags, they will have to be added to Printpage.pl as well!
  


World Domination, one smiley at a time!
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Board Whisper
Reply #10 - Jan 4th, 2003 at 2:31pm
Print Post  
I think I've done most of what you listed, please check the mod file again Smiley
  

whispermod2.mod ( 4 KB | Downloads )

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
alexik
Senior Member
****
Offline


gone with the wind

Posts: 275
Location: Lahti
Joined: Dec 20th, 2002
Gender: Male
Re: Board Whisper
Reply #11 - Jan 4th, 2003 at 4:19pm
Print Post  
Seems to be working.
When the user to whom the whisper is intented reads it, it shows this:

[quote]Whisper to you from : Does this work?[/quote]
So it doesn't show the user the msg is from? Should it? I think not, as you can see from whom the whole msg is.

If somebody else reads it, it says:

[quote][This is a private whisper to][/quote]

Now I should try to find certain places in order to get the texts in Finnish. Uh.
  
Back to top
 
IP Logged
 
alexik
Senior Member
****
Offline


gone with the wind

Posts: 275
Location: Lahti
Joined: Dec 20th, 2002
Gender: Male
Re: Board Whisper
Reply #12 - Jan 4th, 2003 at 4:27pm
Print Post  
Whisper is hidden when quoted.

Goody!
  
Back to top
 
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: Board Whisper
Reply #13 - Jan 4th, 2003 at 4:58pm
Print Post  
Alexik - will be fixed Smiley
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: Board Whisper
Reply #14 - Jan 4th, 2003 at 5:17pm
Print Post  
Working nicely Christer  Cheesy

alexik wrote on Jan 4th, 2003 at 4:27pm:
Whisper is hidden when quoted.

Exactly as in real life - how about whisper to everybody but...

Quote:
Alexik - will be fixed Smiley

How are you gonna fix Alexik   ???
Did you ever meet a whispering Finn  Grin
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 ... 12
Send TopicPrint