vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Show Icon if User has a Profile Picture (https://vborg.vbsupport.ru/showthread.php?t=95916)

Andreas 09-08-2005 10:00 PM

Show Icon if User has a Profile Picture
 
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

Quote:

Originally Posted by FleaBag
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"

PHP Code:

<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):

PHP Code:

<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

Quote:

Originally Posted by KirbyDE
@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

Quote:

Originally Posted by KirbyDE
@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

Quote:

Originally Posted by KirbyDE
@mikexxx
You are using RC3?

Yes.

PHP Code:

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

Quote:

Originally Posted by KirbyDE
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

Quote:

Originally Posted by KirbyDE
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

Quote:

Originally Posted by folkish
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

Quote:

Originally Posted by mikexxx
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

Quote:

Originally Posted by DrHUS
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!


All times are GMT. The time now is 04:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01194 seconds
  • Memory Usage 1,799KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete