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-27-2003 10:00 PM

User Icons
 
Current version: 1.2.1 (Last updated:4/30/03)
------------------------------------------------------------------
New features/fixes since the last update:
- Optimized code so it uses much less queries on private.php.
- Added instructions I forgot for private.php.
------------------------------------------------------------------

With this hack members have icons next to their name in posts, announcements, private messages, on the who's online and on the forumdisplay page. Users can use a public icon list or upload their own icon just like avatars. They can also choose to not display icons in the user cp. Administrators have various icon options exactly like with avatars.

This is based upon the mini avatars hack but I liked it more if it was exactly like how avatars are handled. A whole lot of the code is a copy from the avatar code except all variables are changed and only a few other changes/additions. But I wrote a full instruction for your convenience. :D

You can see it in action here: http://forums.thegaminguniverse.com.

Screenshots
Screenshot of icons on the who's online on index.php.
Screenshot of icons on the who's online on online.php.
Screenshot of icons in the posts on showthread.php (also in private messages and announcements).
Screenshot of icons on the thread list on forumdisplay.php.
Screenshot of the edit icon option in your user cp.
Screenshot of icon options in the admin cp under.

Dark Jim 01-28-2003 08:33 PM

Screenshot of icons on the who's online on index.php.

Dark Jim 01-28-2003 08:33 PM

Screenshot of icons on the who's online on online.php.

Dark Jim 01-28-2003 08:34 PM

Screenshot of icons in the posts on showthread.php (also in private messages and announcements).

Dark Jim 01-28-2003 08:35 PM

Screenshot of icons on the thread list on forumdisplay.php.

Dark Jim 01-28-2003 08:36 PM

Screenshot of the edit icon option in your user cp.

Dark Jim 01-28-2003 08:38 PM

Screenshot of icon options in the admin cp under.

Dark Jim 01-28-2003 08:46 PM

I will make the instructions for a store integration soon (I already have it in my own store).

Vivi Ornitier 01-28-2003 09:59 PM

nice hack man. Do u have likea page or somethin full of cool icons that we can use. My smilies and post icons are weak

Dark Jim 01-28-2003 10:04 PM

Not really. I just uploaded a buch of smilies to the public icon list. But I'll look for it sometime.

Vivi Ornitier 01-28-2003 11:08 PM

OMG!! ++++in a. This is the BIGGEST hack i've ever installed. The instructures took me at least an hour . . . . damn it's like 20 pages. God i don't even wanna know how long that took u to write Dark J .. . anywas, GREAT JOB!

Vivi Ornitier 01-28-2003 11:11 PM

Hey i'm having a problem. I installed the hack but then when i go into edit options and click the button, it just goes to a blank page. somethin wrong wit member.php?

Vivi Ornitier 01-28-2003 11:22 PM

oh wait my bad i didn't add any of the templates

Dark Jim 01-28-2003 11:22 PM

You mean totally blank? Did you add all templates because it must be a template is missing. I will check if I included all templates.

Edit: Ok so it was a missing template.
Quote:

Originally posted by Vivi Ornitier
OMG!! ++++in a. This is the BIGGEST hack i've ever installed. The instructures took me at least an hour . . . . damn it's like 20 pages. God i don't even wanna know how long that took u to write Dark J .. . anywas, GREAT JOB!
Well it took a lot of time looking up all avatar code in all files, copying it and modifying it, making some more changes where neccesssary, adding some more stuff.... but like I said a whole lot of the code is almost exactly like that avatar code, I didn't write it from scratch. :confused:

Vivi Ornitier 01-29-2003 12:15 AM

okay the icon isn't showing up anywhere in my forums except for the announcements. I't snot goin on in index.php and not online.php or forumdisplay.php

if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "$iconavatar<b><i><font color=red>$loggedin[username]</font></i></b>"; // Color for Admin

That's my little code for the colors for admin part. I have the color online hack.

I'm on 2.2.6 and this code is NOT in index.php

} else {
$username = $loggedin[username];
}

Dark Jim 01-29-2003 12:29 AM

Did you set to show icons for you in your user cp. I forgot to include these queries in the instructions.

ALTER TABLE user CHANGE options options smallint(6) NOT NULL default '31';

UPDATE user SET options=options+16;

I have 2.2.7 but no default installation of it anymore. I will look at a default 2.2.9.

Edit: I see the code is:
PHP Code:

      } else {
                
$username $loggedin['username'];
            } 

Change that to
PHP Code:

      } else {
                
$username "$iconavatar$loggedin[username]";
            } 


Vivi Ornitier 01-29-2003 12:38 AM

ahhh those queries made the difference. I still didn't see the index.php code but it's good it works, now i gotta find some pics, can u just give me the ones ur using? i need smaller pics.

Dark Jim 01-29-2003 12:42 AM

Also in announcement.php step 2.3 should be:

2.3. Below that add:
-----------------------------------------------------------------
if ($post[iconavatarid]!=0) {
$iconavatarurl=$post[iconavatarpath];
} else {
if ($post[hascustomiconavatar] and $iconavatarenabled) {
$iconavatarurl="iconavatar.php?userid=$post[userid]&dateline=$post[iconavatardateline]";
} else {
$iconavatarurl="";
}
}
if ($iconavatarurl=="") {
$post[iconavatar]="";
} elseif ($bbuserinfo[userid]>0 and !($bbuserinfo[showiconavatars])) {
$post[iconavatar]="";

} else {
eval("\$post[iconavatar] = \"".gettemplate("postbit_iconavatar")."\";");
}
-----------------------------------------------------------------

I assume you had icons set to not display and becauase I forgot the red line it still displayed there. I will update the instructions.

Dark Jim 01-29-2003 12:48 AM

And the icons on my public icon list are some of my smilies which you can find here: at the bottom. You willl need to ask permission though and link to the site like I did and is done on this site. The others you may see are custom icons.

alkatraz 01-29-2003 03:15 AM

Great idea!

Vivi Ornitier 01-29-2003 03:44 AM

hey u should add an option where ppl can upload their pics or just simply link it from another destination, that would be the best way.

Dark Jim 01-29-2003 09:53 AM

Huh? People can already upload icons if they have enough posts. You may need to enable upload and lower the number of required posts under vBulletin Options.

EchoHype.com 01-29-2003 02:09 PM

Hey Dark Jim,

Can you set this to be like........only the admins/supermods/mods choose who can have the little pic thing next to their name or what not.

IE: If the staff decides that "bobberman46" was the member of the week, they can enable him to have the "member of the week icon thing" next to his username. But no other user on the forum can do so?

Vivi Ornitier 01-29-2003 02:31 PM

Dark J: I dont' see the options in my vbulletin options. It's just for avatars, nothign else.

Dark Jim 01-29-2003 02:45 PM

Quote:

Originally posted by EchoHype.com
Hey Dark Jim,

Can you set this to be like........only the admins/supermods/mods choose who can have the little pic thing next to their name or what not.

IE: If the staff decides that "bobberman46" was the member of the week, they can enable him to have the "member of the week icon thing" next to his username. But no other user on the forum can do so?

I could probably but I only release hacks that I use myself, sorry.

Quote:

Originally posted by Vivi Ornitier
Dark J: I dont' see the options in my vbulletin options. It's just for avatars, nothign else.
Odd. Check your database. What is the last row in the table settinggroup? And what is the last row in the table setting?

Dean C 01-29-2003 03:32 PM

Looks like one of these nice hacks again ;)

Good job buddy *thumbs up*

- miSt

Vivi Ornitier 01-29-2003 08:25 PM

Dark J: THe last table is the Upload options choice.

Dark Jim 01-29-2003 10:05 PM

Hmm I don't think so. Run this query:

SELECT * FROM settinggroup LIMIT 0, 40;

and tell me then what the last row is from settinggroup. Is it "Who's online" with settinggroupid "31"?

Erwin 01-30-2003 02:28 AM

Well done, Dark Jim! :) I've done a similar thing based on the mini-avatars hack, but mine's mainly template-based. :) Good job!

Dark Jim 01-30-2003 12:03 PM

So noone else had problems installing it?

Vivi Ornitier 01-30-2003 01:18 PM

I just still can't see the upload your own options.

Upload optiosn is #30, there is no 31

Dark Jim 01-30-2003 04:56 PM

Upload is #30 yes but there should at least be a #31 (Who's online) which is with a default installation of vBulletin.

See the picture (attachment). Note that row #32 is another hack I installed and row #33 is the icon hack.

Now could you export the data of the tables setting and settinggroup and attach the files to a reply? In your admin cp just go to "back up database" and only set the tables setting and settinggroup to "yes", then click "do backup". Post that file here and I'll check it.

Dark Jim 01-30-2003 05:31 PM

I forgot to include the step that says you need to edit the postbit template to include icons in your posts. Here it is:

18.3 postbit
-----------------------------------------------------------------
Put $post[iconavatar] whereever you want the icon to appear in a post. I suggest putting it left or right next to the member's name.
-----------------------------------------------------------------

Attachment updated.

Vivi Ornitier 01-30-2003 07:37 PM

30 tables only, no who's online

Why woudl the who's onlinet hing matter anyway?

And also i can't upload my table because it won't allow me to upload .sql files

Vivi Ornitier 01-30-2003 07:39 PM

actually, i just opened up my settinggroup.sql file in editpad and it shows the #31 who's online table along wit 40 others. I just don't see that option in phpadmin for some reason . . . that's odd

Vivi Ornitier 01-30-2003 07:40 PM

here it is

Dark Jim 01-30-2003 08:08 PM

Well that's really odd. It should work. :confused: I just tested it again on a default board and even after changing the id and display order to whatever it showed up. The instructions can't be wrong or incomplete either since you don't need to do anything else besides inserting some data in those 2 tables. If anyone else knows what's wrong please assist but I have no idea. :ermm:

Edit: Well I tested it by putting the stuff exactly like you have it. Well look at the attached pic, the category does show up. And I added a row in the table setting with settinggroupid 37 and it showed up too.

Vivi Ornitier 01-30-2003 11:16 PM

hmmmm . . .give me the exact edits and queries that went along wit getting that option to be in the vbulletin options page.

Dark Jim 01-30-2003 11:25 PM

Uh I just ran the same query as you did for the table settinggroup. Which is

INSERT INTO settinggroup VALUES('37', 'User Icons', '32');

This should be fine. Now run the following queries:

-----------------------------------------------------------------
INSERT INTO setting VALUES (NULL, 37, 'Enable User Icons', 'iconavatarenabled', '1', 'Use this option to enable/disable the overall use of usericons.<br><br>User icons are small images displayed next to usernames in thread display, the who\'s online and user info pages.', 'yesno', 1);
-----------------------------------------------------------------
INSERT INTO setting VALUES (NULL, 37, 'Minimum custom posts', 'iconavatarcustomposts', '1000000', 'Minimum number of posts that a user required before they can specify a custom user icon for use.', '', 2);
-----------------------------------------------------------------
INSERT INTO setting VALUES (NULL, 37, 'Allow uploads', 'iconavatarallowupload', '1', 'Allow user to upload their own custom user icon if they have enough posts?', 'yesno', 3);
-----------------------------------------------------------------
INSERT INTO setting VALUES (NULL, 37, 'Allow website uploads', 'iconavatarallowwebsite', '1', 'Allow user to upload their own custom user icon from another website if they have enough posts?', 'yesno', 4);
-----------------------------------------------------------------
INSERT INTO setting VALUES (NULL, 37, 'Maximum Dimensions', 'iconavatarmaxdimension', '16', 'Maximum width and height (in pixels) that the custom user icon image can be.', '', 5);
-----------------------------------------------------------------
INSERT INTO setting VALUES (NULL, 37, 'Maximum File Size', 'iconavatarmaxsize', '2000', 'The maximum file size (in bytes) that an avatar can be.\r\n\r\n1 KB = 1024 bytes\r\n1 MB = 1048576 bytes', '', 6);
-----------------------------------------------------------------
INSERT INTO setting VALUES (NULL, 37, 'Display Height', 'numiconavatarshigh', '10', 'How many rows of user icons do you wish to display to the user when selecting an user icon?', '', 7);
-----------------------------------------------------------------
INSERT INTO setting VALUES (NULL, 37, 'Display Width', 'numiconavatarswide', '10', 'How many columns of user icons do you wish to display to the user when selecting an user icon?', '', 8);
-----------------------------------------------------------------

Vivi Ornitier 01-31-2003 12:03 AM

oh dude! it worked

The option was there and it seemed that the custom posts needed was set to like 100000

GREAT JOB!!


All times are GMT. The time now is 06:36 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.01689 seconds
  • Memory Usage 1,831KB
  • 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
  • (2)bbcode_php_printable
  • (3)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