The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
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: Code:
<?php require("global.php"); $DB_site->query("ALTER TABLE user ADD buddylist TEXT not null"); echo "done"; ?> Add this to your <head> tag in the forumhome template: Code:
<SCRIPT LANGUAGE="JavaScript"> <!-- function popup (addy) { var popup = window.open("buddy.php","_new","height=460,location=no,menubar=no,resizable=no,scrollbars=auto,status=no,toolbar=no,width=310" ); } // --> </SCRIPT> Code:
(<a href="javascript:popup()"><b>Launch Buddy List!</b></a>) 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] Show Your Support
|
Comments |
#32
|
|||
|
|||
Quote:
|
#33
|
|||
|
|||
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. |
#34
|
|||
|
|||
you rule Stallion, thanks
|
#35
|
|||
|
|||
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 |
#36
|
|||
|
|||
Quote:
|
#37
|
|||
|
|||
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): Code:
$getperms = getpermissions( $bbuserid, $bbusergroupid, $forumid ); if( $getperms[ canview ] == 0 ) { // user is not allowed to see } else { // show the title, whatever } // end if [Edited by mrogish on 08-29-2000 at 10:29 PM] |
#38
|
|||
|
|||
Quote:
|
#39
|
|||
|
|||
Quote:
Code:
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"); } Code:
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"); } Next replace: Code:
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 ////// } to this: Code:
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 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. |
#40
|
|||
|
|||
Quote:
|
#41
|
|||
|
|||
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!! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|