PDA

View Full Version : The first vBulletin hack! -- the memberlist


20 Apr 2000, 07:02
:) Yup, I'm quick. 2 days after the program is released and people (well, me) are already releasing hacks.

This is a port of the memberlist hack from UBB. But it also has a decent search feature too. Copy all the code into memberlist.php and put it in your main vBulletin directory. Here is my demo: http://www.magic-singles.com/cpa/forums/memberlist.php

(NOTE: THIS IS THE TEMPLATE-IZED VERSION)

Now, here's the code:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



There are 2 variables you need to set:
//TOP POSTERS AMOUNT
$topposternum = 10;

and

// NUMBER OF RECORDS PER PAGE
$numperpage = 30;

-----
Now, I know some of this code isn't real efficient -- I did somethings, forgot I did them, then compensated in other places. :( Anyway, hopefully I'll be able to release some updates.

Enjoy! Give me feedback please! ;)

[Edited by Ed Sullivan on 04-20-2000 at 03:38 PM]

[Edited by Ed Sullivan on 04-20-2000 at 05:28 PM]

[Edited by Ed Sullivan on 04-21-2000 at 09:37 PM]

20 Apr 2000, 07:07
:( I just realized the AIM javascript doesn't work. I looked at it and didn't really see anything wrong. Now, I'm not real good at javascript, so if someone could take a look at it, that'd be great! :)

[edit: I fixed this too!! :)]

[Edited by Ed Sullivan on 04-20-2000 at 05:29 PM]

20 Apr 2000, 07:11
Dammit! I just accidently killed another feature -- the paging doesn't work on any page other than the first. *sigh*

[edit: I fixed this feature and changed the line of code up there --^]

[Edited by Ed Sullivan on 04-20-2000 at 03:39 PM]

20 Apr 2000, 07:27
Well done - I have not tried it yet, but I'm sure it will be good. As hacks come in, I will try to include a template-ised version of it in the next major release - accredited to the author of course. BTW, how much of that code did you borrow from the control panel :)

Keep 'em coming,
John

20 Apr 2000, 07:32
Control panel? What control panel? ;)

I borrowed entirely too much -- but hey, if its there for ya, why not use it :)

20 Apr 2000, 19:14
LOL :D

I like the hack very much :)
a great job sofar. It looks alot cleaner then the ubb one, I must say

21 Apr 2000, 00:57
Dammit! I just accidently killed another feature -- the paging doesn't work on any page other than the first. *sigh*

[edit: I fixed this feature and changed the line of code up there --^]

[Edited by Ed Sullivan on 04-20-2000 at 03:39 PM]


That's the way programming goes ya added a new feajure and kill another one someplace! HEHEHEHE

21 Apr 2000, 13:34
Well done - I have not tried it yet, but I'm sure it will be good. As hacks come in, I will try to include a template-ised version of it in the next major release - accredited to the author of course.

You want a template-ized version? You got it! I was bored today so I template-ized it :) I will edit the code above, but here are the directions for templates.

Create template memberlist -


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Put all the code in that one, and now make template memberlistbit -


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Same thing as above. Now create memberlistsearch -


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Feel free to edit those :)

21 Apr 2000, 14:18
but...

the javascript is a killer. People on WebTV have no support for Javascript, nor do Mac people using iCab. Looking at the code, it doesn't seem that it would be too hard to change.:)

(I prefer the javascript version, personally)

21 Apr 2000, 14:44
About the javascript: hmm... could I do an OS/Browser check in PHP and change the links like that? Might work.

But how should I make the links them? To the profile? Not links, just display the AIM Name?

Hmm.. that brings up another thing, I might want to add a template for AIM, ICQ, and Yahoo! :)

21 Apr 2000, 15:14
There are already three templates: aim, yahoo and icq.

John

21 Apr 2000, 19:56
templates: launching a new era of codehacking ;)
This is cool, though, linking hacks to templates.
It makes 'm flexible :D

21 Apr 2000, 20:01
About the javascript: hmm... could I do an OS/Browser check in PHP and change the links like that? Might work.

But how should I make the links them? To the profile? Not links, just display the AIM Name?

Hmm.. that brings up another thing, I might want to add a template for AIM, ICQ, and Yahoo! :)


I know there's a way to do a direct link with AIM that will pop-up its own message window (or start AIM if you don't have it running) but I don't remember it off the top off my head.
I don't know if such a thing exists for ICQ and/or Yahoo, though...

24 Apr 2000, 02:56
Found a tiny bug:
In the memberlist template remove: 'Page:', or it will show up twice in memberlist.php :)

14 May 2000, 04:48
This is a very nice hack. Can you please tell me how I would go about adding another three columns -- with an e-mail icon, a homepage icon and a search icom -- the same ones that appear under the post of a user. If I'm to offer the users a full "yellow pages" of my BB's members, I might as well give them the full thing :) :)

Thanks

26 May 2000, 15:32
well? :)

27 May 2000, 02:33
I'll look at it when I get a chance.

Email is already there, somewhat.

Try changing your template to use $user[email] in it. The other 2 involve some simple script changes.