View Full Version : Buddy Messenger v1.1
kaost451
08-31-2002, 10:00 PM
Buddy Messenger v1.1
This hack add's a nice drop down menu to your index page (pminfo), It's a fast way to contact your buddy's via private message. It is color organized for Online buddies (Red) and Offline buddies (Gray). This hack isn't a final version, There are no reported bugs, but I would like to update it a little more. This hack works with all 2.x versions.
*This modification is originally for a buddy panel I am working on, But I decided to release this because some people might just want this as a separate hack, considering the buddy panel will have completely different options.
Screenshot:
http://www.pixelcentric.com/images/buddymsg.gif
If there is any problems, please let me know. Thanks.
UPDATED: 11-3-02 : 1:37 PM
Attrox
09-01-2002, 09:44 PM
Oh, very cool idea. I'll be installing this, nice job! It is a very unique and usefull hack, in my opinion.
kaost451
09-01-2002, 09:49 PM
Ooops, Here is the right Buddy_go Image.
ULTIMATESSJ
09-01-2002, 10:42 PM
pretty good
kaost451
09-01-2002, 10:44 PM
Thanks, Just a simple hack. I'm sure the members will like it.
bluecat
09-01-2002, 11:09 PM
How can I make the little icon sit to the left of the drop down menu? Cool hack too. :D
[D]Vincent
09-02-2002, 01:49 AM
Nice hack, I'll install it when I have some extra time.
Mystic Gohan
09-02-2002, 04:29 AM
looks very nice I will be installing
Mystic Gohan
09-02-2002, 04:55 AM
works great took me some time to work out a few kinks and I took out a few extra codes but now it works fine
Mystic Gohan
09-02-2002, 04:58 AM
heh sorry for the triple post BUT I found another bug that I cant work out its a Javascript error because it wont let me click on the button it tells me I have an error on the page (in explorer bar)
Mathieu
09-02-2002, 06:37 AM
a nice hack I'll install it when I have time.
thx
Dean C
09-02-2002, 07:05 AM
lol nice hack mate... ill install it later on RS ;)
Kars10
09-02-2002, 09:41 AM
This Hack is great...but in my Forum it adds 12 Querys to my Index.php...
Thats a lot! ;)
kaost451
09-02-2002, 04:41 PM
yeah I know a lot of querys, Only because It is for a complete buddy panel, if anyone would like to work on this a little more feel free too.
Kars10
09-02-2002, 04:57 PM
Originally posted by kaost451
yeah I know a lot of querys, Only because It is for a complete buddy panel, if anyone would like to work on this a little more feel free too.
Like i said, its a great Hack...and i would like to have it on my Board. But i don?t think you can reduce the Querys.
Its the Problem of the Buddylist at all... :ermm:
kaost451
09-02-2002, 05:04 PM
yeah, maybe firefly or someone can look at this and maybe reduce the query's, please keep in mind this isn't final I'm sure i'll work out the kinks.
Darkwolf
09-02-2002, 05:14 PM
Nice one :)
ZiRu$
09-02-2002, 07:02 PM
DAMN.......very nice idea.....will install RIGHT NOW
ZiRu$
09-02-2002, 07:56 PM
um......ok I installed it....I had to modify it a little to fit my design....it shows up....colors/buddies/everything EXCEPT it isn't LINKED To the PM...
here's part of the code i have..also not sure if it makes a difference but it's in my FORUMHOME template.....not my pmloggedin
<form name="buddyjump">
<img src="{imagesfolder}/buddy_go.gif" border="0" alt="Message Buddy"><script>
function jumpMenu(){
location=document.buddyjump.buddymenu.options[document.buddyjump.buddymenu.selectedIndex].value;
}
</script>
<smallfont>
<select name="buddymenu" size="1">
<option>Buddy Messenger</option>
<option>Online Buddies</option>
$onlinebuddy
<option>Offline Buddies</option>
$offlinebuddy
</select></smallfont></td>
<a href="Javascript:jumpMenu()"></a>
</td></form>
help?
JCFN TeK gEEk
09-02-2002, 08:20 PM
im kinda confused were to add this??
==========================
STEP FIVE --> Add 2 New Replacments {buddyon} and {buddyoff}.
==========================
** Inside {buddyon} Add:
style="color:#FF0000"
** Inside {buddyoff} add:
style="color:#969EAF"
kaost451
09-02-2002, 09:30 PM
Post #19: You might need to go back and be sure you didn't miss anyparts. It should work fine, I'll double check for you.
Post #20: You have to go to your replacment set's and add new replacments, one called {buddyon} and another called {buddyoff} -- Hope that helps
kaost451
09-02-2002, 09:39 PM
I looked over the script and I don't see any problems. Try this if you are having java errors, otherwise it's not the script.
Find:
<form name="buddyjump">
<script>
function jumpMenu(){
location=document.buddyjump.buddymenu.options[document.buddyjump.buddymenu.selectedIndex].value;
}
</script>
<td valign="middle" align="right">
<smallfont>
<select name="buddymenu" size="1">
<option>Buddy Messenger</option>
<option>Online Buddies</option>
$onlinebuddy
<option>Offline Buddies</option>
$offlinebuddy
</select></smallfont></td>
<td width="22" valign="middle" align="left">
<a href="Javascript:jumpMenu()"><img src="{imagesfolder}/buddy_go.gif" border="0" alt="Message Buddy"></a>
</td></form>
</tr></table>
</td></tr>
Replace With:
<form name="jump">
<script>
function jumpMenu(){
location=document.jump.menu.options[document.jump.menu.selectedIndex].value;
}
</script>
<td valign="middle" align="right">
<smallfont>
<select name="menu" size="1">
<option>Buddy Messenger</option>
<option>Online Buddies</option>
$onlinebuddy
<option>Offline Buddies</option>
$offlinebuddy
</select></smallfont></td>
<td width="22" valign="middle" align="left">
<a href="Javascript:jumpMenu()"><img src="{imagesfolder}/buddy_go.gif" border="0" alt="Message Buddy"></a>
</td></form>
</tr></table>
</td></tr>
if you still have problems, let me know. If anyone has got this installed let me know. thanks.
JCFN TeK gEEk
09-02-2002, 10:53 PM
yah.. but where do i go, to find and add those new replacements? im totally lost here!
BigJohnson
09-03-2002, 12:41 AM
Ya i get an error too. This is what happens. It works great when linking to the Pm thing for the buddy but when you highlight OFFLINE BUDDY and click the button you get the error saying there is an error. Is there any way to not get this to show up?
huh, buddies in a dropdown list in forumhome..
who would have thunk it..
https://vborg.vbsupport.ru/showthread.php?postid=246171#post246171
none the less, I shall install it.
kaost451
09-03-2002, 04:01 PM
ohh damn, I never seen that.. sorry.. well there you go you can use either one. If you are getting any errors (which I didn't) then It is probably the drop down script. I'll look into it
BigJohnson
09-03-2002, 04:54 PM
Ya but I like this drop down alot better than that one.
ZiRu$
09-03-2002, 05:06 PM
me too...but it dont link to the buddies :(
kaost451
09-03-2002, 05:12 PM
Okay here is the solution, In step four add this instead.
This should fix the problem.
<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="6"><a href="private.php?s=$session[sessionhash]" title="Click Here to Open Your Private Messages $inboxname"><normalfont color="{categoryfontcolor}"><b>Private Messages</normalfont></b></a></td>
</tr>
<tr>
<td bgcolor="{secondaltcolor}" align="center" valign="top"><img src="{imagesfolder}/$lightbulb.gif" alt=""></td>
<td bgcolor="{firstaltcolor}" colspan="5">
<table cellpadding="0" cellspacing="0" width="100%">
<tr><td width="100%" valign="middle"><smallfont>
<b>$bbuserinfo[username]</b> - You have $newpm[messages] new message(s) since your last visit.<br>
(You have $unreadpm[messages] unread messages and $allpm[messages] total messages in all your folders.)</smallfont></td>
<form name="buddyjump">
<td valign="middle" align="right"><smallfont>
<select name="buddymenu" onChange="location=document.buddyjump.buddymenu.options[document.buddyjump.buddymenu.selectedIndex].value;" value="GO">
<option selected>Buddy Messenger</option>
$onlinebuddy
$offlinebuddy
</select>
</smallfont></td></form>
</tr></table>
</td></tr>
Now if you would like to add more options to
your buddy messenger, you may add three new
options, profile, send pm and remove buddy.
ex:
username(1)
- Send PM
- Remove
username(2)
- Send PM
- Remove
Just open buddy_messenger and replace it with:
<option $onoff value="member.php?s=$session[sessionhash]&action=getinfo&userid=$buddy[userid]">$buddy[username]</option>
<option value="private.php?s=$session[sessionhash]&action=newmessage&userid=$buddy[userid]">- Send PM</option>
<option value="member2.php?s=$session[sessionhash]&action=removelist&userlist=buddy&userid=$buddy[userid]">- Remove</option>
kaost451
09-03-2002, 05:41 PM
Here I updates the hack. Just go ahead and reinstall it if you are having problems.
Originally posted by JCFN TeK gEEk
im kinda confused were to add this??
In admin cp look down left hand side and you will see
Replacements
Add | Modify | Add Set
Just add them their if they aint already
kaost451
09-03-2002, 06:01 PM
thanks mr p, I put a novice section inside the updated version. explaining where the replacments are.
JCFN TeK gEEk
09-03-2002, 08:38 PM
<-- is a novice so thanx :confused:
Mystic Gohan
09-04-2002, 12:28 AM
looks good I re-installed works good now thanks much
ZiRu$
09-04-2002, 03:16 AM
thx alot man....the fix works perfect :)
Darth Cow
09-04-2002, 03:40 AM
Originally posted by kaost451
yeah, maybe firefly or someone can look at this and maybe reduce the query's, please keep in mind this isn't final I'm sure i'll work out the kinks.
What would the SQL be to simply get buddies without worrying about whether they are online or not? Would that be a helpful reduction?
kaost451
09-05-2002, 01:30 AM
What would the SQL be to simply get buddies without worrying about whether they are online or not? Would that be a helpful reduction?
Yeah I could do that, but then again I kinda like the fact you can see what buddies are online.
I'm glad the update fixed the problem.
FleaBag
09-05-2002, 01:46 AM
This is a class hack! Installed in under 2 minutes on 2.2.7, working flawlessly! Thanks. :D
kaost451
09-05-2002, 01:47 AM
great!! love to hear that!
Cyberhouse
10-10-2002, 06:58 AM
Very nice hack, my members love it.... Thanks
FleaBag
10-13-2002, 04:43 PM
Since I installed this hack I have the private messages column appear to guests, with null stats. I'm assuming this was something to to with the modifications to index.php? Can anyone advise me on how to prevent this from happening?
FleaBag
10-16-2002, 05:13 PM
*Bump*
Dynamic One
11-01-2002, 07:16 PM
Yes found it. Was searching a while for this one. Saw it on a site and it's great.
Tenpit
11-26-2002, 01:13 AM
Originally posted by GamerForums
Since I installed this hack I have the private messages column appear to guests, with null stats. I'm assuming this was something to to with the modifications to index.php? Can anyone advise me on how to prevent this from happening?
No doubt someone will speak out with a better way of doing this, my way is probably a bit of a fudge, but. . .
I got around this problem by replacing step 2 with:
// Buddy Messenger v1.1
if ($enablepms==1 and $permissions['canusepm'] and $bbuserinfo['receivepm']) {
$datecut = time() - $cookietimeout;
$buddyuserssql=str_replace(" ","' OR user.userid='",$bbuserinfo[buddylist]);
$sql="SELECT DISTINCT session.lastactivity, user.userid,username,NOT ISNULL(session.sessionhash) AS online,invisible
FROM user
LEFT JOIN session ON session.userid=user.userid
WHERE (user.userid='$buddyuserssql')
ORDER BY username";
//$sql="SELECT * FROM user WHERE (userid='$buddyuserssql') AND invisible=0 ORDER BY username";
$buddys=$DB_site->query($sql);
$onlinebuddy="";
$offlinebuddy="";
while ($buddy=$DB_site->fetch_array($buddys)) {
if ($userdone[$buddy[userid]]) {
continue;
} else {
$userdone[$buddy[userid]]=1;
}
if ($buddy[online] and !$buddy[invisible] and $buddy[lastactivity]>$datecut) {
$onoff="{buddyon}";
} else {
$onoff="{buddyoff}";
}
eval("\$var = \"".gettemplate("buddy_messenger")."\";");
if ($buddy[online] and !$buddy[invisible] and $buddy[lastactivity]>$datecut) {
$onlinebuddy.=$var;
} else {
$offlinebuddy.=$var;
}
}
eval("\$pminfo = \"".gettemplate('forumhome_pmloggedin')."\";");
}
// End Of Buddy Messenger v1.1
FleaBag
11-26-2002, 04:30 PM
Thanks Tenpit - it worked. Little things like that annoy me! :)
snout
11-30-2002, 03:14 PM
very cool of ya :) Im installing now...
Jitway
11-30-2002, 09:20 PM
Same here very cool hack. Keep up the good work. :banana:
xpguy
03-06-2003, 07:50 PM
i get some weird things on mine : http://www.windowsos.com/forum/
and i have tryed replacing the files and deleteing the templates but still the same what do i do??
Splitfyre
06-25-2003, 04:28 PM
I'm getting something weird. When I receive a message from a buddy, and then if I quote what he says, it will not show anything from the quote.
Have any of you, who've installed this hack, run into this?
Splitfyre
06-30-2003, 06:58 PM
Cool hack except when it tells you whose added you. It says:
[code]
[DELETED USER]has added you to his/her buddy list.
This is a automated message. Please do not reply. it!
[code]
How can I ensure that it pulls the right username?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.