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

Reply
 
Thread Tools Display Modes
  #11  
Old 11-10-2002, 04:38 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That requires hacking.

Open admin/functions.php -

Find:

PHP Code:
        $post[joindate]=vbdate($registereddateformat,$post[joindate]); 
Underneath, add:

PHP Code:
if ($post[fieldx]=="") {
$badge "";
} else {
$badge "<img src="$post[fieldx]">";

Replace x with the custom profile field id number.

Then in your postbit template, use $badge instead of the <img src> code for the badge to show up.

Do the same in member.php.

Find:

PHP Code:
  // display user info 
Underneath, add:

PHP Code:
if ($userinfo[fieldx]=="") {
$badge "";
} else {
$badge "<img src="$userinfo[fieldx]">";

Replace x with the custom profile field id number.

Then in your getinfo template, use $badge instead of the <img src> code for the badge to show up.

Done!
Reply With Quote
  #12  
Old 11-10-2002, 04:41 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Refresh this page - I fixed a small typo in the code.
Reply With Quote
  #13  
Old 11-10-2002, 04:52 AM
LordHelmut's Avatar
LordHelmut LordHelmut is offline
 
Join Date: May 2002
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OMG ITS PERFECT ^_^ Thats really cool man. No one else could get it to do it they way I really wanted but you did it with apparently little effort. One more small question, what file do I edit if I want the image to appear in the Members Online box on the main page?
Reply With Quote
  #14  
Old 11-10-2002, 05:06 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would require editing index.php and making the $loggedins=$DB_site->query JOIN to the field table on top of the user table - this may slow your index.php down a bit. It can be done, but will take some working out. Do you really need it? Wouldn't the graphic be too big?
Reply With Quote
  #15  
Old 11-10-2002, 05:10 AM
LordHelmut's Avatar
LordHelmut LordHelmut is offline
 
Join Date: May 2002
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I really would like to do it. I had orignally just planned on doing that rather than what you showed me how to do. However I really like what you showed me so I added that too. check out www.VisualBasicForum.com it doesnt seem to slow down their load page at all. If its too difficult its ok, I will figure it out somehow
Reply With Quote
  #16  
Old 11-10-2002, 05:37 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you just want an icon to show up for staff, you can do this:

Open index.php -

Find:

PHP Code:
$username "<b><i>$loggedin[username]</i></b>"
Replace with:

PHP Code:
$username "<b><i>$loggedin[username] <img src="http://www.yourforums.com/images/admin.gif"></i></b>"
THE CODE APPEARS TWICE - DO THIS TWICE!

This is for the ADMIN icon. Change the image path to whatever you want.

Then, find:

PHP Code:
$username "<b>$loggedin[username]</b>"
Replace with:

PHP Code:
$username "<b>$loggedin[username] <img src="http://www.yourforums.com/images/mod.gif"></b>"
THE CODE APPEARS TWICE - DO THIS TWICE!

This is for the MODERATOR icon. Change the image path to whatever you want.

For this to work, you need to set in Admin CP, vB Options, for the staff username bold and italics to ON.

As for other users, like I said, it's a JOIN feature if you use the custom profile method.

I think there is a hack that allows members to have small icon next to their username on the homepage. Maybe modify that for your purposes.
Reply With Quote
  #17  
Old 11-10-2002, 05:45 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's this hack:

https://vborg.vbsupport.ru/showthrea...threadid=44593

See if you can modify it so that admins are the only ones who can add the image.
Reply With Quote
  #18  
Old 11-10-2002, 04:44 PM
esawdust esawdust is offline
 
Join Date: Dec 2001
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Love the hack! I am using this to present contractor certification badges by outside associations. Is there any way to hyperlink the image (badge) from the postbit template or the admin user profile screen?

I would also like to be able to add additonal badges (say 3).. I should be able to just repeat the hack using an additional profile field.. (something like $badge, $badge1, $badge2) correct?

Thanks for the great hack.

Greg
Reply With Quote
  #19  
Old 11-14-2002, 01:55 PM
esawdust esawdust is offline
 
Join Date: Dec 2001
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Allow me to clarify..

I already have the bades hack installed and its working great. We run a wood care contractors site and each contractor that is certified by a secific organization is allowed to post their certification logo. What I would like to do is create another form of advertising by enabling the logo to be linked to the each of the organizations websites. So in other words a contractor interested in getting their certification with organization "A" could click on another users badge to bring them that "A" 's website.

Any ideas? \

Thanks!

Greg
Reply With Quote
  #20  
Old 11-17-2002, 03:06 AM
esawdust esawdust is offline
 
Join Date: Dec 2001
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
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:49 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.04360 seconds
  • Memory Usage 2,288KB
  • Queries Executed 14 (?)
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
  • (8)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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_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
  • 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