PDA

View Full Version : [RELEASE v2] Pop-up Buddy List


MrLister
14 Apr 2001, 16:25
Download the instructions below. I added some new features and made it so it fuses nicely with your vB. The reason why it's in a file is because this vB changes all variables into it's own #______.

TechTalk
14 Apr 2001, 17:45
Nice im using it at
http://www.iguanaland.com

I didnt take much time to mess with it but does it not use styles form the cp? The reason i ask is it comes up vb purple and i have changed all my colors.

Thanks
~Chris

TigerLily
15 Apr 2001, 02:27
I had a problem, but I got it! I just downloaded it wrong. I had to right click on the above attachment and "save target as" buddy.txt. Whenever I clicked on the attachment and saved, then uploaded I got errors. All fixed now! Great hack, and so easy to implement!
Thanks,
TigerLily:)

conan
15 Apr 2001, 09:19
Thanks man that is great!

One tiny detail though, can you make it so it uses the same CSS as the board.
On the profile buddy list it does, but the one on the pop up uses the default alink, vlink etc..

MrLister
15 Apr 2001, 18:40
done

conan
15 Apr 2001, 20:34
Thanks a lot man!

conan
16 Apr 2001, 08:34
Still not showing the same style as the board for me :(

MrLister
16 Apr 2001, 16:15
download the new files it should work

conan
16 Apr 2001, 19:44
I just downloaded the new file, overwrote everything I had and still not working :(

RobAC
16 Apr 2001, 20:47
Is this for 2.0? What's the difference between this and what already comes with 2.0 beta 5? Would it be possible to see a gif of what this hack looks like?

MrLister
17 Apr 2001, 06:06
this is for two and it's a pop up. conan make sure to read the file. the file is instuctions and it works perfectly on mine but check again.

Wayne Luke
17 Apr 2001, 07:06
Originally posted by RobAC
Is this for 2.0? What's the difference between this and what already comes with 2.0 beta 5? Would it be possible to see a gif of what this hack looks like?

You can see something similar by going to SitePointforums.com and clicking on "Launch Buddy List" in your personal features toolbar.

You will have to be a registered member to do this.

conan
19 Apr 2001, 08:24
I have uninstalled and installed this hack again 1000 times, I'm sure I'm following the exact directions, but the styles won't show properly.

The who posted hack by kier works fine with the styles and all it's beyond me why this isn't working :(

MrLister
19 Apr 2001, 15:53
well i'm not really sure try looking for stuff like #______ in the buddy_main and changing it to {f irstaltcolor} and stuff like that.

Joshs
28 Apr 2001, 21:09
How would I make the color of the username, pm function, and delete function text the same as the rest of my forum? Red not hovered; blue hovered?

Joshs
01 May 2001, 18:53
Another problem is that the window doesnt resize if the list is long...

conan
01 May 2001, 20:31
It resizes on mine, it doesn't scroll though, for you to enable scrolls you must change scrollbars=no to scrollbars=yes on forumhome template

Joshs
01 May 2001, 20:37
Here is my code... I dont know what to change to fix it...


<!-- Buddy -->
<script language="JavaScript">
function popup(url, window_name, window_width, window_height)
{ settings=
"toolbar=no,location=no,directories=no,"+
"status=no,menubar=no,scrollbars=no,"+
"resizable=yes,width="+window_width+",height="+window_height;

NewWindow=window.open(url,window_name,settings); }
</script>
<!-- End Buddy -->



<!--Buddy--><br><a href="#"
onclick="popup('buddy.php', 'Window', 160, 200);">Launch Buddy List</a><!-- End Buddy-->

RobAC
01 May 2001, 20:43
Take a look at what conan wrote there:

scrollbars=yes

now find where it says scrollbars=no in the code you just posted. There's your answer.

change scrollbars=no to scrollbars=yes

SirSteve
29 Aug 2001, 15:37
I want to be able view the Buddy List from any page within the Forums. Also, a few buttons are needed:

A "Refresh List" button
A "Close" button

Thanks for the cool hack!

eg_92901
29 Nov 2001, 16:51
My installation worked great. I had to go into the buddy_main template and adjust the colors though.

Logtenberg
02 Dec 2001, 00:17
screen shot please?

SirSteve
13 Jan 2002, 06:28
Does this work on 2.2.1?

Erwin
13 Jan 2002, 11:41
Simple, yet functional. Thanks!

Gutspiller
08 Feb 2002, 00:59
WTH is this hack? No description anywhere. Duh. :D

AndyTSJ
22 Feb 2002, 10:36
Does this hack work with 2.2.2 ? I tried but it didn't work.

Neo
13 Apr 2002, 00:05
Bump. Is there a updated version of this. I get javascript errors when I try and run it.

Robouk5
10 May 2002, 23:33
Hmm, It looked like it worked but It just displayed no one my buddylist... which is wrong, i do have buddies =)

Robouk5
10 May 2002, 23:35
my bad, i created the buddy template in the wrong style lol

JakeC
18 Dec 2002, 06:19
I just installed this hack and this is the error I am getting:


Parse error: parse error, unexpected '=' in /home/jakec/public_html/forums/buddy.php on line 29


here is what is on line 29:


invisible=0 ORDER BY username";


I really like this hack but I can't get it going. Any help would be much appreciated. Thanks.

JakeC

SpeedStreet
18 Dec 2002, 16:01
You have a gunked up buddy.php.

In mine, that line is commented out. I would revert back to an original buddy.php and try again. It looks like you may have more than that goofed up.

JakeC
18 Dec 2002, 23:03
All we are supposed to do is copy the portion of the text file and paste it into another file and name the file buddy.php right? Thatís what I did. Do you think you could post the contents of your buddy.php so I can compare?

here is what I have:

<?php

$templatesused = "buddy_main,buddy";

require("./global.php");

if ($bbuserinfo[userid]==0) {
show_nopermission();
}

// main page:

// ############################### start buddy list ###############################
$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);

$onlineusers="";
$offlineusers="";
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="on";
} else {
$onoff="off";
}

eval("\$var = \"".gettemplate("buddy")."\";");

if ($buddy[online] and !$buddy[invisible] and $buddy[lastactivity]>$datecut) {
$onlineusers.=$var;
} else {
$offlineusers.=$var;
}
}


eval("dooutput(\"".gettemplate("buddy_main")."\");");

?>


JakeC

SpeedStreet
18 Dec 2002, 23:46
The file you posted matches mine. Yet that error indicates you have a parse error on line 29.

Are you still encountering the error?

JakeC
19 Dec 2002, 00:39
Well, I guess it makes a difference if you copy it to a notepad doc as opposed to a dreamweaver doc. I originally copied it into dreamweaver and it did not work. I just did it in a notepad doc and it works. Go figure. Thanks for helping SpeedStreet.

JakeC

JakeC
19 Dec 2002, 00:45
well, I spoke too soon. The buddy list poped up no problem. Unfortunatly when I added some buddies to my list then tried to launch the buddy list this is the error I recieved:

Parse error: parse error, unexpected
T_ENCAPSED_AND_WHITESPACE, expecting ']'
in /home/jakec/public_html/forums/buddy.php(39) : eval()'d code on line 9

Buddy List

--------------------------------------------------------------------------------
Online
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Offline
--------------------------------------------------------------------------------


I have no idea what that means. One day I will learn PHP if it kills me :ogre: !! Any ideas?

JakeC