vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] Alert box when attempting pm staff - View Topic
Topic Rating: *****
Printable View
This topic was locked 7th Mar 08 at 4:51pm by Marc
Tim
Senior Member
****
banned.

[Avatar]
The only easy day was yesterday.

Posts: 698
Status: Offline
Gender: Male
Location: Under your bed..in your closet..in your head
Age: 35
Joined:  
Reputation: 4%  


pmmsn
[F] Alert box when attempting pm staff (6th Mar 08 at 9:53pm UTC)
Could I get a code to where When a member tries to pm a staff member an alert box comes up with a message that I put.?

Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Alert box when attempting pm staff (6th Mar 08 at 9:56pm UTC)
Try this:

<script>
function pm_user(member, message){
    if(location.href.match(/\/pm_send\//) && location.href.match(member)){
        alert(message);
    }
}

pm_user('admin', 'Please Do Not PM the Admin!');
pm_user('god','I really am not God!');
</script>


Main Header

Untested, try it! {Smile}
Tim
Senior Member
****
banned.

[Avatar]
The only easy day was yesterday.

Posts: 698
Status: Offline
Gender: Male
Location: Under your bed..in your closet..in your head
Age: 35
Joined:  
Reputation: 4%  


pmmsn
Re: Alert box when attempting pm staff (6th Mar 08 at 10:03pm UTC)
Will staff members see this alert as well?

Heres how I did it.

<script>
function pm_user(member, message){
if(location.href.match(/\/pm_send\//) && location.href.match(member)){
alert(message);
}
}

pm_user('admin', 'Please only PM me if you wanna say HI or if theres a conflict between member and staff.
Thanks.');
pm_user('masonfett','IPlease do not pm me regarding support issues or to request a graphic. All graphic request go in graphics section.
Thanks.');
</script>

Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Alert box when attempting pm staff (6th Mar 08 at 10:13pm UTC)
Yes staff will see them as well.
Tim
Senior Member
****
banned.

[Avatar]
The only easy day was yesterday.

Posts: 698
Status: Offline
Gender: Male
Location: Under your bed..in your closet..in your head
Age: 35
Joined:  
Reputation: 4%  


pmmsn
Re: Alert box when attempting pm staff (7th Mar 08 at 3:14am UTC)
Well, it's not working, and again, heres how the code is.

<script>
function pm_user(member, message){
if(location.href.match(/\/pm_send\//) && location.href.match(member)){
alert(message);
}
}

pm_user('admin', 'Please only PM me if you wanna say HI or if theres a conflict between member and staff.
Thanks.');
pm_user('masonfett','IPlease do not pm me regarding support issues or to request a graphic. All graphic request go in graphics section.
Thanks.');
</script>

Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Alert box when attempting pm staff (7th Mar 08 at 3:39am UTC)
 
Well, it's not working, and again, heres how the code is.

<script>
function pm_user(member, message){
if(location.href.match(/\/pm_send\//) && location.href.match(member)){
alert(message);
}
}

pm_user('admin', 'Please only PM me if you wanna say HI or if theres a conflict between member and staff.
Thanks.');
pm_user('masonfett','IPlease do not pm me regarding support issues or to request a graphic. All graphic request go in graphics section.
Thanks.');
</script>


You can't have line breaks in the code, rather than pressing Enter, type \n. {Wink}

rroll.to— Shorten a link, rickroll your friends.
Tim
Senior Member
****
banned.

[Avatar]
The only easy day was yesterday.

Posts: 698
Status: Offline
Gender: Male
Location: Under your bed..in your closet..in your head
Age: 35
Joined:  
Reputation: 4%  


pmmsn
Re: Alert box when attempting pm staff (7th Mar 08 at 4:16am UTC)
*high-fives Marc and Wrighty*

Thanks guys, it worked perfectly!!!!!

 Printable View

All times are GMT+0 :: The current time is 6:21pm
Page generated in 0.1716 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums