MyBB Community Forums

Full Version: Help: adding plugin profile pic to mobile theme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Not sure if this is right forums for this but as its not a bug with the plugin itself im not sure lol.

Anyway, I use the plugin so its used to create a banner at the top of peoples profiles with their uploaded image - it is 950px x 200px.

Id also like this to appear on their profiles on the GoMobile theme but when if i just add in the "{$profilepic}" then the image is there bit its ofcourse too wide for mobile screens, is there any ideas how i can get the image to resize to fit the screen, im unsure where to start, ive tried simply wrapping it in a div set to 100% but that doesnt work.

thanks for any help
can u please post the full template code.
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->profile}</title>
{$headerinclude}
</head>
<body>
{$header}

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">

<tr><td class="thead" colspan="2"><strong>{$lang->profile}</strong></td></tr>

<tr><td class="trow1 smalltext" align="center" colspan="2">{$avatar}<div>{$groupimage}</div></td></tr>
<tr><td class="trow1 smalltext" width="25%" align="right"><strong>Usertitle:</strong></td><td class="trow1">{$usertitle}</td></tr>
<tr><td class="trow1 smalltext" width="25%" align="right"><strong>{$lang->postbit_status}</strong></td><td class="trow1">{$online_status}</td></tr>
<tr><td class="trow1 smalltext" align="center" colspan="2">
<a href="private.php?action=send&uid={$memprofile['uid']}" class="button"><img src="http://meetfurs.com/images/postbit_pm.gif"/></a></td></tr>
{$awaybit}
</table>
<br />
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td width="50%" valign="top">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td colspan="2" class="thead"><strong>{$lang->users_forum_info}</strong></td>
</tr>
<tr>
<td class="trow1 smalltext" width="25%" align="right"><strong>{$lang->joined}</strong></td>
<td class="trow1">{$memregdate}</td>
</tr>
<tr>
<td class="trow2 smalltext" width="25%" align="right"><strong>{$lang->lastvisit}</strong></td>
<td class="trow2">{$memlastvisitdate} {$memlastvisittime}</td>
</tr>
<tr>
<td class="trow2 smalltext" width="25%" align="right"><strong>{$lang->total_posts}</strong></td>
<td class="trow2">{$memprofile['postnum']}</td></tr>
<tr>
<td class="trow3" colspan="2" align="center"><span class="smalltext"><a href="search.php?action=finduserthreads&amp;uid={$uid}">{$lang->find_threads}</a> &middot; <a href="search.php?action=finduser&amp;uid={$uid}">{$lang->find_posts}</a></td>
</tr>
{$reputation}
{$warning_level}
</table>
<!-- ProfileComments -->{$comments_index}<!-- /ProfileComments --><br>
{$footer}
</body>
</html>

Thats the mobile members profile page,
id like to place the {$profilepic} in just under the header but dont know how to get it to resize the image to fit to page.

<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="trow1" align="center">{$profilepic_img}</td>
</tr>
</table>
thats the member_profile_profilepic template

as a work around just now ive added in:

<tr><td class="trow1 smalltext" align="center" colspan="2">

<img src="./uploads/profilepics/profilepic_{$memprofile['uid']}.jpg" onError="this.style.display = 'none';" width="100%">
<img src="./uploads/profilepics/profilepic_{$memprofile['uid']}.png" onError="this.style.display = 'none';" width="100%">
<img src="./uploads/profilepics/profilepic_{$memprofile['uid']}.gif" onError="this.style.display = 'none';" width="100%">

</td></tr>

which works, for now.

if anyone has a better way itd be appriciated