MyBB Community Forums

Full Version: Showteam?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey, just another quick question, how do I put it so that there is an image by there name in the show team page and the image is taken from their custom profile field named "Habbo Name". The image I want displayed would be from link: http://www.habbo.com/habbo-imaging/avatarimage?user=HABBO NAME FROM PROFILE FIELD&action=wav&direction=2&head_direction=3&gesture=sml&size=s&img_format=gif

Also when they click on that link, it goes to: http://www.habbo.com/home/HABBO NAME FROM PROFILE FIELD

Thanks guys Smile

~ David
Bump

+ Rep to anyone who is able to help Smile

~ David
You'll need a core edit.

In showteam.php, find:
		$bgcolor = alt_trow();

Add after:
		// Fetch custom profile fields
		$query = $db->query("
			SELECT * 
			FROM ".TABLE_PREFIX."userfields 
			WHERE ufid='".$user['uid']."'");
		
        $profilefields = $db->fetch_array($query); 

Then you can use {$profilefields['fidX']} in the showteam_usergroup_user template to display your custom profile fields. Replace X with the actual custom profile field ID.

Hopefully, the following will display the image and link to their profile:
<a href="http://www.habbo.com/home/{$profilefields['fidX']}" title="{$user['username']}'s Habbo Page"><img src="http://www.habbo.com/habbo-imaging/avatarimage?user={$profilefields['fidX']}&action=wav&direction=2&head_direction=3&gesture=sml&size=s&img_format=gif" alt="{$profilefields['fidX']}" /></a>
(2012-02-07, 12:25 AM)Alan Shepperson Wrote: [ -> ]You'll need a core edit.

In showteam.php, find:
		$bgcolor = alt_trow();

Add after:
		// Fetch custom profile fields
		$query = $db->query("
			SELECT * 
			FROM ".TABLE_PREFIX."userfields 
			WHERE ufid='".$user['uid']."'");
		
        $profilefields = $db->fetch_array($query); 

Then you can use {$profilefields['fidX']} in the showteam_usergroup_user template to display your custom profile fields. Replace X with the actual custom profile field ID.

Hopefully, the following will display the image and link to their profile:
<a href="http://www.habbo.com/home/{$profilefields['fidX']}" title="{$user['username']}'s Habbo Page"><img src="http://www.habbo.com/habbo-imaging/avatarimage?user={$profilefields['fidX']}&action=wav&direction=2&head_direction=3&gesture=sml&size=s&img_format=gif" alt="{$profilefields['fidX']}" /></a>

That works perfectly, thanks Alan. Also some users don't have an account on the site "habbo" so is it possible that if they do not have an account that it doesn't show anything as at the moment it looks like this: http://habfab.com/forum/showteam.php

Thanks for all your help Alan Smile

~ David

Edit: also noticed that the blue menu bar seems to be not long enough for the top and where it says "email" and "pm" could I put "Habbo name" above the image? Also off topic but how would I remove the section that says "moderators" as these are the moderators for specific forums, I'd prefer to have it just of my custom made group. Thanks Smile
In showteam_usergroup, find :
<td class="thead" colspan="3">

Replace with :
<td class="thead" colspan="4">
(2012-02-07, 06:17 PM)cfillion Wrote: [ -> ]In showteam_usergroup, find :
<td class="thead" colspan="3">

Replace with :
<td class="thead" colspan="4">

Perfect, thanks! Also any idea how to get rid of the "moderator" section and if nothing in the profile field is set then it doesn't show any image?

Thanks Smile

~ David
bump

Thanks,

~ David