The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#12
|
|||
|
|||
Actually, I would only add it to the major templates like show/newthread, show/newreply, forumdisplay, memberlist etc.
After the time I spent on my test board creating my templates, what's a few more minutes! LOL What would I put in the template - $pminfo or something else? [Edited by Me2Be on 08-03-2000 at 04:19 PM] |
#13
|
|||
|
|||
yeah - or you could just add below all the code I told you to paste in the header, this:
$header = $pminfo; |
#14
|
|||
|
|||
I thought I saw a hack like this for the UBB. Here's how it was basically done:
It was very similar to a PM, except it checked for an instant message every time a user loaded a page. If there was a new IM, it used javascript to pop open a new window with the message in it. Not exactly instant - you have to reload or change pages to get it - but pretty close. I'd love to see someone try to implement this in a graceful manner. It has potential to be great, but could also be very ugly if not done well. |
#15
|
|||
|
|||
I love the pop-up idea - that would be excellent!
|
#16
|
|||
|
|||
Yeah, this was something that I suggested awhile back where when someone has a new message and they get on the forum it gives you a pop up that tells you you have a new message and gives you the ability to either read it there or go to the private message page.
Parker |
#17
|
|||
|
|||
That would be great. I am sure you can do it Ed.
|
#18
|
|||
|
|||
I tried coping all the info you mentioned above into my header, but I'm getting parsing errors.
Is there another, simpler way to have the PM notification appear on the forumdisplay and showthreads page? |
#19
|
|||
|
|||
I'd think that the only way to have truly "instant" messages is to run a Java applet in the pages which keeps querying the DB on a regular basis looking for new IMs -- and if you get one it can pop a window saying "Here is your new message: blah blah blah". Ive worked with Java before and it wouldn't be too hard to do if you have Java on your server -- however it would cause a huge server load if you had a lot of people online continually pegging the DB for their entire session.
|
#20
|
|||
|
|||
This will provide a pop up when you have a new private message. You need to have the Private Messages Hack by Ed Sullivan installed for it to work.
In index.php look for in the private messages hack: Code:
if ($newpmcount == 0) { $lightbulb = 'images/off.gif'; } else { $lightbulb = 'images/on.gif'; } Code:
if ($newpmcount == 0) { $lightbulb = 'images/off.gif'; } else { $lightbulb = 'images/on.gif'; eval("\$popupinfo .=\"".gettemplate("popupscript")."\";"); } Code:
{htmldoctype} <HTML> <HEAD><TITLE>$bbtitle - powered by vBulletin</title> $cssinclude </head> Code:
{htmldoctype} <HTML> <HEAD><TITLE>$bbtitle - powered by vBulletin</title> $cssinclude $popupinfo </head> popupscript and put in: Code:
<SCRIPT LANGUAGE="JavaScript"> <!-- browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 2 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 2 ))); browser4 = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ))); if (browser4) { if (!self.url) { self.url = ''; } if (parent.name != 'test') { test = window.open("http://www.yoururl.com/forum/instantprivate.html", "test", "resizable=yes,width=320,height=80"); } } else if (browser) { if (!self.url) { self.url = ''; } if (parent.name != 'test') { test = window.open("http://www.yoururl.com/forum/instantprivate.html", "test", "resizable=yes,width=328,height=100"); } } //--> </SCRIPT> open showthread.php and look for: Code:
if ($userinfo[receivepm]=="1") { $pmlink = "<a href=\"private.php?action=newmessage&toid=$userinfo[userid]\"><img src=\"images/pm.gif\" border=0></a> "; } else { $pmlink = ""; } //END PM Hack Code:
if ($userinfo[receivepm]=="1") { $pmlink = "<a href=\"private.php?action=newmessage&toid=$userinfo[userid]\"><img src=\"images/pm.gif\" border=0 alt=\"Send $userinfo[username] a Private Message\"></a> "; } else { $pmlink = ""; } $pmcounta = $DB_site->query_first("SELECT COUNT(msgid) AS msgid FROM privatercvd WHERE toid=$userid"); $pmcount = $pmcounta[msgid]; $newpmcounta = $DB_site->query_first("SELECT COUNT(msgid) AS msgid FROM privatercvd WHERE toid=$userid AND UNIX_TIMESTAMP(datetime)>$bblastvisit"); $newpmcount = $newpmcounta[msgid]; if ($newpmcount == 0) { $lightbulb = ""; } else { $lightbulb = "<a href=\"private.php\"><img src=\"images/pmon.gif\" border=0 alt=\"You have a private message. Click here to read it.\"></a>"; eval("\$popupinfo .=\"".gettemplate("popupscript")."\";"); } //END PM Hack Code:
{htmldoctype} <HTML> <HEAD><TITLE>$bbtitle - $threadtitle</title> $cssinclude <script language="javascript"> <!-- function aimwindow(aimid) { window.open("member.php?action=aimmessage&aim="+aimid,"_blank","toolbar=no,location=no,menubar=no,scrollbars=no,width=175,height=275,resizeable=yes,status=no") // --> } </script> </head> Code:
{htmldoctype} <HTML> <HEAD><TITLE>$bbtitle - $threadtitle</title> $cssinclude $popupinfo <script language="javascript"> <!-- function aimwindow(aimid) { window.open("member.php?action=aimmessage&aim="+aimid,"_blank","toolbar=no,location=no,menubar=no,scrollbars=no,width=175,height=275,resizeable=yes,status=no") // --> } </script> </head> $pmlink and add after $pmlink: $lightbulb Then after all of that create an .html file called instantprivate.html and put in: Code:
<html> <head> <title>Private Message Popup</title> </head> <body> <table> <tr bgcolor="yellow"> <td align="center"> You have new private message(s).<P> [ <a href="private.php" target="_new">Read them!</a> ]</td> </tr> </table> </body> </html> Change the .html to read or give you the layout that you want. This will give you a pop up window, with the private message hack installed, that will tell your members when they have a new message when they first get on the board and if they read a post and they have a new message. They can then go to the private message from the pop up or they will be given a new message icon in their posts. You will need to upload an image file for whatever you have the $lightbulb in the showthread.php file pointing to. You will also need to go into your admin options area and change the default time for the cookietimeout section. It is set to 14,400 and you may want to reduce this time so that your members won't be getting a pop up window each time they go to the forum. Give this a shot and let me know how it works. Parker |
#21
|
|||
|
|||
Nice work Parker. Do you have this installed anywhere for us to check out?
That sounds like its getting close to what we are looking for. One way I can think of to improve it would be to put the contents of the private message in the window itself. Also, include a reply button so a user can send an reply without having to stop what they are doing on the board. After they respond, the window can automatically close. That way, its almost just like an instant message. Of course, at this point, its probably best to make it a seperate hack (instant message as opposed to private message). Give it its own set of templates with minimal interface. With these small changes it sounds like we've almost got a decent IM tool! |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|