View Full Version : QuickPM -Send a user a private message from his profile page..
EvilLS1
08-20-2003, 05:23 AM
I made this for someone who requested it about a week ago ( requested here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=49548) ).. I decided to install it on my own forum and my users thought it was pretty neat so I figured I'd share it here.
This template modification will add a button to the profile page for all of your users. When clicked, a Quick PM box will pop up (via javascript) allowing you to instantly send that user a private message without having to load another page.
Screenshots
View after button is clicked:
Screenshot 1 (https://vborg.vbsupport.ru/attachment.php?s=&postid=427265)
View before button is clicked:
Screenshot 2 (https://vborg.vbsupport.ru/attachment.php?s=&postid=427266)
EvilLS1
08-20-2003, 05:24 AM
screenshot 1
EvilLS1
08-20-2003, 05:25 AM
screenshot 2
BladeZz
08-20-2003, 08:32 AM
Works great! Thank you very much.
EvilLS1
08-22-2003, 08:24 PM
You're welcome. :)
Dean C
08-22-2003, 09:16 PM
Nice us of JS again ;)
Does it work in all the major browsers?
EvilLS1
08-22-2003, 09:32 PM
Thanks Mist. :)
I've tested it with IE 6.0, Opera 7, and Mozilla.. Works great with all of those.
Tes One
08-26-2003, 05:46 PM
Hey Evil,
Awesome work! I have added both the QuickPM and QuickQuote to a style I am working on and it works great!
I do have a quick question about the Quick PM feature though. I have added it to the profile page as your script suggests, however I also added it to the postbit ? under the user?s info and avatar, I have placed the ?QuickPM?. It works perfectly, however when the button is pressed, the pop window will only show up under whoever the top poster of that page is (make sense? :) ). Sorry if that sounds confusing. The problem is the QuickPM window does not behave like the QuickQuote window does when placed in the postbit. Is there anything in the JS that would place the QuickPM window under the correct user?
Thanks-
Tes
EvilLS1
08-26-2003, 07:48 PM
Tes,
Since the form will be loaded in each postbit you'll have to give each form a unique ID for the toggle function. You can easily do that by using the $post[postid] variable.
In the QuickPM html find:
<input name="r2" type="button" class="bginput" value="QuickPM" onClick="toggleT('qpm','s')">
Replace with:
<input name="r2" type="button" class="bginput" value="QuickPM" onClick="toggleT('q$post[postid]','s')">
Find:
<div id="qpm" style="VISIBILITY: hidden; POSITION: absolute">
Replace with:
<div id="q$post[postid]" style="VISIBILITY: hidden; POSITION: absolute">
Find:
<input name="r2" type="button" class="bginput" value="Hide" onClick="toggleT('qpm','h')">
Replace with:
<input name="r2" type="button" class="bginput" value="Hide" onClick="toggleT('q$post[postid]','h')">
That should do it.
BTW, you should check out Quick Quote II.. Its much better than the first Quick Quote hack. There's a link to it in my profile.
Later,
Dewayne
gmarik
08-27-2003, 06:32 AM
Oh, sounds nice, ok for 2.32?
EvilLS1
08-27-2003, 11:13 AM
It should work with any 2.X vb. :)
Tes One
08-27-2003, 07:06 PM
Brilliant idea with the postID variable! Worked like a charm. :) Thank you!
In regards to QuickQuote II, I would love to use it however I use a template modification for my Quick Reply box rather then Firefly?s hack, and QQII doesn?t recognize it. :( It?s no problem for me though, QQI works just fine and I think my members will love it once I launch the new style set.
Thanks again! Great mod!!
Tes
EvilLS1
08-28-2003, 12:54 AM
Thanks! Glad it worked for ya. :)
Bison
09-16-2003, 11:31 PM
This is really neat ... thanks!
EvilLS1
09-17-2003, 05:59 AM
You're welcome. :)
The Wise One
09-20-2003, 02:56 PM
real nice mod. like it alot :thumb:
i have a small annoyance with it tho. i followed instructions and every time i actually use the QPM, i get a runtime error.
"A runtime error has occured
do you wish to debug?
line: 215
error: object expected"
any idea why? it happens on my forum as well as another i visit that uses it.
EvilLS1
09-20-2003, 05:39 PM
Wise One,
I went to your site to take a look and Its working fine for me.. So I'm guessing its a browser issue. What broswer are you using? If its an old version, an update might be needed.
If you're using IE, try this:
On the Internet Explorer menu, click tools, internet options, then click on the advanced tab. Under the heading 'Browsing', make sure there is a check mark by 'Disable script debugging'.
If you use Norton anti-virus try turning script blocking off and see if you still get the error.
If you're still getting the error try removing this section of code from the javascript:
else { // is NS?
if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
}
Vigile
09-22-2003, 08:09 AM
Looks good, tested good, but it seems that a PM generated with the QPM mod here does not get listed in a user's 'tracking' folder in their PM center.
Is there a reason for this, is there a fix for this?
(I presume an input function would need to be defined for this to work, I just dont know what that is)
EvilLS1
09-22-2003, 07:56 PM
Vigile,
I'm not really sure how the tracking deal works, but you could try adding this to the form:
<input type="hidden" name="pmreceipt" value="yes">
Vigile
09-22-2003, 08:30 PM
gracias. that worked :)
EvilLS1
09-22-2003, 09:11 PM
De nada. Glad it worked for ya. :)
The Wise One
09-24-2003, 09:58 PM
Wise One,
I went to your site to take a look and Its working fine for me.. So I'm guessing its a browser issue. What broswer are you using? If its an old version, an update might be needed.
If you're using IE, try this:
On the Internet Explorer menu, click tools, internet options, then click on the advanced tab. Under the heading 'Browsing', make sure there is a check mark by 'Disable script debugging'.
If you use Norton anti-virus try turning script blocking off and see if you still get the error.
If you're still getting the error try removing this section of code from the javascript:
else { // is NS?
if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
}
thanks for the reply. sorry i didnt get back to this sooner...but for some reason, i didnt get an email notify for this thread...
turning off the debugging in IE worked. i never had a problem with it working...i just kept getting this error. i have attatched it below.
anyways...thanks for the tip :)
EvilLS1
09-24-2003, 10:23 PM
N/P.. Script debugging is disabled by default on IE, so I doubt that any of your other users are getting the error. But if you want to make it go away even with script debugging enabled you could remove that section of code that I posted above.. That should fix it.
The Wise One
09-24-2003, 10:33 PM
N/P.. Script debugging is disabled by default on IE, so I doubt that any of your other users are getting the error. But if you want to make it go away even with script debugging enabled you could remove that section of code that I posted above.. That should fix it.
thanks. i tried that before i disabled script debugging (which was not disabled by default for me...IE 6.0) and i still got the error. no other user has complained about it so i just went ahead and disabled it. all seems fine now.
thanks :)
*installs*
nice little template hack :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.