MyBB Community Forums

Full Version: Join Date to Location
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
By default, MyBB shows the join date under each member's avatar. I'd like to change that to Location. How can this be done?
Hello,

I would recommend you use the custom profile fields feature of MyBB to add one for location and make it required. You can remove the old location by editing a few templates Smile
(2010-10-12, 06:06 AM)Conor Calby Wrote: [ -> ]Hello,

I would recommend you use the custom profile fields feature of MyBB to add one for location and make it required. You can remove the old location by editing a few templates Smile

but how do i also disable the join date?
ACP >> Templates & Style >> Templates >> *yourtheme* >> Post Bit Templates >> postbit_author_user

Find and delete:
{$lang->postbit_joined} {$post['userregdate']}

This tutorial should help with adding the location - http://community.mybb.com/thread-41233.html Smile
Worked perfectly, but do you know how I can only display "location" if the user actually typed a location? if they didn't, location shouldn't be displayed.

Right now it shows "Location:" for people who didn't type their location.
(2010-10-12, 03:08 PM)wigiman Wrote: [ -> ]Worked perfectly, but do you know how I can only display "location" if the user actually typed a location? if they didn't, location shouldn't be displayed.

Right now it shows "Location:" for people who didn't type their location.

You'd need a plugin for that, either one that does this for location specifically or you could use Yumi's template conditionals plugin - http://mybbhacks.zingaburga.com/showthread.php?tid=464
(2010-10-12, 04:21 PM)AJS Wrote: [ -> ]
(2010-10-12, 03:08 PM)wigiman Wrote: [ -> ]Worked perfectly, but do you know how I can only display "location" if the user actually typed a location? if they didn't, location shouldn't be displayed.

Right now it shows "Location:" for people who didn't type their location.

You'd need a plugin for that, either one that does this for location specifically or you could use Yumi's template conditionals plugin - http://mybbhacks.zingaburga.com/showthread.php?tid=464

Ok, plugin installed, now since I am clueless in php, what would be the right phrasing of the condition to show the location only if the user typed a location in the usercp?


Also, if the user puts a long location name in the location, it will break the layout of the forum. Any way to break lines after, let's say, 6 characters?
Any ideas?
Ok, so instead of breaking the line after a set amount of characters for location, I simply limited the character length so the layout won't break. Now all I need is to know how to have location show up only if the user filled that field out. Any insight would be greatly appreciated.