MyBB Community Forums

Full Version: Posbit!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've added images to replace the text twitter, xbox and ps3. Anyway once i put a twitter name into edit profile in the usercp it dont show up on the postbit?

Maybe theres something wrong with my code?


http://i.imgur.com/qpPXd.png


And this is my code the the postbit.

			{$post['groupimage']}
			{$post['useravatar']}<br/>
                        {$post['user_details']}
                        <b>Supports:</b> {$post['fid4']}<br />
                        <b>Fav Player:</b> {$post['fid5']}<br />
                        <b>Location:</b> {$post['fid1']}<br />
                        <img src="images/twittxbox360/twitter.png"{$post['fid6']}<br />                        
                         <br /> <img src="images/twittxbox360/360.png"{$post['fid8']}
 <br />                        <br />  <img src="images/twittxbox360/ps3.png"{$post['fid9']}
You need to close your img tags before showing the field values.

Example:
<img src="image.png" /> {$post['fid9']}
			{$post['groupimage']}
			{$post['useravatar']}<br/>
                        {$post['user_details']}
                        <b>Supports:</b> {$post['fid4']}<br />
                        <b>Fav Player:</b> {$post['fid5']}<br />
                        <b>Location:</b> {$post['fid1']}<br />
                        <img src="images/twittxbox360/twitter.png" alt="" />{$post['fid6']}<br />                        
                        <img src="images/twittxbox360/360.png" alt="" />{$post['fid8']}<br />
                        <img src="images/twittxbox360/ps3.png" alt="" />{$post['fid9']}
It's all sorted but I've got a bigger problem.

Im not even sure you can do this on mybb, for example i've got twitter and a xbox so i'd input my information into them. I dont have a PS3 but it's still there.

How would i make it so if you dont have a ps3/xbox/twitter then they dont show up.

If that makes sense?
Seems abit confusing to me, I'm still learning!

This time a few months ago i had no idea how to even get onto the templates, now at least i know certain things about editing a postbit to look decent etc.

Hmmm
Install the plugin and then use this:
			{$post['groupimage']}
			{$post['useravatar']}<br/>
			{$post['user_details']}
			<b>Supports:</b> {$post['fid4']}<br />
			<b>Fav Player:</b> {$post['fid5']}<br />
			<b>Location:</b> {$post['fid1']}<br />
			<if !empty($post['fid6']) then>
				<img src="images/twittxbox360/twitter.png" alt="" />{$post['fid6']}<br />
			</if>                        
			<if !empty($post['fid8']) then>
				<img src="images/twittxbox360/360.png" alt="" />{$post['fid8']}<br />
			</if>
			<if !empty($post['fid9']) then>
				<img src="images/twittxbox360/ps3.png" alt="" />{$post['fid9']}
			</if>

Not seem to be working, just adds &nbps i think it is, like 200 of them.
I've edited my previous post, try it again.
Worked great! Thanks.