vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   User Icons (https://vborg.vbsupport.ru/showthread.php?t=48264)

Dark Jim 01-31-2003 07:01 AM

O_o Uhm ok I'll change the default to 100 or something. Yeah I set it too that number because I want memebers to buy custom icons with points. I will release the store integrated version soon.

Edit: Updated the instructions with step 19 that says you need to create a folder avataricons in your images folder.

Dark Jim 02-09-2003 11:07 PM

I added the icons in the user profile (getinfo template) and memberlist (memberlist template). Instructions updated and in my first post you can see how to upgrade from 1.0 to this.

Also if you installed this and like it, please click the install button in this thread.

007 02-10-2003 10:34 PM

wow... i took one look at the install text file and this is definately the longest hack i have seen. before i go through all this work though, i have to know, has anyone had any problems with this in 2.2.9? also, hypothetically speaking.. IF i did have problems, would the fact that i just added all these queries to my db slow anything down or is there a way to undo them? thanks in advance. :beard:

Dark Jim 02-11-2003 08:57 AM

The database changes can be easily undone. You just need to delete the tables and rows that were added. And if you leave them it shouldn't matter either.

Erwin 02-11-2003 09:19 AM

Be aware that each icon.php image shown is 1 database query. :) It all adds up. On your forumhome, if you have 50 users with icons, that is 50 extra db queries (that won't show up in microstats by the way). I had a variation of this hack running for a while, but had to remove it because of the server strain.

Dark Jim 02-11-2003 07:36 PM

Hmm I didn't think of that. If it is really becoming a problem then you can either remove it from the forum index or set the post requirement high so only really postaholics get custom icons. :)

Dark Jim 02-16-2003 06:38 PM

This hack works on vBulletin 2.3.0. I also made a store integration which you can find here: http://www.vbulletin.org/hacks/index...ack&hackid=974.

Dark Jim 02-28-2003 08:06 PM

Can someone PLEASE help me with reducing the queries? :( I have no idea how. It needs optimising in forumdisplay.php, index.php, memberlist.php and online.php.

007 03-01-2003 08:56 AM

Just wondering, do NORMAL avitars also add one query each?? If not maybe you could try to copy how the avatar idea works, since this is basically the exact same thing only a smaller file, and inserted in a different place... That probably means avatars also add query's though huh.. I never really understood why it was so bad to have a lot of query's?? Does it use a lot more bandwith or something? What happens?

Dark Jim 03-01-2003 12:31 PM

Normal avatars do not add a query each but neither do the icons in showthread.php, announcement.php and private.php. The icons did add a query each on forumdisplay.php, index.php, memberlist.php and online.php.

However they do not anymore with the exception of online.php as I still haven't figured that one out. I just updated the hack to 1.2 which gets rid of all those extra queries. For example my memberlist.php had 39 queries on one page, after optimising it only 12. :D

So everyone who uses this, you should really update.

007 03-01-2003 11:22 PM

I was waiting for you to update it before I installed. :) THANKS! This hack is awesome. I knew you could do it ;)

I would have offered my advice, but the only hacking I know how to do is if/else statements so far. (lol) :ermm:

Dark Jim 03-01-2003 11:43 PM

Small update. Please redo step 7.1 in the instructions. Without this fix, when you click on a member in the memberlist, it will show an error that the user does not exist. Everything else should work fine now. I hope I can optimise online.php soon, I think that is the only thing left. But the most important pages are done. Please click the install button if you use this hack. :)

007 03-02-2003 01:59 AM

Maaaaan, I have been doing this for over an hour now and I'm up to 12.1.... *sigh* LONG hack! I can;t even immagine how long it took you to make it Jim... :) Wow.

One thing I noticed on 12.1 is that you included "msn" in the list. I have this installed buy others might not. You might want to point that out. ;)

007 03-02-2003 03:12 AM

there, finished. One thing I noticed in online.php is:

PHP Code:

else {
          
$userinfo["$key"]['username'] = $user[username]$iconavatar;
        } 

should be
PHP Code:

else {
          
$userinfo["$key"]['username'] = "$user[username]$iconavatar";
        } 

with the quotes. Otherwise it comes up with a parse error.

Dark Jim 03-02-2003 10:22 AM

Oh I did that but apparently not in the instructions. :ermm: Will fix this.

Edit: Hmm it was in the instructions:
Quote:

9.5. Find:
-----------------------------------------------------------------
} else {
$userinfo["$key"]['username'] = $user[username];
}
-----------------------------------------------------------------

9.5. Replace that with:
-----------------------------------------------------------------
} else {
$userinfo["$key"]['username'] = "$iconavatar$user[username]";
}
-----------------------------------------------------------------

Save and close online.php.
Updated to remove the msn thing.

corsacrazy 03-14-2003 10:34 AM

any way to just show icons if they are a donating member so therefore i can just have a default donation icon ?

sabret00the 03-17-2003 10:56 AM

hi this is a good hack but i only want it to display the icon in the showthread, announcement and my welcome panel, would i be ok to only make the changes to the index, showthread, global and announcement files?

sabret00the 03-23-2003 02:42 PM

has dark jim vanished?

Dark Jim 03-23-2003 04:35 PM

Quote:

03-14-03 at 01:34 PM corsacrazy said this in Post #56
any way to just show icons if they are a donating member so therefore i can just have a default donation icon ?
Well you could set the posts requirements to use a custom icon to 10000000, have no public icons and add user icons in the admin cp for donating members. If you want to do it otherwise it requires more hacking.

Quote:

03-17-03 at 01:56 PM sabret00the said this in Post #57
hi this is a good hack but i only want it to display the icon in the showthread, announcement and my welcome panel, would i be ok to only make the changes to the index, showthread, global and announcement files?
You can skip some files such as memberlist.php, online.php and some more yes. Files such as global.php, admin/functions.php, member.php are required.

sabret00the 03-25-2003 10:06 AM

thanks dude, i'll give it a try

sabret00the 03-25-2003 05:07 PM

okies this is working just liek i wanted but the thing now is, can i enlarge the icon size at all?

Dark Jim 03-25-2003 06:44 PM

Yes, you can set the maximum size under vBulletin Options -> User Icons. :)

See here

Dan 03-25-2003 07:01 PM

Works nice.....

/me licks an orange flavored install button

Dan 03-25-2003 08:38 PM

i did everything it told me in the install file and now i get this

-points to ss-

Dark Jim 03-25-2003 09:27 PM

Huh? What is the url of that broken image and what is the url to the image that should have showed up?

Dan 03-25-2003 09:31 PM

its pointing to /forums//images/ as the image and its /forums/images/announce.gif

Dark Jim 03-25-2003 09:33 PM

This step:
Quote:

3.2. Find:
-----------------------------------------------------------------
if ($announcement[startdate]>$bbuserinfo[lastvisit]) {
$announcement[icon]='newannounce.gif';
} else {
$announcement[icon]='announce.gif';
}
-----------------------------------------------------------------

3.2. Below that add:
-----------------------------------------------------------------
if ($announcement[iconavatarpath]!="") {
$iconavatarurl=$announcement[iconavatarpath];
} else if ($announcement['hascustomiconavatar']) {
$iconavatarurl="iconavatar.php?userid=$announcemen t[userid]&dateline=$iconavatarinfo[dateline]";
} else {
$iconavatarurl='';
}

if ($iconavatarurl!="") {
$iconavatar = "<img src=\"$iconavatarurl\" border=\"0\" alt=\"\">";
} else {
$iconavatar = "";
}
if ($bbuserinfo[userid]>0 and !($bbuserinfo[showiconavatars])) {
$iconavatar = "";
}
-----------------------------------------------------------------
Are you sure you added the code below the part you needed to find and not replaced it?

Dan 03-25-2003 09:39 PM

ah thats it I must have replaced it by accident thank you

DigitalDesktops 03-27-2003 11:47 PM

I having problems with this hack. The User Icons only appear in member.php. It doesn't appear anywhere else. I've tried to install it twice but it still won't show up. I edited all the templates, and i followed the instructions, but its still not working. I'm using 2.3.0
Does any anyone know how i can fix this? Thanks in Advance.

Here's all the files I edited.

Dark Jim 03-28-2003 08:51 AM

I noticed you forgot to do step 19.4a. Under edit options in your user cp I didn't notice the option to show or not show icons. Do that step, set the option to "yes" and then see if the icons show up.

sabret00the 03-28-2003 09:11 AM

Quote:

03-25-03 at 08:44 PM Dark Jim said this in Post #62
Yes, you can set the maximum size under vBulletin Options -> User Icons. :)

See here

sorry jim i was being dumb, got excited before even checking it over properly

DigitalDesktops 03-28-2003 02:03 PM

Quote:

Today at 10:51 AM Dark Jim said this in Post #70
I noticed you forgot to do step 19.4a. Under edit options in your user cp I didn't notice the option to show or not show icons. Do that step, set the option to "yes" and then see if the icons show up.
It shows up in Who's Online, member.php, memberlist.php, forumdisplay.php.

But it doesn't show up in showthread.php, and private.php.

Dark Jim 04-30-2003 02:51 PM

I updated this again. I had a few 100 private messsages and it caused a few 100 queries too. Now I changed it to not use any additional queries. :) Everyone who uses this hack I suggest you redo step 10. I also added a step I forgot to add the whole time so your icons would never show up in private messages. The only thing I can think of that still needs to be done is optimize online.php.

kevinnguyen 06-01-2003 05:49 AM

this is the longest hack i've ever done
very nice thoe
thanx

Dark Jim 06-01-2003 02:26 PM

The last update is not working right. While it does reduce the queries, the icons are not showing correctly or not at all. Other than that it works fine. I'll need to figure out how to get this working sometime. Help is appreciated. I also need to optimize the code for online.php.

MrNase 06-03-2003 06:37 PM

Hey, i got a problem :(

iam using the 2.3.0, i installed it and i shows up everything correctly but not at the index.php :(

This is my original-code:
Code:

    if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
              $username = "<b><i>$loggedin[username]</i></b>";
      } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
              $username = "<b>$loggedin[username]</b>";
      } else {
                                $username = $loggedin['username'];
                        }

and this is my current code:
Code:

  if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
              $username = "$iconavatar<b><i>$loggedin[username]</i></b>";
                        } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
                                $username = "$iconavatar<b>$loggedin[username]</b>";
                          } else {
                                $username = "$iconavatar$loggedin[username]";
                        }

the problem is: the icon isn't shown up by a mod... Normal User and admin works fine, even the mod at the online.php works fine, but there is NO icon for a mod at the index.php... what have i done wrong?

I downloaded the 1.2.1, did you change that number after fixing the instructions?


now, the part in the index.php looks like this, but the icon is shown up by a normal only... but iam the admin and iam the only one with an icon ;)
Code:

if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
              $username = "<b><i>$loggedin[username]</i></b>";
      } else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
              $username = "<b>$loggedin[username]</b>";
      } else {
                                $username = $loggedin['username'];
                        }


MrNase 06-05-2003 06:13 PM

no one :(

now, it is not shown up by the moderator group...

demo @ www.sportboard.de (german ;))

Dark Jim 06-05-2003 08:53 PM

That piece of code appears twice in index.php. Did you make changes to both?

MrNase 06-06-2003 07:33 AM

ah i think iam blind or there is something missing in your instruction ;)
you have to place $iconavatar just before <b>$loggedin[username]</b> also (2 times in index.php) :)

I didn't see that in your instruction and i forgot to include but now i added it and it works, thanks for that beautiful hack, my users like it :)

*clicking install*

sabret00the 03-17-2004 10:50 AM

i've enjoyed using this with vb2, are there any plans to port to vb3?


All times are GMT. The time now is 09:13 AM.

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.01498 seconds
  • Memory Usage 1,832KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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