Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-31-2016, 02:25 PM
Kumara87 Kumara87 is offline
 
Join Date: Oct 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom conversation_userinfo

Hi,

I wanted to know that it has to be modified in the following code so that it works in vbulletin 5. What I want is to put an image depending on the group member that the user belongs to.

PHP Code:
<vb:if condition="is_member_of($post,94) and is_member_of($post,6)"><img src="images/sadmin.gif">
<
vb:elseif condition="is_member_of($post,6)" /><img src="images/admin.gif"><br><vb:else /></vb:if>
<
vb:if condition="is_member_of($post,5)"><img src="images/smod.gif"><br></vb:if>
<
vb:if condition="is_member_of($post,7)"><img src="images/mod.gif"><br></vb:if> 
Thanks,

Kumara
Reply With Quote
  #2  
Old 01-02-2017, 05:49 AM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't have to edit the template to do this.

Just go to AdminCP > Usergroups > Usergroup Manager, then Edit Usergroup of the target usergroup, then in the User Title field, specify the appropriate <img> tag. Repeat for other usergroups. Then Make sure in the AdminCP profile of the user, the "Custom User Title" option is set to No.

Nothing has changed for vB5, this has been the same for vB 3, 4 and 5.
Reply With Quote
  #3  
Old 01-02-2017, 11:59 PM
Kumara87 Kumara87 is offline
 
Join Date: Oct 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noypiscripter View Post
You don't have to edit the template to do this.

Just go to AdminCP > Usergroups > Usergroup Manager, then Edit Usergroup of the target usergroup, then in the User Title field, specify the appropriate <img> tag. Repeat for other usergroups. Then Make sure in the AdminCP profile of the user, the "Custom User Title" option is set to No.

Nothing has changed for vB5, this has been the same for vB 3, 4 and 5.
Thanks. I know this function, but it is not useful to me.
Reply With Quote
  #4  
Old 01-03-2017, 09:51 AM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why is it not useful for you? It accomplishes what you want without modifying any template.
Reply With Quote
Благодарность от:
In Omnibus
  #5  
Old 01-09-2017, 12:33 AM
Kumara87 Kumara87 is offline
 
Join Date: Oct 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noypiscripter View Post
Why is it not useful for you? It accomplishes what you want without modifying any template.
Sorry for not responding sooner. Happy New Year! The User Title I use it to show the range that the user has in a staff. Ej: (designer, programmer, support, etc.)

I want to know that I must modify the code to make it work. Thank you.
Reply With Quote
  #6  
Old 01-09-2017, 05:05 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh ok, it looks like you also need to put a custom image for users with combination of usergroups. In that case you have to modify the template or better yet, create a template hook mod.
Reply With Quote
  #7  
Old 01-09-2017, 11:21 PM
Kumara87 Kumara87 is offline
 
Join Date: Oct 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by noypiscripter View Post
Oh ok, it looks like you also need to put a custom image for users with combination of usergroups. In that case you have to modify the template or better yet, create a template hook mod.
Yes, but I have no idea how to create template hook mod =(. I can't find how to replace the code to validate the usergroup.
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 08:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04498 seconds
  • Memory Usage 2,229KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (1)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete