Log in

View Full Version : How to make plugin to display picture count...


christian8a
08-02-2009, 09:07 PM
How to make plugin to display picture count on members profile, instead of the statistics block?

Lynne
08-02-2009, 10:03 PM
What picture count? And what statistics block? I really don't know what you are asking - an image may help here.

christian8a
08-02-2009, 10:34 PM
Hi
Well, actually on a default memberinfo page, there are tabs and blocks, the tabs have that statistics block, there you can see post count, threads, albums pictures... but if I take the line wich is actually "$block_data[albumcount]" for albums or "$block_data[picturecount]" for pics and paste it on any other part of the memberinfo template because I dont use the statistics tab, then it doesnt display any picture count... I had requested a feature like this for a mod called "gifts" to display gifts count on postbit and they made me a plugin and a variable to paste and worked, the plugin looks very simple but having the knowledge of course... any help I will appreciate Lynne :up:

Lynne
08-02-2009, 11:03 PM
You probably need to use the variable $userinfo[albumcount]. If that doesn't work, try $prepared[albumcount].

christian8a
08-02-2009, 11:38 PM
None worked.. Usually what a small plugin like that should consist in?

Lynne
08-03-2009, 03:14 AM
If that variable isn't available, then I would guess that the plugin would do the code or query to create the variable. In album.php, there is a query to get the albumcount on line 1887. Or actually, the count for the member page is defined around line 2044 in class_profileblock.php, so you might be able to use that code for it. I'm really don't know though.

christian8a
08-03-2009, 04:31 AM
looks close, ill try few things with those codes, thanx for your help Lynne :up: