PDA

View Full Version : [RELEASE] bList 1.0


08-28-2000, 04:40 AM
Heh, that was quick.

Here it is: Integrated vBulletin Buddy List, v1.0

Originally coded by Stallion, edited and cleaned up by me.

Download buddy.php here: http://www.enter.net/~rmsullivan/buddy.txt and stick it in your main vB directory.

Make a file (temp.php) in your main vB directory, and put this in it:
<?php
require("global.php");
$DB_site->query("ALTER TABLE user ADD buddylist TEXT not null");
echo "done";
?>Run it (it should say done), then delete it.

Add this to your <head> tag in the forumhome template:
<SCRIPT LANGUAGE="JavaScript">
<!--
function popup (addy) {
var popup = window.open("buddy.php","_new","height=460,location=no,menubar=no,resizable=no,scr ollbars=auto,status=no,toolbar=no,width=310" );
}
// -->
</SCRIPT>

And add this to your loggedinusers template:
(<a href="javascript:popup()"><b>Launch Buddy List!</b></a>)

All other HTML code is contained within buddy.php

Oh, and I almost forgot to mention - set $pmintegrate to your liking. :) I have a check there incase anyway. LOL

Demos: http://www.magic-singles.com/cpa/forums/ and http://forums.planetunreal.com/

[Edited by Ed Sullivan on 12-09-2000 at 11:53 AM]

08-28-2000, 04:41 AM
WOO-HOO
I'll probably try this tomorrow, time for bed already

08-28-2000, 04:51 AM
Ed and I will be enhancing this as time goes on -- we do have some cool stuff in the works, so try it out and give us feedback on anything you think should be changed/added.

As for why we didn't use templates, I was rushed for time and templates aren't the easiest/most enjoyable thing to code in from a developer's standpoint, so they were left out.

Expect it in a future version though.

That's all for now,

08-28-2000, 04:56 AM
( Actually, they're easy to do - just, as developers, we've learned to hate implementing them. :rolleyes: Go figure.)

[Edited by Ed Sullivan on 08-28-2000 at 01:57 AM]

08-28-2000, 04:59 AM
Not in the fact you have to go browsing through HTML pages to make a minor interface tweak when you mess up an <a> tag or something ;)

08-28-2000, 05:05 AM
I didn't mean like that - I meant they're easy to implement. It's only a line, and it REALLY shortens your code.

But the fact that you have to either make changes to multiple files and rerun the install script, or browse through the templates makes it annoying as hell.

08-28-2000, 05:22 AM
Since I see no database modifications, and looking at the script, "your buddies" are stored in a cookie. It is not going to be pretty when I move computers or, even worse, my cookie hating users try to use this.

"we don't do cookies"

I try and try to knock some sense in to them but are you going to change this to use the database soon - I can do it for myself but is that in the plan?

08-28-2000, 05:53 AM
I guess it'd be easy enough to have as a server-side option. Add another field in the user database, and instead of using setcookie, just use INSERT.

We'll take that into consideration for the Early Fall Release ;-)

08-28-2000, 07:17 AM
hm... nice hack :)

As for the database stuff, I might give it a shot :)

08-28-2000, 07:41 AM
the's fast ... so right now it's based on the cookie on the member's pc ?

08-28-2000, 07:45 AM
BTW people, If you don't have the PM 1.20 hack installed, change $pmintegrate = 1; to $pmintegrate = 0;

It's on top of buddy.php

08-28-2000, 07:47 AM
eva2000: Yeah, right now it's cookie based

I believe there will be server side support in a coming release.

08-28-2000, 02:14 PM
We got this out in <24 hours after the first request, and you people are whining already? Sheesh! ;)

Anyway.
rangersfan - yeah, I uses cookies. Yeah, we could change it. But we just wanted to get it released. :D It wouldn't be to hard to insert it into the database; it would just mean some logged in/out checks so users can use it with cookies when they aren't registered, or logged in.

Menno - if you don't have the PM hack installed, it automatically sets $pmintegrate to 0, regardless of what you set it to. :D

08-28-2000, 02:35 PM
thanks, so is it the same cookie as the log in one, or separate for the blist ? and how long does the cookie stay on the pc ?

i have a few members who got their friends at school hooked onto my forum and they are sharing a pc and just deleting their cookies logging out and logging in from the same pc for different users...

08-28-2000, 02:50 PM
I haven't installed it, I just felt the need to whine - if only to make Mike's day a little happier :)

-jim

08-28-2000, 02:53 PM
It uses a different cookie than the board does and it expires in 2020.

Eva2000: So if user A. makes a buddy list then user B. will pull up user A. buddy list when he comes along to use the public computer. I am not complaining, just answering eva's query.

08-28-2000, 03:20 PM
Ok, new version is done.

If you are logged in, it uses your profile settings.
If you aren't, it uses a cookie.

Same download spot - but you need to add a field to the user table.

See my first post for info.

08-28-2000, 04:03 PM
Worked fine! Have it installed under 1.1.3 Beta 3 at the HoloNet...

08-28-2000, 07:00 PM
wow... installed in seconds ! ... works like a charm... great work stallion and Ed :D

08-28-2000, 07:19 PM
I take it that this does not work with the first PM hack ( I never bothered to upgrade it as it works ok ) since it wants a field in the session table that I don't have in there.

08-28-2000, 07:32 PM
just a question when you click on a member and it lists these threads...

what are they sorted and ordered by ? are these threads, the member has viewed, read, replied to, posted ?

also is there a way to hide the admin's tracks from members ?

08-28-2000, 07:48 PM
Yes, it requires PM 1.20 for the private mesaging features, IIRC. We'll look into this for the next release.

The threads are sorted by the date of the reply which the user posted. So if I reply to thread 34 at 9 PM, thread 38 at 11 PM, thread 21 at midnight, and thread 34 again at 1 AM, then it will appear as:
Thread 34
Thread 21
Thread 38
Thread 34
In the next version that section will be enhanced a bit, as well as more configurable.

Not sure what you mean about hiding the admin's tracks? Not displaying the latest posts for admins?

08-28-2000, 07:56 PM
thanks... yeah hiding admins posts from members' buddy lists ... is the display set the last 5 threads for each member when you display the threads ?

also in the javascript in the header auto scroll didn't work for me in IE5.5 i had to change it to =yes

08-28-2000, 09:56 PM
Yes, its always the last 5. Once again though, we'll try and make it configurable... ;)

I'm not sure why'd you want to block admin posts from users' buddy lists, but we'll add all sorts of options for stuff like that.

About the scroll bars, not sure why it didn't work as planned. I think the default is auto, so we'll just not specify it -- and hope that works.

08-28-2000, 11:51 PM
Stallion, one problem I've come across - when adding someone to the buddy list you get to see the posts in a private forum (if he just posted there) that you're not supposed to see.

Also, I have a lot of users who are logged in (i.e. never log out) but are not around really. So how does your diferentiation works in this case?

Thanks,

Bira

08-29-2000, 12:11 AM
Just jumping in to say, THANKS! You guys rock.

08-29-2000, 12:49 AM
Originally posted by bira
Stallion, one problem I've come across - when adding someone to the buddy list you get to see the posts in a private forum (if he just posted there) that you're not supposed to see.

Also, I have a lot of users who are logged in (i.e. never log out) but are not around really. So how does your diferentiation works in this case?

Thanks,

Bira oooh... hmmm.. yeah need to hide those private forum threads :D

08-29-2000, 01:22 AM
Private forums are noted...

You won't be able to view those threads, but I guess the subject lines might be a little revealing.

As far as not logging out, it currently is based off of the active users listing -- and any user with inactivity for over 10 (or is it 15) minutes is automatically removed from that listing. So that should be all set...

08-29-2000, 02:05 AM
You da man, Stallion!

08-29-2000, 08:17 AM
Any idea when that next version will be out? :D

08-29-2000, 01:00 PM
Originally posted by Stallion
Private forums are noted...

You won't be able to view those threads, but I guess the subject lines might be a little revealing.

OK, that's what I feared. So I'll have to wait till you release the next version with a fix for that, cos in my board, in many cases just seeing the subject itself can cause havoc...

08-29-2000, 01:07 PM
Quick fix for private forums:
Look around line 108, and change the query to:
$posts = $DB_site->query("SELECT post.threadid, post.postid, thread.title FROM thread, post WHERE post.threadid=thread.threadid AND thread.forumid <> '2' AND thread.forumid <> '7' AND post.userid='".intval($split[0])."' ORDER BY post.dateline DESC LIMIT 5");

Where '2' and '7' should be replaced with private forum numbers. If you have more than two, just diplicate the "AND...'7'" format. If you only have one, just drop that part of the query.

More later.

08-29-2000, 09:55 PM
you rule Stallion, thanks :)

08-30-2000, 12:51 AM
Great hack you guys. Works great on my site.

I would like it to where those with administrator status are still able to see the messages in the private area though.

Thanks,
Parker

08-30-2000, 12:58 AM
Originally posted by Stallion
Quick fix for private forums:
Look around line 108, and change the query to:
$posts = $DB_site->query("SELECT post.threadid, post.postid, thread.title FROM thread, post WHERE post.threadid=thread.threadid AND thread.forumid <> '2' AND thread.forumid <> '7' AND post.userid='".intval($split[0])."' ORDER BY post.dateline DESC LIMIT 5");

Where '2' and '7' should be replaced with private forum numbers. If you have more than two, just diplicate the "AND...'7'" format. If you only have one, just drop that part of the query.

More later.
yep it works those private threads are hidden :D

08-30-2000, 01:28 AM
Better fix(:)):

Use the built-in VB function to dynamically decide whether or not a user can see a forum (and subsequently a thread in that forum):


$getperms = getpermissions( $bbuserid, $bbusergroupid, $forumid );

if( $getperms[ canview ] == 0 ) {

// user is not allowed to see

} else {

// show the title, whatever

} // end if


So, this will allow mods / admins to see the mod forum / thread titles, whereas other user will see whatever you tell them to see.


[Edited by mrogish on 08-29-2000 at 10:29 PM]

08-30-2000, 01:31 AM
Originally posted by mrogish
Better fix(:)):

Use the built-in VB function to dynamically decide whether or not a user can see a forum (and subsequently a thread in that forum):


$getperms = getpermissions( $bbuserid, $bbusergroupid, $forumid );

if( $getperms[ canview ] == 0 ) {

// user is not allowed to see

} else {

// show the title, whatever

} // end if


So, this will allow mods / admins to see the mod forum / thread titles, whereas other user will see whatever you tell them to see.


[Edited by mrogish on 08-29-2000 at 10:29 PM] now where would you add that bit ?

08-30-2000, 02:16 AM
Originally posted by eva2000
now where would you add that bit ?

Change this:


if ($split[1]) {
$posts = $DB_site->query("SELECT post.threadid, post.postid, thread.title FROM thread, post WHERE post.threadid=thread.threadid AND post.userid='".intval($split[0])."' ORDER BY post.dateline DESC LIMIT 5");
}


to this:


if ($split[1]) {
$posts = $DB_site->query("SELECT post.threadid, post.postid, thread.title, thread.forumid FROM thread, post WHERE post.threadid=thread.threadid AND post.userid='".intval($split[0])."' ORDER BY post.dateline DESC LIMIT 5");
}


This returns the forumID that the thread is living in...

Next replace:


while ($post=$DB_site->fetch_array($posts)) {
$shorttitle = substr($post[2],0,35);
if ($shorttitle!=$post[2]) { $shorttitle .= "..."; }
////// HTML //////
$postz .= "<tr><td width=\"100%\"><FONT SIZE="1" FACE="verdana,arial,helvetica">??<a href=\"showthread.php?threadid=".$post[0]."#post".$post[1]."\" target=_blank>$shorttitle</a></font></td></tr>\n";
////// END //////
}



(argh, ugly indentation!)

to this:


if( $posts ) {
while( $post = $DB_site->fetch_array( $posts ) ) {

$shorttitle = substr( $post[ 2 ], 0, 35 );

if( $shorttitle != $post[ 2 ] ) { $shorttitle .= "..."; }

$getperms = getpermissions( $bbuserid, $bbusergroupid, $post[ 4 ] );

if( $getperms[ canview ] == 0 ) {

// User is not authorized to see this forum or any threads in it

////// HTML //////
$postz .= "<tr><td width=\"100%\"><FONT SIZE="1" FACE="verdana,arial,helvetica"> Moderators-Only Thread</font></td></tr>\n";
////// END //////

} else {

////// HTML //////
$postz .= "<tr><td width=\"100%\"><FONT SIZE="1" FACE="verdana,arial,helvetica"> <a href=\"showthread.php?threadid=".$post[0]."#post".$post[1]."\" target=_blank>$shorttitle</a></font></td></tr>\n";
////// END //////

} // end if

} // end while
} // end if


This will replace the link with "Moderators-Only Thread". You can call it whatever you want.

According to my PHP parsing mind, this should work. However, we don't run this hack so I haven't tested it -- check it out and let me know.

BTW:
Buddy.php contains a lot of ugly code. :)

08-30-2000, 02:19 AM
Buddy.php contains a lot of ugly code.You didn't see it before.....

08-30-2000, 02:26 AM
I didn't mean to imply that you guys are bad programmers or anything, but it hurt my eyes to look at this code!! :)

And hey, don't read my "online user listing" thread -- talk about the pot calling the kettle black!! :)

08-30-2000, 02:30 AM
LOL, yes. I didn't plan ahead when coding this, and hit a few nasty bugs, where therefore made the workaround code rather nasty as well... ;)

I must've warned Ed at least 5 times before forking it over. Hey, at least it works, and the new version will have some cleaned up code as well as lots of enhancements.

08-30-2000, 02:43 AM
well i don't know php so can't tell the difference :) ... thanks stallion, ed and mrogish

i have both the buddy list and online user lists on my forum now :D ...

08-30-2000, 02:45 AM
LOL yeah - the whole cookie storage method was weird at first, but it makes good sense when you see what it's doing.

I was going to get rid of the the "toggle" stuff in it, but that would get rid of viewing multiple people at one time.

Anyway, while Stallion's working on the new nifty version, I'm going to put out a new version with the private forum check and another bug fixed (we just worked around it before)

However, the change may "break" your cookies in that a blank row will appear. Just click the clear buddy list link I'm going to stick in there :)

08-30-2000, 02:57 AM
Ok, 1.2 can be downloaded from the URL.

It adds mrogish's fix for private forums, and gets rid of a bug that was annoying me. Funny thing is, to avoid "breaking" the cookies, I may have slowed it down a little (had to use an ereg_replace(), but got rid of a next()). Oh well :D

Anyway, the clear function I mentioned isn't in it anymore since I don't need it and it wouldn't work. Someone wanna look at the code and tell me why it wouldn't work? (That same syntax has worked for me in other scripts)

Enjoy.

08-30-2000, 03:19 AM
Mike,

The one I use to clear cookies has always been:

setcookie("buddylist","",mktime(0,0,0,0,0,2020),$cookiepath);

It looks like an "issue" with cookies + location( ) calls in PHP. Check out the user discussions at:
http://www.php.net/manual/function.setcookie.php

Also, why can't you use str_replace in place of ereg_replace?

08-30-2000, 03:41 AM
The private forums works in that if they don't have permission it won't allow them to read the message but the title of the thread still shows up instead of "Thread Not Viewable". So if the title of your thread was something that you didn't want anyone to see you'd be in trouble. :)

How about instead of a "Thread Not Viewable" link it just didn't list them at all?

Parker

08-30-2000, 03:45 AM
str_replace won't let me just check if the first character of the string is ";" ( ^; ) - try it and see.

And thanks for the link - I just faked the location by setting $manage = 1; Of course I found another little bug in the process... :D

08-30-2000, 03:48 AM
Actually, more than a little bug - cookie isn't getting deleted. Hmm...

08-30-2000, 04:07 AM
Originally posted by Ed Sullivan
str_replace won't let me just check if the first character of the string is ";" ( ^; ) - try it and see.

Ah ok, forgot how regexp worked for a sec..

The only alternative I can think of is this:


if( substr( $buddylist, 0, 1 ) == ";" ) {
$buddylist = substr( $buddylist, 1 );
}


That will strip out leading ";". I think that's what you want to do, no?

I don't know if that's any faster, but you can try it out...

08-30-2000, 04:16 AM
Wow, I'm an idiot. The cookie was getting deleted - but I was pulling data from my profile. :D

So that feature is now added to the release version. See original URL.

08-30-2000, 04:23 AM
Ok, no regexes anymore. Just a simple if (!$data[0]) check. Wow, I've made so many little updates to this script...

08-30-2000, 04:28 AM
Originally posted by Ed Sullivan
Ok, no regexes anymore. Just a simple if (!$data[0]) check. Wow, I've made so many little updates to this script...


Yeah, I feel dumb now, thanks! :)

Argh -- I spent a lot of time trying to un-learn C++ -- now you're telling me I should treat strings as character arrays? Arghh! :)

08-30-2000, 04:29 AM
I was going to suggest $data[0] but I held my tongue :P

08-30-2000, 04:31 AM
Although you can do that, no I wasn't.

$data is a ";" split array from $buddylist. $data[0] will be set to an empty string if it's empty (ie, ";" is the first character) OR if $buddylist is empty.

08-30-2000, 05:11 AM
If anyone is interested I hacked it so that it shows a left arrow beside users and a down arrow if you click on them and list their posts.

You can dl it at http://www.hedgehogwheels.com/forums/buddy.php.txt

The arrows:

http://www.hedgehogwheels.com/forums/images/arrowr.gif
http://www.hedgehogwheels.com/forums/images/arrowd.gif

[Edited by rangersfan on 08-30-2000 at 02:11 AM]

08-30-2000, 05:35 AM
nice rangersfan it works beautifully :D

08-30-2000, 08:08 AM
Nice, the script keeps getting better :)

08-30-2000, 08:49 AM
In your postbit template look for


<a HREF="editpost.php?action=editpost&postid=$postid"><IMG SRC="images/edit.gif" BORDER=0 ALT="Edit/Delete Message"></A>


and add

&nbsp;&nbsp;<A HREF="buddy.php?action=manage=1&search=$username"><IMG SRC="images/add.gif" border="0" alt="Add $username to your Buddylist"></a>

Here is the image

https://vborg.vbsupport.ru/


Now if someone could show me the javascript that I could put in the showthread template that would put the username in and give you the popup window that would be cool. This just adds the members' name to your list and you have to hit your backarrow on your browser to go back to the forum.

I would like for this to take you to the same popup window as you get from the main buddylist where you can close it out after you have added someone.

Parker

[Edited by Parker Clack on 08-30-2000 at 05:50 AM]

08-30-2000, 02:53 PM
My users are complaining that they're visible as online in the Buddy List, even though they've set themselves to 'invisible' in their preferences. :(

08-30-2000, 03:01 PM
Well shall it be modified to check a users invisible state and then always list them as "offline" if they are invisible? Shall it tell a buddy user "Sorry that user has issues about you knowing when they are on the forum so they will always be shown as OFFLINE to you"

08-30-2000, 06:51 PM
Well it's either that or pretend their search failed to find a member. I think it should list them as offline or a third category, invisible.

08-30-2000, 07:21 PM
To have it ignore "invisible" users change the code on line 80 from:


SELECT username FROM user WHERE userid = ....


to:


SELECT username FROM user WHERE invisible = 0 AND userid = ....



That should make it not display users who are invisible.

08-31-2000, 01:55 AM
I keep getting alot of emails like this:


404 Error Report

A 404 error was encountered by 24.40.48.30 on 8/30/2000 at 22:22.

The URI which generated the error is:
http://www.hedgehogwheels.com/404.php

The referring page was:
http://www.hedgehogwheels.com/forums/buddy.php


I don't know what my users are doing to generate 404's but there is something screwy in the hack.

btw I have set up my site to email me when 404's occur.

09-03-2000, 01:31 AM
We installed the blist and poll hack without any trouble at all, seemed very smooth ... UNTIL I looked around and noticed that it has done something (or I have done something which is likely) to cause the "Logout" to error and my stars Hack just went "poof" ... gone .... anyone else seen anything like this?

Here is the error I get now When I try to logout ....

Parse error: parse error in /home/httpd/html/scubaboard.com/member.php on line 306

Any ideas?

09-03-2000, 01:49 AM
As far as I can tell, neither of those two hacks would cause either of the problems which you're having. Did you edit member.php at all?

09-03-2000, 04:05 AM
Heya Stallion,

No, that's the odd thing ... but I guess that leaves me back at what I am afraid of ... I had to have accidentally edited something without realizing I wasnt where I thought I was ... sigh ... Now I am really looking for a needle in a hay stack.

=-)

09-03-2000, 04:06 AM
Send your member.php to me at webmaster@hedgehogwheels.com

09-03-2000, 05:56 AM
Thanks rangersfan,

It's on its way. I'm just waiting to hear you say its something really stupid that I did, although at this point I will gladly get my big bowl of humility to get this figured out ... Everything else has and is still working like a charm ... I havent had a single problem.

=-)

09-03-2000, 02:41 PM
Well EF line 306 falls in the code that executes when a new member registers. I registered on your forum and I logged in and out several times with no errors.

Yours stars hack would have nothing to do with member.php, you may have lost it when you installed the PM hack and modified showthread.php.

09-03-2000, 07:23 PM
I couldn't get the the private areas to display the "Thread Not Viewable" message. So I played around with the code and changed this:

$getperms = getpermissions($bbuserid,$bbusergroupid,$post[4]);
if ($getperms[canview]==0) {

////// HTML //////

$postz .= "<tr><td width=\"100%\"><smallfont>&nbsp;&nbsp;<i>Thread Not Viewable</i></smallfont></td></tr>\n";

////// END //////

to this:

$gettperms = getpermissions($bbuserid, $bbusergroupid,$post[3]);
if ($getperms[canview]==0) {

////// HTML //////

$postz .= "";

////// END //////


I had the change the $post[4] to $post[3]
and now instead of a message then don't see anything and don't know what they are missing. :)


Parker

[Edited by Parker Clack on 09-03-2000 at 04:25 PM]

09-03-2000, 07:54 PM
Thanks Parker - uploading bug fix now :)

09-03-2000, 09:01 PM
ED:

I have added a link from the showthread page that will allow you to add the member to your buddylist.

What I am wanting to do though is to have it use the javescript pop up window so you don't get a full page opening but instead get the popup. Unfortunately if you use the javascript with this hack you don't get the username inserted but instead you get the last person that post to that thread.

I am using:


<SCRIPT LANGUAGE="JavaScript">
<!--
function popup (addy) {
var popup = window.open("buddy.php?action=manage=1&search=$username","_new","height=460,location=no,menubar=no,resizable=no,scr ollbars=auto,status=no,toolbar=no,width=310" );
}
// -->
</SCRIPT>


in the header of the showthread template

and then in javascript link in the postbit template


<a href="javascript:popup()"><font face="verdana" size="1" color="#ffffff"> <b>Launch Buddy List!</b></font>


Any ideas how to make the link in the showthread template work so that the member you want to add to your list can be added and the popup shows up?

Also, how about adding a close button to close out the javascript box.

Thanks,
Parker

09-03-2000, 10:21 PM
I'll add this tonight! :)

09-04-2000, 02:57 AM
I have added this to the memberlist file.

In memberlist template look for:

<td align="center" bgcolor="#ffffff"><FONT face="verdana,arial,helvetica" size="1" color="#xxxxxx"><b>Posts by this user</b></font></td>

and below this add:

<td align="center" bgcolor="#ffffff"><FONT face="verdana,arial,helvetica" size="1" color="#xxxxxx"><b>Add to Buddy List</b></font></td>

(Replace the XXXXXX with your board's colors)

Then in your memberlistbit template look for:

<td bgcolor="#EFEFEF"><FONT face="verdana, arial, helvetica" size="2" >$bio</font></td>

and just above this add:

<td bgcolor="#EFEFEF" align="center"><A HREF="buddy.php?action=manage=1&search=$username" target="_new"><IMG SRC="images/add.gif" border="0" alt="Add $username to your Buddylist"></a></td>

Here is the image:

http://www.hometheaterforum.com/htforum/images/add.gif

Parker

09-04-2000, 08:07 AM
Hmm.. a small add that could prove to be effective :)

09-04-2000, 12:52 PM
Parker, try using these as your respective lines:

<SCRIPT LANGUAGE="JavaScript">
<!--
function popup (username) {
var popup = window.open("buddy.php?action=manage=1&search="+username,"_new","height=460,location=no,menubar=no,resizable=no,scr ollbars=auto,status=no,toolbar=no,width=310" );
}
// -->
</SCRIPT>



<a href="javascript:popup($username)"><font face="verdana" size="1" color="#ffffff"> <b>Launch Buddy List!</b></font>

09-04-2000, 10:52 PM
It is possible to add the same user more than one time,

another thing, can you have a message saying the :"no such user" when trying to add not existed users.

09-05-2000, 04:31 PM
Small prob, when I start the BList, I'll be added to the List. When I start the list again I'll be added a 2nd time, an d so on! Anyone got this prob?

09-05-2000, 09:29 PM
Ed:

Thanks for the try. What I get when I click on the link is a little java error message in the lower left hand tool bar that says "Error on the page".

It would appear that putting $username in the ()
javascript doesn't like. If I take this out between the brackets then the java box opens ok but nothing is put in.

Parker

09-05-2000, 09:41 PM
Ed:

Found the solution.

Use the javascript code for the header in the showthread template as you have outline above.
Then in the postbit template use:

<a href="javascript:popup('$username')"><IMG SRC="images/add.gif" border="0" alt="Add $username to your Buddylist"></A>

instead.

Note the change in the brackets used.

Thanks for all the help. This is a really great add on as now a member can add a person to their buddy list from the thread instead of having to type it in.

Parker

09-13-2000, 09:33 PM
Did anybody notice that you can duplicate the same user in the list?

09-13-2000, 09:44 PM
Originally posted by Essam
Did anybody notice that you can duplicate the same user in the list? Yes.

09-13-2000, 09:47 PM
any idea how to slove it?

09-13-2000, 09:55 PM
Originally posted by Essam
any idea how to slove it? Yes, but it's not worth it :p Add checks to the routine that adds the user, looking for the userid of the one you're adding.

09-16-2000, 05:42 PM
I personally don't feel like reading through all 6 pages of this thread at the moment, so are there any enhancements/changes from whats on the first post in this thread?

09-16-2000, 05:57 PM
I do I have the Buddy List page not use the header?

09-16-2000, 06:54 PM
No updates yet. And WTH does this mean?

Originally posted by thetakerfan
I do I have the Buddy List page not use the header?

09-16-2000, 07:36 PM
it should have been
"How do I have the Buddy List page not use the header?"
Typo, couldn't you figure it out?? Sheesh ;)
Anyway, the header for my forums add banners on top, and a nav area on the left, and I don't want that to show up on the BL page

09-16-2000, 07:45 PM
The header and footer don't show up - they're not include. Just edit the code in buddy.php if you wanna customize the layout.

09-16-2000, 07:51 PM
I looked, but I didn't see anything related to the header, yet it still shows up

10-01-2000, 09:56 AM
hello!...first...this hack is really great...as i saw it on the infogrames site, i was was sure that i need it for my vb...great work!

ok, i installed and it just took a few secs...but as i tried to search for a user i got this message:

Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in /homepages/htdocs/net/forum/buddy.php3 on line 130

i have no idea what this means...i'm not a programmer :o/

can anybody help me?...that would be great, because i really want to use it...

thanks

[i'm sorry about my bad english...i'm german ;o) ]

10-12-2000, 03:19 AM
Being new to vbulletin I am a bit behind the rest of ya - sorry to drag this to the top

when I run this as temp.php3

<?php
require("global.php");
$DB_site->query("ALTER TABLE user ADD buddylist TEXT not null");
echo "done";
?>

I am not getting the done statement - and the field is not being built

I have changed global.php to php3, but am at a loss

Thanks

10-12-2000, 03:41 AM
ok got it to work

was strange the cut and paste version didnt work, but when i typed it by hand it worked fine

thanks

awesome hack

10-12-2000, 12:23 PM
There could have been an extra space in there somewhere :)

10-15-2000, 02:06 PM
At the risk of sounding terribly stupid...

Is this incorporated with PM or is this incorporated with the Member's list? I'm also a bit lost on where to find it on your forum.

Sorry about this!

10-15-2000, 06:02 PM
Actually, on my forum I think I accidently ditched it when I redesigned.

Check it out at http://www.vbulletin.org though - it's by active users.

12-08-2000, 10:30 PM
Would it be possible to re-post the buddy.php file or someone email it to me (http://www.vbulletin.com/forum/member.php?action=mailform&userid=1647), as the download URL is not accessible?

Looks like a great hack... look forward to trying it out.

Thanks in advance. :)

12-09-2000, 02:51 PM
Woah! My ISP has PHP now :) Awesome!

You can get it from http://www.enter.net/~rmsullivan/buddy.txt

12-09-2000, 03:49 PM
Hehe... thanks for the link!

12-10-2000, 02:49 AM
I wasn't quite sure what this did, didn't have the energy to go thru 7 pages and checked out the demo. Ed, I registered, added a user called slick to my buddy list to try it out and got this error from your site:
Warning: Bad arguments to implode() in /www/magic-singles/cpa/forums/buddy.php on line 76

Thot you should know.

12-10-2000, 06:44 AM
Cannot remember what... oh yessss... the Buddy List "add me" icon! :D

Black version:
http://server2038.virtualave.net/mytestarea/buddy_add_black.gif

White version:
http://server2038.virtualave.net/mytestarea/buddy_add_white.gif

Note: this one is called "buddy_add.gif" so change it as you wish...


[Edited by Cr4z33 on 12-10-2000 at 04:03 AM]

12-10-2000, 10:06 AM
Why is the buddy list link at the top of my private messaging?
http://www.vboard.co.uk/board/index.php

I added the link code to the template that shows active registered members and guests?

I did put the Private Messaging on in the buddy.php!

12-12-2000, 02:43 PM
I edited the hack so that when I click on the "add" icon it pops up directly the "Add user" with the SEARCH button window (aka buddy.php?manage=1). What I wanted was to auto-fill the search box but had no success as I always find there my username and not the poster username. :mad:
I tried reclying an "if" code used on showthread.php for $username but it gave me the above result...
Any solution?