Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-31-2002, 04:13 PM
mjames's Avatar
mjames mjames is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default User title graphics: Hack needed?

I have added user title graphics to my moderators on my message boards (similar to what SitePointForums.com has done) and the only way I figured out how to do this was manually edit moderator's options in the CP and add the HTML for the graphic.

Ideally, I'd like to have it so certain graphics go underneath different usergroup's user titles - but can you do that? I tried coding the HTML into a usergroup's properties and it didn't work.

Since custom user titles are enabled, if my moderators change their titles, they will lose their graphic unless they code it in. There has to be a better way to do this, what I'm doing is not complicated. So, perhaps I overlooked a way to do this - should I be looking for a hack? Thanks for your assistance.
Reply With Quote
  #2  
Old 03-31-2002, 04:32 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup, you need a hack. Since you have custom titles on putting the image in the usergroup's title won't do the trick.

Anyway, in functions.php find:
Code:
		$post[joindate]=vbdate($registereddateformat,$post[joindate]);
and right after that add this:
Code:
		$post['userimage'] = '<img src="{imagesfolder}/userimages/'.$post['usergroupid'].'.gif" border="0">';
Now create a folder under your images folder named userimages, and in that folder place an image for every usergroup: Admin's usergroup (by default) is 6, so name the admin's picture 6.gif, and so on.
Reply With Quote
  #3  
Old 03-31-2002, 05:29 PM
mjames's Avatar
mjames mjames is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. So that's all I need to do in order to place the image under my moderator's title? I only want it to do this for my moderators and administrators, how do I do that?
Reply With Quote
  #4  
Old 04-01-2002, 03:54 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then use this code:
Code:
		if (ismoderator(0, '', $post['userid'])) {
			$post['userimage'] = '<img src="https://vborg.vbsupport.ru/images/userimages/'.$post['usergroupid'].'.gif" border="0">';
		} else {
			$post['userimage'] = '';
		}
Then use 5.gif for super mods, 6.gif for admins and 7.gif for mods.
Reply With Quote
  #5  
Old 04-03-2002, 11:44 PM
mjames's Avatar
mjames mjames is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Chen - weird that I didn't receive a notification to this thread.

Could you rephrase what I have to do from the beginning? In functions.php, I replace the code you mentioned above with the code you mentioned in your last post? Just trying to make sure I put the pieces together right. Why do I need to use 5.gif, 6.gif, and 7.gif?
Reply With Quote
  #6  
Old 04-04-2002, 05:08 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok After the code I mentioned in my first post (with $post[joindate]), add the code I gave you in the 2nd post.
Now create a folder named userimages under your images folder, and create 3 images:
5.gif - this will show up under Super Mods names.
7.gif - under Regular Mods names.
6.gif - under Admins names.
Reply With Quote
  #7  
Old 04-05-2002, 06:05 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, another update. Instead of this in the code:
Code:
		if (ismoderator(0, '', $post['userid'])) {
Use this:
Code:
		if ($post['usergroupid'] == 5 or $post['usergroupid'] == 6 or $post['usergroupid'] == 7) {
(if you are using these usergroup ID's for super mods, admins and mods)
freddie told me it's bad to run ismoderator() in a loop.
Reply With Quote
  #8  
Old 04-07-2002, 03:15 PM
mjames's Avatar
mjames mjames is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Chen,

I finally got around to actually trying this little code and it didn't work! I created a new folder in /images/userimages and uploaded the appropriate files there. I then made the changes to functions.php and there was no change on the site. Have you actually confirmed this works?

To explain again, I want user titles under my administrators, senior moderator (super moderator), and moderators - no one else, not regular users. By your method, will it try to create an image for all usergroups or only ones with images uploaded?

Also, am I right that the number of the image (i.e. 5.gif) corresponds to the usergroup ID? How can I find the usergroup ID? I would assume I could hover over the URL in the Admin CP page that lists the groups.

Here is the code I used in function.php:

Code:
$post['userimage'] = '<img src="http://www.sports-central.org/community/boards/images/userimages/'.$post['usergroupid'].'.gif" border="0">';
Note: I didn't get a chance to try your updated code posted on 04/05, will that do it? Also, I tried to reply earlier via e-mail and it didn't work!

Any help is appreciated!
Reply With Quote
  #9  
Old 04-07-2002, 03:24 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Re getting usergroup ID's, yes that's how.

Hmm, have you added $post[userimage] to your postbit template? I should've mentioned that!
Reply With Quote
  #10  
Old 04-07-2002, 03:41 PM
mjames's Avatar
mjames mjames is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope! I'll try it later today and see how it goes. I'm crossing my fingers.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:44 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.04431 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete