PDA

View Full Version : Show Icon if User has a Profile Picture


Andreas
09-08-2005, 10:00 PM
Show Icon is User has a Profile Picture

Description
This Hack shows an Icon if the User has a Profile Picture.

Currently supported Templates:

postbit/postbit_legacy
memberlist_resultsbit


Details
1 Product XML (4 Plugins, 1 Phrase)
1 Bitfield XML
1 Icon Image

History
1.0.0
Initial Version

1.0.1
(Hopefully) fixed Problem with Icon also showing up when user uploaded an avatar

Vizionz
09-09-2005, 07:30 AM
whats the icon ? *note nevermind i see it now* and no file yet so u must be updating this the little camera thingy is the icon :)

Andreas
09-09-2005, 07:52 AM
File is there now.
I noticed that there was a Problem with the Uninstall Code, so I temporarily removed it.

Vizionz
09-09-2005, 08:20 AM
works perfect - note pic needs to go in misc folder :) just something simple

Andreas
09-09-2005, 08:25 AM
Right. ZIP updated, thank you.

FleaBag
09-09-2005, 11:50 AM
Ya know Kirby, it's like someone asked me about all the things I'd like added to my forum - and then they went and made you code them all lol.

Thanks once more! :)

Bad Bunny
09-09-2005, 02:30 PM
Ya know Kirby, it's like someone asked me about all the things I'd like added to my forum - and then they went and made you code them all lol.

Thanks once more! :)

Yeah, Fleabag. I know what you mean. Kirby's plugins seem to be either something we want, or something I like but don't need just yet. lol

This is something great, but I want to implement it slightly differently. I am not quote sure how yet...but I will brainstorm and share any templating I do in case someone else likes it.

mikexxx
09-09-2005, 03:58 PM
I have upload the files, import the XML and edit the template "postbit"

<if condition="$post['hasprofilepic']"><img src="$stylevar[imgdir_misc]/photo.png" alt="<phrase 1="$post[username]">$vbphrase[x_has_profilepic]</phrase>" /></if>

If i use this code (no 'if' command) i see the icon (but on al users):

<img src="$stylevar[imgdir_misc]/photo.png" alt="<phrase 1="$post[username]">$vbphrase[x_has_profilepic]</phrase>" />

Wat is going wrong? wy the if commando isn't working fine?

Andreas
09-09-2005, 04:06 PM
@mikexxx
Do the Users have Profile Pictures?

@Bad Bunny
In 3.0 I implemented it differently, but that required cahanging a lot of queires and invloved lot of JOINs.
The way it is implemented now does not cause any overhead (except when a User cahnges teh Pic).

mikexxx
09-09-2005, 04:17 PM
@mikexxx
Do the Users have Profile Pictures?I'm not that stupid :rolleyes: :laugh:, yes the have profile pictures.

Bad Bunny
09-09-2005, 04:18 PM
@mikexxx
Do the Users have Profile Pictures?

@Bad Bunny
In 3.0 I implemented it differently, but that required cahanging a lot of queires and invloved lot of JOINs.
The way it is implemented now does not cause any overhead (except when a User cahnges teh Pic).

Oh, I am fine with the method you are doing it. I am just thinking of templates. I'm not a fan of the little floating camera by the name, that's all. ;)

Andreas
09-09-2005, 04:20 PM
Well ... it was the first Icon that was at least somehow usable :D

@mikexxx
You are using RC3?

mikexxx
09-09-2005, 04:25 PM
@mikexxx
You are using RC3?Yes.

TEST1<if condition="$post['hasprofilepic']">TEST2<img src="$stylevar[imgdir_misc]/photo.png" alt="<phrase 1="$post[username]">$vbphrase[x_has_profilepic]</phrase>" /></if>

OK, i put in TEST1 and TEST2 (see code) I see Test 1 in the showthread.php page. but i don't see Test2. so it has something to do whit the <if> code.

Andreas
09-09-2005, 04:39 PM
Strange then.
You are using mySQL < 4.0.4 by any chance?

mikexxx
09-09-2005, 05:00 PM
Strange then.
You are using mySQL < 4.0.4 by any chance?Im running the forum on a Cobalt Raq550 there is MySql version 3.23.56 on it.

Andreas
09-09-2005, 05:04 PM
That's the Problem then, at least mySQL 4.0.4 is required.

mikexxx
09-10-2005, 06:31 AM
I have upgraded my server to PHP 5.0.4 and MySql 4.1.14. This plugin is still not working.

Andreas
09-10-2005, 06:45 AM
Then I don't know why.
Feel free to send me a PM with an ACP Login (access to running mySQL Queries is necessary) and i'll take a look.

mikexxx
09-10-2005, 07:29 PM
KirbyDE, Thanks for youy help. Problem solved.

FleaBag
09-15-2005, 10:48 PM
EDIT: I have an old version of MYSQL. My bad.

Andreas
09-16-2005, 03:52 AM
It should work with any mySQL Version > 3.23, jsut the installation Script won't set the "Has Profile Picture" Flag for existing members then.
(Otherwise PHP Code would have been required to do so ... with mySQL 4.04 it's just a Multi-Table Update ;))

FleaBag
09-16-2005, 07:57 PM
Ah I see. Well the icon just wasn't appearing at all... Probably because the flag wasn't set, right? ;) Any chance you could bung the code my way if you got a chance?

Andreas
09-17-2005, 03:46 AM
Nope. Too much work, sorry.
But you just have to upload a new Pic and the Flag will be set.

FleaBag
09-18-2005, 12:53 AM
OK cheers for the heads up.

Razasharp
10-14-2005, 03:10 PM
Hi Kirby

I have a small problem... the icon is showing even if someone uploads an avatar :-/

Any ideas why thats happening? Im running 3.5 gold.

Thanks in advance.

Andreas
10-14-2005, 03:28 PM
Whoops :)
Gonna take a look at that.

Razasharp
10-14-2005, 03:36 PM
Whoops :)
Gonna take a look at that.

Thanks!

Ps. forgot to add.. that it ONLY effects avatars added after the plug-in is installed...

Andreas
10-14-2005, 04:15 PM
Should be working now. Can you check if it does?

Razasharp
10-14-2005, 04:29 PM
sure... will do it now ;)

Razasharp
10-14-2005, 04:38 PM
.... Yep Perfect!

Thanks your a Star Kirby!! :)

folkish
10-15-2005, 03:44 PM
I'm still trying to get a feel for the new plug in system, and my general knowledge of code is miniscule at best, so I was wondering....

I've tried to install this hack, but I am having a problem.

I've already imported the product (product-profpic.xml) and uploaded the image to the images/misc folder, via FTP, but I'm not sure what to do with this bitfield .xml file. Is that a plug in? I tried uploading it as one and it tells me "invalid file specified." Is this supposed to be uploaded via FTP, and if so, where?

Thanks for your patience.

Rabbitoh Warren
10-15-2005, 04:19 PM
but I'm not sure what to do with this bitfield .xml file.Upload it to your root -> includes -> xml directory.

folkish
10-15-2005, 04:39 PM
Common sense finally prevailed. I thank you!

Edit: Almost forgot... /me clicks install!

Pitman
10-20-2005, 08:03 PM
How much would it take to display the icon to only members who actually have permission to see profile pictures?

Razasharp
10-20-2005, 09:29 PM
easy, just enclose the bit that displays the graphic inside another IF command that is for the specified usergroup only ;)

Andreas
11-18-2005, 02:13 PM
This Hack requires mySQL > 4.0.4.
Which mySQL Version do you have?

DrHUS
11-19-2005, 08:21 AM
Im running the forum on a Cobalt Raq550 there is MySql version 3.23.56 on it.

is it run query or slow down the forums?

Andreas
11-19-2005, 09:52 AM
It works just fine, except that it won't show Icons for pictures that are already present - only for new ones.
Honestly, mySQL 3 is damn old and you really should upgrade (Query Cache, Fulltext Search, etc.)

Andreas
11-19-2005, 09:55 AM
is it run query or slow down the forums?
I don't really understand that question.
But if you mean if it does add overhead: No.
It only executes 1 query when a User updates his profile picture.

Andreas
11-20-2005, 01:28 AM
It works just fine with mySQL 3- except for the install code.
And mySQL 4.0 is stable ... the current stable release is 5.0!

Dsyn11
11-20-2005, 07:59 AM
edit: fixed it. :lick:

thanks very much!

Brandon Sheley
11-20-2005, 08:15 AM
/me installs
works good, ty

lazyseller
01-11-2006, 04:46 PM
You rock!!!

BarelyHangingOn
01-14-2006, 12:17 PM
This doesn't seem to work on my board, can anybody help me out?

Carsten77
01-22-2006, 03:25 PM
Hallo Andreas,

habe den Hack installiert, und bekomme das Symbol in der Benutzerliste auch angezeigt, allerdings nicht in einem Beitrag.

Vielleicht kannst Du mir helfen.

Habe das Problem hier http://www.vbhacks-germany.com/forum/showthread.php?p=20722#post20722 beschrieben, vielleicht hast Du mal Zeit zum Nachsehen.

Gru? Carsten

Edit: hat sich erledigt! hab das falsche template ge?ndert und mich dann gewundert. tja so kanns gehen :nervous:

Injektilo
01-28-2006, 01:32 AM
why do i need the pluggin and the xml file since
<if condition="$post['hasprofilepic']"><img src="$stylevar[imgdir_misc]/photo.png" alt="<phrase 1="$post[username]">$vbphrase[x_has_profilepic]</phrase>" /></if> works by itself? (No need to make someone mad, just being curious) :p

moonclamp
02-20-2006, 11:58 AM
How easy would it be to adapt this ... say, if a user hasn't got a picture they can't access certain features? (maybe through promotions)

Kroby
05-27-2006, 03:26 PM
installed an 3.5.4, working nice, thank you :)
*click

dknelson
09-22-2006, 08:25 AM
Has anybody tried this with 3.6?

dknelson
09-22-2006, 08:34 AM
OK....I just tried it and the answer is YES....works perfectly on my 3.6.1 forums.

Don

Alien
04-29-2007, 09:19 PM
Still works on vBulletin 3.6.5.

For all those who haven't seen this one, thought it was about time it got bumped up..

joethong
05-14-2007, 05:28 AM
Hi Andreas,

OK I've to admit, I'm a newbie to vbulletin, but I've read articles on how to install plugins but still to no avail, I can't never get it right.

When I try to upload bitfield_profpicicon.xml using "Download/Upload Plugins" I was told that this is an invalid file. So I tried adding this from "Add/Import Product" and it still didn't work. "Add/Import Product" was able to deal with product-profpicicon.xml though.

My question is, how do I upload bitfield_profpicicon.xml like you stated in the readme.txt?

Could you please kindly give me some guidance?

Thank you very much in advance.
Joe

Bro_Joey_Gowdy
01-07-2008, 08:56 AM
Any updates for 3.7.0. ??

Jase2
05-18-2008, 09:40 AM
Anyone know if this works on 3.7.0? Andreas, will you be updating it?

Andreas
05-18-2008, 09:51 AM
Any updates for 3.7.0. ??

No. No update necessary.

dknelson
05-18-2008, 09:53 AM
Working fine on my 3.7

Jase2
05-18-2008, 10:14 AM
Not working for me on 3.7.0

Actually, I'm now getting database error when trying to upload a profile pic.

Andreas
05-18-2008, 10:18 AM
Then you are most likely doing smth wrong :)
You do realize that you have to edit the templates manually?

Jase2
05-18-2008, 10:19 AM
Of course... I added (to postbit template) :

<if condition="$post['hasprofilepic']"><img src="$stylevar[imgdir_misc]/photo.png" alt="<phrase 1="$post[username]">$vbphrase[x_has_profilepic]</phrase>" /></if>

Jase2
05-18-2008, 10:25 AM
No. No update necessary.

Personally, I think there is. If it works with 3.7 -- then why not release it in the 3.7 section ?

Also, I get database error -- I certainly haven't missed anything, not that you can ;)

Andreas
05-18-2008, 10:26 AM
Is photo.png located in the correct directory?
Does it show up if you delete your picture and add it again?
If so: Which MySQL Version do you use?

Andreas
05-18-2008, 10:28 AM
Personally, I think there is. If it works with 3.7 -- then why not release it in the 3.7 section ?
There would be a conflict in version checking as there can't be two releaes with the same product id - and I am definitly not going to change the product id just to re-release smth. that works just fine.

I am also not willing to give support (I don't give support anyway) for the exact same code in several threads - that makes no sense.

Jase2
05-18-2008, 10:46 AM
Just re-installed the PRODUCT and it is working now.

I have mine right next to the online button, is there anyway I can get it to remain the same height? See this post to see it in action: http://www.techsupportteam.org/forum/18497-post3.html

travistust
10-12-2009, 01:50 PM
When trying to import the XML file (product-profpicicon.xml), I get the following error:

Invalid File Specified.

Please help.