MyBB Community Forums

Full Version: "Homepage" field is displayed even if empty, and tables on right are misplaced
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Thread updated, and both bugs has been fixed, please read.
"Homepage field is displayed even if empty" bug fixed by Johnny S: http://community.mybb.com/thread-157304-...pid1091615.
I have fixed "misplacement" bug which caused Signature/Moderator Options/Admin Options tables being placed wrong due new line is appended at the begin instead at the bottom.
Read my #5 post here for full description: http://community.mybb.com/thread-157304-...pid1091630.
Here is a screenshot preview showing a fixed version (when both bugs were fixed).
Please update files for MyBB feature release on GitHub.
____________________________________________________________

I am running latest MyBB 1.7.2/1.8 forum.
I have spotted an issue which I describe as the following:
Navigate to user profile, link: "home/member.php?action=profile&uid=1", which should be built-in administrator account profile page.
If no changes were made to the user profile, you should see empty field right next to "Homepage".
Preview image here.
It makes non-sense to display it if user assigned empty value to it, right?
"if" statement is missing there, do check if trimmed homepage string is empty before displaying it on user profile (or make use of "?:" ternary operator, whatever).
It should be displayed only in case if trimmed homepage string is not empty, as that makes sense to me.

Also, Moderator Options table which can be seen on above image preview aswell, is not right in place where it should be.
Here I have captured a screenshot which displays a cause of Moderator Options being misplaced, it is a new line that is being appended somewhere - remove it.
http://i.imgur.com/mppbsYF.png
It should not be that hard to fix these two bugs.

Best regards, OmegaExtern. Smile
Agree. If the other empty fields are hidden then homepage should be too
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/1169

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Regarding blank homepage cell i have made following edits to 2 templates:

in member_profile find

<tr>
					<td class="trow1"><strong>{$lang->homepage}</strong></td>
					<td class="trow1">{$website}</td>
				</tr>
				

and replace it with

{$website}

and in member_profile_website replace everything with

	<tr>
					<td class="trow1"><strong>{$lang->homepage}</strong></td>
					<td class="trow1"><a href="{$memprofile['website']}" target="_blank">{$memprofile['website']}</a></td>
				</tr>

Hope this helps.
(2014-08-11, 10:02 AM)Johnny S Wrote: [ -> ]Regarding blank homepage cell i have made following edits to 2 templates:

in member_profile find

<tr>
					<td class="trow1"><strong>{$lang->homepage}</strong></td>
					<td class="trow1">{$website}</td>
				</tr>
				

and replace it with

{$website}

and in member_profile_website replace everything with

	<tr>
					<td class="trow1"><strong>{$lang->homepage}</strong></td>
					<td class="trow1"><a href="{$memprofile['website']}" target="_blank">{$memprofile['website']}</a></td>
				</tr>

Hope this helps.

Thank you for your reply Johnny S. I can confirm this has fixed an issue with "Homepage" field being displayed while empty.
Continue reading.
Yeah, I continued on my way, here is a fix for misplaced table seen on a screenshot I linked to in the first post, was caused by empty line, I have fixed it by moving <br /> element at the end instead of at the beginning of each table (that displays on the right).
In ACP > Templates & Styles > Templates > Default Templates > Member Templates > member_profile_signature.
Link: "home/admin/index.php?module=style-templates&action=edit_template&title=member_profile_signature&sid=1&expand=24".
Replace everything with the following:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder tfixed">
<tr>
<td class="thead"><strong>{$lang->users_signature}</strong></td>
</tr>
<tr>
<td class="trow1 scaleimages">{$memprofile['signature']}</td>
</tr>
</table>
<br />
Now, return to listing and open "member_profile_modoptions" found in Member Templates.
Link: "home/admin/index.php?module=style-templates&action=edit_template&title=member_profile_modoptions&sid=1&expand=24".
Replace everything with the following:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" class="tborder">
<tr>
<td colspan="2" class="thead"><strong>{$lang->mod_options}</strong></td>
</tr>
{$manageuser}
<tr>
<td class="trow2">
{$memprofile['usernotes']}<br />
{$editnotes}
</td>
</tr>
</table>
<br />
Save and return to listing again, open "member_profile_adminoptions".
Link: "home/admin/index.php?module=style-templates&action=edit_template&title=member_profile_adminoptions&sid=1&expand=24". This is last template displayed so it is unnecessarily to append a new line at the end, just remove "<br />" on the first line, and should end up with this:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" class="tborder">
<tr>
<td colspan="2" class="thead"><strong>{$lang->admin_options}</strong></td>
</tr>
<tr>
<td class="trow1">
<ul>
<li><a href="{$mybb->settings['bburl']}/{$admin_dir}/index.php?module=user-users&amp;action=edit&amp;uid={$uid}">{$lang->admin_edit_in_acp}</a></li>
<li><a href="{$mybb->settings['bburl']}/{$admin_dir}/index.php?module=user-banning&amp;uid={$uid}">{$lang->admin_ban_in_acp}</a></li>
</ul>
</td>
</tr>
</table>
Here is a screenshot proof that both issues has been fixed: http://i.imgur.com/fDVVASl.png
Please do consider fixing this before publishing MyBB 1.8 stable release.
Instead of appending new lines at the begin, I moved them at the end and it worked fine, not hard to fix at all Smile
This fix works fine for me, at least during my testing.

@Johnny S - you can create a PR and wait for MyBB team until then push this issue to GitHub