View Full Version : How many attachments for member
all-the-vb
04-24-2003, 10:00 PM
Hack: How many attachments for member
Hacked By: All-the-vb
This hack viewing in postbit the number of attachments that user posted.
Tested with: vB 2.2.8, 2.2.9, and 2.3.0
Files to edit: (1)admin/functions.php
Templates to edit: (1) postbit templates/postbit
Time to install: 1 minute
Don't forget to click on install (http://vbulletin.org/forum/misc.php?s=&action=install&threadid=52115)
all-the-vb
04-25-2003, 12:09 PM
SCREENSHOT:
Arabs Emperor
04-25-2003, 12:14 PM
WoW good work dude
what do you mean from--------> (0)nada
Red Blaze
04-25-2003, 01:25 PM
lol I was wondering what you meant by that Arabs, until I read the instructions.
nada = spanish for nothing.
Good hack btw. will install. :)
all-the-vb
04-25-2003, 01:31 PM
:p
nada = spanish for nothing.
eng = none
arabic = ??????
Red Blaze
04-25-2003, 01:55 PM
Hey I was close *shrugs*
Anyway, that gave me a database error. It worked on some forums, but in the art forum there was database errors on every thread. So I took it off. Might work with someone else though, dunno. Maybe it's just me.
Mony@k
04-25-2003, 02:02 PM
Queries to Run: (0)nada
Above past this:
//start user attachment add By All-the-vb
global $DB_site;
$attachment = $DB_site->query_first("SELECT COUNT(attachmentid) AS total FROM attachment WHERE userid=$post[userid] ");
$attachcoun = $attachment[total];
//end user attachment add By All-the-vb This code doesn't contain any query? :D
Boofo
04-25-2003, 02:06 PM
Nice idea but this will add a query for every user on the page.
all-the-vb
04-25-2003, 02:07 PM
Mony@k
:p
i wrote this while i am in rush
Nice hack
But i think it Released
Sun Boy
04-27-2003, 11:11 PM
Nice !
Link14716
04-28-2003, 01:01 AM
Never, EVER add a query to the postbit function. By doing that, you add a query for EVERY SINGLE POST. Youy are better off adding a new field to the user table, and everytime someone posts an attachment, update that field.
Nice hack, I'll install when the changes above have been made ;)
alkatraz
04-30-2003, 02:29 AM
cool idea!
ranger2kxlt
04-30-2003, 03:37 PM
What about limiting the number of attachments a user can have??
This doesn't seem to work anyway...any reason? Perhaps because of attachment database or attachments in PMs?
Kane Da Don
07-26-2003, 03:26 AM
yeah this aint working for me either with vbulletin 2.3.0 could some one help
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.