Simple Machine Codes
April 20, 2024, 05:23:11 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Whisper Tag

Pages: [1]   Go Down
  Print  
Author Topic: Whisper Tag  (Read 1062 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: March 27, 2008, 07:54:15 pm »

Footers:
Code:
<script>
var User = $("td.titlebg2 span b").not($("td.titlebg2 span b:contains(News)")).html();
$("div.post").each(function(){
//Created by Agent Moose (smcodes.smfforfree3.com)
if(this.innerHTML.match(/\[whisper=(.*)\](.*)\[\/whisper\]/i)){
if(RegExp.$1 == User){
this.innerHTML = this.innerHTML.replace(/\[whisper=(.*)\](.*)\[\/whisper\]/i,"<div><div><a href='javascript:void(0)' onclick='$(this).parent().next().toggle()'>(Show/Hide Whisper For " + RegExp.$1 + ")</a></div><div style='display:none' id='whisper'>" + RegExp.$2 + "</div></div>");
}else{
this.innerHTML = this.innerHTML.replace(/\[whisper=(.*)\](.*)\[\/whisper\]/i,"");
};};});
</script>

A Whisper tag will show only to A specified User.
Just place [whisper=USERNAME]TEXT[/whisper] in a post and it will only show to the User you put for the USERNAME.  There will be a link in the Post for the User that will look like this:

(Show/Hide Whisper For USERNAME)

USERNAME = The User that will see the Whisper.  Only he/she may see it too.
TEXT = the Text for the User to see.


Enjoy Smiley
Report Spam   Logged

Share on Facebook Share on Twitter

Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: 1,337


aka Omikron


View Profile WWW
« Reply #1 on: March 28, 2008, 01:29:00 am »

Heh I see you've gotten around to making this at last.
Report Spam   Logged

Myrtle
The Girl With The Forum.
100 Club Member

Offline Offline

Gender: Female
Posts: 480


Death Note(Credits to Kai): Myrtle_Gail, Myr-chan


View Profile WWW
« Reply #2 on: March 28, 2008, 03:46:32 am »

Awesome this will match the spoiler tag. Thanks!  Grin hahah...
Report Spam   Logged

123owned123
100 Club Member

Offline Offline

Posts: 351



View Profile
« Reply #3 on: March 28, 2008, 06:47:26 am »

thanks .... looks great  Cheesy
Report Spam   Logged

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« Reply #4 on: March 28, 2008, 03:47:02 pm »

Heh I see you've gotten around to making this at last.
Yep.  Took me awhile to figure out how exactly to do it, and yet, it stlll isn't exactly how I want it, but it works for now Smiley

And Im glad you all like it Smiley
Report Spam   Logged

Myrtle
The Girl With The Forum.
100 Club Member

Offline Offline

Gender: Female
Posts: 480


Death Note(Credits to Kai): Myrtle_Gail, Myr-chan


View Profile WWW
« Reply #5 on: March 30, 2008, 04:52:03 am »

Seriously, It totally matches the Spoiler Tag. Awesome code again  Afro
Report Spam   Logged

sweet_candygirl23
Members

Offline Offline

Posts: 41


View Profile
« Reply #6 on: March 31, 2008, 03:25:23 am »

Do admins / staffs see the whispers of members??
Report Spam   Logged
Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: 1,337


aka Omikron


View Profile WWW
« Reply #7 on: March 31, 2008, 03:29:47 am »

Naw only that user. But it shows up when you try to edit their posts.
Report Spam   Logged

sweet_candygirl23
Members

Offline Offline

Posts: 41


View Profile
« Reply #8 on: March 31, 2008, 03:32:02 am »

Okay. Thanks for answering. Smiley
Report Spam   Logged
CodeLover
100 Club Member

Offline Offline

Gender: Male
Posts: 331


View Profile
« Reply #9 on: April 29, 2008, 07:19:01 am »

Hey Moose, is it okay if I use this and change the BBCode so I can make my own BBCode?

Please Respond,
CodeLover
Report Spam   Logged

Don't get mad at me if I'm acting immature - I'm only 10 Grin


Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy