PDA

View Full Version : [VB] Users Habbo in Postbit



Favourtism
06-04-2009, 01:37 PM
This is how to get an image of a users Habbo to display in the postbit.

Firsly create a profile field in Admincp by going to User Profile Field Manager > Add new. Then select single line text box. Then fill the form out like this:

http://uploadpicz.com/images/E7GC442.jpg
Once done, click save etc. Then on User Profile Field Manager it will say next to the field name (e.g 'Habbo Name') something like field20 or field1. You'll need the field number for this next bit.

Go to Styles Manager and edit postbit_legacy (or postbit depending on what you've set your forum to use) and insert this code where you'd like it; I recommend above this;

<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>


add this above the code above:

<if condition="$bbuserinfo[fieldXX]">
<a href="http://www.habbo.co.uk/home/$bbuserinfo[fieldXX]" target="_blank"><img src="http://www.habbo.co.uk/habbo-imaging/avatarimage?user=$bbuserinfo[fieldXX]&action=wav&direction=4&head_direction=3&gesture=s ml&size=s&img_format=gif" alt="$bbuserinfo[fieldXX]" border="0" /></a>
</if>
You must replaced the XX with your field number .e.g 20
This works by grabbing the Habbo's name from the profile field and sending the data from it to the habbo image url.

Clicking the Habbo will also open up their Habbo Hime in a new window.

NOTE: If the user hasn't filled in the profile field then there will just be a blank space as it uses <if condition> tags.
It will look like this (example shows my Habbo):
http://www.habbo.co.uk/habbo-imaging/avatarimage?user=favourtism&action=wav&direction=4&head_direction=3&gesture=sml&size=s&img_format=gif




Later on I'll slip up a Habboey box, show you how to add it into the Additional CSS and edit the code so that the lovely little Habbo image is in a nice and smart box :}

Written by Favourtism

Flisker
14-04-2009, 07:15 PM
nice tutorial.

Portish
15-04-2009, 03:05 PM
Good tutorial Tom. - well done!

efq
16-04-2009, 09:50 PM
I have a profile field that I want displayed in my Forum, the field id is 5 but I have no idea what code to use. I am using VB 3.8.2.

I'll rep+ if you could help me.

wsg14
17-04-2009, 10:32 PM
I have a profile field that I want displayed in my Forum, the field id is 5 but I have no idea what code to use. I am using VB 3.8.2.

I'll rep+ if you could help me.

<if condition="$bbuserinfo[field5]">
Whatever:$bbuserinfo[field5]
</if>

efq
18-04-2009, 12:01 AM
<if condition="$bbuserinfo[field5]">
Whatever:$bbuserinfo[field5]
</if>
But it seems to display my name on their posts information aswell, how can I make it to what they put on their profile?

EDIT: Don't worry, changed it to $post. Thanks and rep+

Want to hide these adverts? Register an account for free!