Advertisement:

Author Topic: Let's play with the profile.template.php, just some basic rearranging  (Read 2354 times)

Offline shadav

  • Full Member
  • ***
  • Posts: 546
  • Gender: Female
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
so I'm trying to work on the profile....
but for now, let's start small and simple
this is for the default (curve) theme
you'll need to adjust for other themes or if any mods installed

Profile.template.php

seems silly to have the email in 2 places....let's ditch the list and keep the icon

find and remove
Code: [Select]
// Only show the email address fully if it's not hidden - and we reveal the email.
if ($context['member']['show_email'] == 'yes')
echo '
<dt>', $txt['email'], ': </dt>
<dd><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></dd>';

// ... Or if the one looking at the profile is an admin they can see it anyway.
elseif ($context['member']['show_email'] == 'yes_permission_override')
echo '
<dt>', $txt['email'], ': </dt>
<dd><em><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></em></dd>';


now let's play with the Show Posts and Show Stats Links....
let's make them a little more useful....like linking the list for Posts: # (% per day) and since we're already on the profile let's link the user's name to their stats page

find
Code: [Select]
<br />';
echo '
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a><br />
<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
</p>';
replace
Code: [Select]
</p>';
find
Code: [Select]
if (!isset($context['disabled_fields']['posts']))
echo '
<dt>', $txt['profile_posts'], ': </dt>
<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';

replace
Code: [Select]
if (!isset($context['disabled_fields']['posts']))
echo '
<dt>', $txt['profile_posts'], ': </dt>
<dd><a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $context['member']['posts'], '</a> (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';

find
Code: [Select]
<div class="username"><h4>', $context['member']['name'], ' <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4></div>
replace
Code: [Select]
<div class="username"><h4><a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $context['member']['name'], '</a> <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4></div>

let's move the online image and ditch the words online

find
Code: [Select]
</ul>
<span id="userstatus">', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['label'] . '" rel="nofollow">' : '', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" align="middle" />' : $context['member']['online']['text'], $context['can_send_pm'] ? '</a>' : '', $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['text'] . '</span>' : '';
replace
Code: [Select]
</ul>
<span id="userstatus">';

find
Code: [Select]
<div class="username"><h4><a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $context['member']['name'], '</a> <span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4></div>
replace
Code: [Select]
<div class="username"><h4><a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $context['member']['name'], '</a> ', $context['can_send_pm'] ? '<a href="' . $context['member']['online']['href'] . '" title="' . $context['member']['online']['label'] . '">' : '', '<img src="', $context['member']['online']['image_href'], '" alt="', $context['member']['online']['text'], '" />', $context['can_send_pm'] ? '</a>' : '';
echo '
<span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4></div>


now let's change the gender text into an image

find
Code: [Select]
if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name']))
echo '
<dt>', $txt['gender'], ': </dt>
<dd>', $context['member']['gender']['name'], '</dd>';

replace
Code: [Select]
if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name']))
echo '
<dt>', $txt['gender'], ': </dt>
<dd>', context['member']['gender']['image'], '</dd>';
OR leave the text and add the image
Code: [Select]
if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name']))
echo '
<dt>', $txt['gender'], ': </dt>
<dd>', $context['member']['gender']['name'], ' ', $context['member']['gender']['image'], '</dd>';

now it's have some fun
how about a little a/s/l?

find
Code: [Select]
if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name']))
echo '
<dt>', $txt['gender'], ': </dt>
<dd>', $context['member']['gender']['name'], '</dd>';

echo '
<dt>', $txt['age'], ':</dt>
<dd>', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/cake.png" alt="" />' : ''), '</dd>';

if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
<dt>', $txt['location'], ':</dt>
<dd>', $context['member']['location'], '</dd>';

replace
Code: [Select]
echo '
<dt>', $txt['age'], '';
if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name']))
echo '
/ ', $txt['gender'], '';
if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
/ ', $txt['location'], '';
echo '
:</dt>
<dd>', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/cake.png" alt="" />' : ''), '';
if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name']))
echo '
/ ', $context['member']['gender']['name'], '';
if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
/ ', $context['member']['location'], '';
echo '
</dd>';

OR ;)
Code: [Select]
echo '
<dt>a/s/l :</dt>
<dd>', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/cake.png" alt="" />' : ''), ' / ', $context['member']['gender']['image'], ' / ', $context['member']['location'], '</dd>';
why don't we toss that over into the mini profile on the left?
remove what you just added above

find
Code: [Select]
', $context['member']['avatar']['image'], '
<ul class="reset">';

replace
Code: [Select]
', $context['member']['avatar']['image'], '
<br />a/s/l : ', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/cake.png" alt="" />' : ''), ' / ', $context['member']['gender']['image'], ' / ', $context['member']['location'], '
<ul class="reset">';


now let's change the Send PM from text to an image (like on the post profile) and we're going to move that up with the send email

find
Code: [Select]
';

echo '
</span>';

echo '
<p id="infolinks">';

if (!$context['user']['is_owner'] && $context['can_send_pm'])
echo '
<a href="', $scripturl, '?action=pm;sa=send;u=', $context['id_member'], '">', $txt['profile_sendpm_short'], '</a></p>';

echo '

replace
Code: [Select]
';
echo '
</span>
</div>

find
Code: [Select]
// What about if we allow email only via the forum??add before
Code: [Select]
if ($context['can_send_pm'])
echo '
<li><a href="', $scripturl, '?action=pm;sa=send;u=', $context['member']['id'], '" title="', $context['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline'], '">', $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($context['member']['online']['is_online'] ? 'on' : 'off') . '.gif" alt="' . ($context['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']) . '" />' : ($context['member']['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']), '</a></li>';


let's change the membergroup from text to image (and also move it out from the h4)

find
Code: [Select]
<span class="position">', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</span></h4>
replace
Code: [Select]
</h4></div>';
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $context['member']['group'] == '') && $context['member']['post_group'] != '')
echo '
', $context['member']['post_group'], ' ';
echo '
', $context['member']['group_stars'], ' ';
echo '

and while we are at it, let's move the custom title over there too

find and remove
Code: [Select]
if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title']))
echo '
<dt>', $txt['custom_title'], ': </dt>
<dd>', $context['member']['title'], '</dd>';

find
Code: [Select]
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $context['member']['group'] == '') && $context['member']['post_group'] != '')
echo '
', $context['member']['post_group'], ' ';
echo '
', $context['member']['group_stars'], ' ';

after add
Code: [Select]
if (!empty($modSettings['titlesEnable']) && !empty($context['member']['title']))
echo '
<br />', $context['member']['title'], ' ';


now for my ocd, let's move the last active below the date registered

find
Code: [Select]
echo '
<dt>', $txt['lastLoggedIn'], ': </dt>
<dd>', $context['member']['last_login'], '</dd>
</dl>';

replace
Code: [Select]
echo '
</dl>';

find
Code: [Select]
echo '
<dt>', $txt['date_registered'], ': </dt>
<dd>', $context['member']['registered'], '</dd>';

add after
Code: [Select]
echo '
<dt>', $txt['lastLoggedIn'], ': </dt>
<dd>', $context['member']['last_login'], '</dd>';

and again for my ocd let's move the registered date and last active date up under the username
find and remove
Code: [Select]
echo '
<dt>', $txt['date_registered'], ': </dt>
<dd>', $context['member']['registered'], '</dd>';

echo '
<dt>', $txt['lastLoggedIn'], ': </dt>
<dd>', $context['member']['last_login'], '</dd>';

find
Code: [Select]
if ($context['user']['is_owner'] || $context['user']['is_admin'])
echo '
<dt>', $txt['username'], ': </dt>
<dd>', $context['member']['username'], '</dd>';

after add
Code: [Select]
echo '
<dt>', $txt['date_registered'], ': </dt>
<dd>', $context['member']['registered'], '</dd>';

echo '
<dt>', $txt['lastLoggedIn'], ': </dt>
<dd>', $context['member']['last_login'], '</dd>';


ok now let's play with the avatar
how about making it larger and round?

index.css
find
Code: [Select]
#basicinfo img.avatar
{
display: block;
margin: 10px 0 0 0;
}

replace
Code: [Select]
#basicinfo img.avatar
{
display: block;
margin: 10px 0px 10px 0px;
width: 80%;
border-radius: 80px;
}

maybe move it above the username?
back in Profile.template.php
find and remove
Code: [Select]
', $context['member']['avatar']['image'], '
find
Code: [Select]
<div class="username"><h4>
add before
Code: [Select]
', $context['member']['avatar']['image'], '

ok now, the username....does it really need to be on the list? Only admins and the owner can see it....so let's move it

find and remove
Code: [Select]
if ($context['user']['is_owner'] || $context['user']['is_admin'])
echo '
<dt>', $txt['username'], ': </dt>
<dd>', $context['member']['username'], '</dd>';

find
Code: [Select]
echo '
</h4></div>';

replace
Code: [Select]
echo '
</h4>';
if ($context['user']['is_owner'] || $context['user']['is_admin'])
echo '
( ', $context['member']['username'], ' )';
echo '
</div>';


let's move the signature

find and remove
Code: [Select]
// Show the users signature.
if ($context['signature_enabled'] && !empty($context['member']['signature']))
echo '
<div class="signature">
<h5>', $txt['signature'], ':</h5>
', $context['member']['signature'], '
</div>';

find
Code: [Select]
<div class="clear"></div>
</div>';

replace
Code: [Select]
<div class="clear"></div>';

// Show the users signature.
if ($context['signature_enabled'] && !empty($context['member']['signature']))
echo '
<div class="cat_bar">
<h5 class="catbg">
<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/post/xx.gif" alt="" class="icon" />', $txt['signature'], '</span>
</h5>
</div>
<div class="windowbg2">
<span class="topslice"><span></span></span>
<div class="content">
', $context['member']['signature'], '
</div>
<span class="botslice"><span></span></span>

</div>';
echo '

</div>';

Offline drewactual

  • Sr. Member
  • ****
  • Posts: 864
    • College Football Fan Site CFB51
nice work! 

i've done something like this too... right now, though, i'm working on making it appear more like a prominent social media profile somewhat- and function where 'friends' post messages on a wall notifies the users... trying to invade the space of a faltering social media page... leveraging familiarity... the 'function' isn't there yet, but i'm getting the UI set up... some of your suggestions will go into some use for sure!

(credit to smfpacks for this)



Offline Mick.

  • Customizer
  • SMF Hero
  • *
  • Posts: 5,257
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Nice work indeed!  :D
I too been messing with removing double links. Most of my themes I do that. Anyways, here's a basic profile that I was messing with a while ago but have not finished it lol https://www.idesignsmf.com/index.php/page,simple_profile.html

Offline shadav

  • Full Member
  • ***
  • Posts: 546
  • Gender: Female
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
nice work! 

i've done something like this too... right now, though, i'm working on making it appear more like a prominent social media profile somewhat- and function where 'friends' post messages on a wall notifies the users... trying to invade the space of a faltering social media page... leveraging familiarity... the 'function' isn't there yet, but i'm getting the UI set up... some of your suggestions will go into some use for sure!

(credit to smfpacks for this)

nice, this is sort of what my aim is at, eventually....

Nice work indeed!  :D
I too been messing with removing double links. Most of my themes I do that. Anyways, here's a basic profile that I was messing with a while ago but have not finished it lol https://www.idesignsmf.com/index.php/page,simple_profile.html
I like this...

eventually I'm thinking to try and make the profile sort of like a social networking profile or more around the lines of like a resume of sorts

I donno, lol just that it bugs me and needs a desperate face lift and major plastic surgery

less information overload and more eye candish

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,505
  • Gender: Male
    • SMFReview on Facebook
    • pouvik on GitHub
    • @@smfreview on Twitter
    • SMFReview
Some of these are really nice not fan of the bigger avatars  or the asl but rest I like

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,307
  • Master of BBC Abuse
Lol. I need some more coffee to sort though all of that. :D Some good tweaks in there. Some others I'm not so keen on, but the good thing about this sort of coding is that it's easy to tweak for your own preferences.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,346
  • Gender: Male
    • Kindred-999 on GitHub
Overall, I'm not a huge fan of "compression" like that.

I use the Ultimate Profile mod on several of the sites I manage... 
I like that layout (I reconfigured the original to use all <div> instead of tables - makes adding new "boxes" simple)
but even if I didn't use the mod, doing it into a tiles layout seems more friendly to actually finding information...  putting links "hidden" under text (like the link to show posts) is a big no-no, in my book. I removed it entirely and made it a menu item (with mobile friendly, css-handled, collapsible menus)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Mick.

  • Customizer
  • SMF Hero
  • *
  • Posts: 5,257
  • Gender: Male
    • idesignSMF on Facebook
    • @idesign360 on Twitter
    • idesignSMF.com
Overall, I'm not a huge fan of "compression" like that.

I use the Ultimate Profile mod on several of the sites I manage... 
I like that layout (I reconfigured the original to use all <div> instead of tables - makes adding new "boxes" simple)
but even if I didn't use the mod, doing it into a tiles layout seems more friendly to actually finding information...  putting links "hidden" under text (like the link to show posts) is a big no-no, in my book. I removed it entirely and made it a menu item (with mobile friendly, css-handled, collapsible menus)
Nice!

Offline shadav

  • Full Member
  • ***
  • Posts: 546
  • Gender: Female
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
yeah I could never get the ultimate profile mod or the user cpu mod to work

Antechinus was helping with a css version of sorts on a look like cpu mod, which looked pretty nice

hehehehe the a/s/l is just me playing around  :laugh:

hm....well not trying to hide links, just thought it'd be more useful if the actual number of posts linked to the user's posts

and the stats figured why not.... they are both already available under the profile info menu

and figuring that not everyone will like everything (customization is key here), so I broke it up into parts for people to pick and choose what if any they like and can use :D

granted, I'm not done playing with the profile just yet....but that was enough for one day  :laugh:
thinking to take all of the admin only visible info on the profile and put it into it's own section like with the signature

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,505
  • Gender: Male
    • SMFReview on Facebook
    • pouvik on GitHub
    • @@smfreview on Twitter
    • SMFReview
I look forward to seeing what else you do with the default files, maybe also look at how you could do some changes like this for 2.1 while its not finished any tips and tricks can make a difference and be great to get this board more active again.

Offline gecitli

  • Jr. Member
  • **
  • Posts: 331
    • webmaster forumu
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #10 on: July 02, 2020, 05:53:39 AM »
SMF 2.1 RC2

http://www.webtiryaki.com

webmaster forumu

Free & Premium Responsive Themes for SMF.

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,505
  • Gender: Male
    • SMFReview on Facebook
    • pouvik on GitHub
    • @@smfreview on Twitter
    • SMFReview
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #11 on: July 02, 2020, 06:03:18 AM »
teşekkür, however my turkish is rusty im not sure what you are trying to show with the screenshot sorry.

Offline gecitli

  • Jr. Member
  • **
  • Posts: 331
    • webmaster forumu
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #12 on: July 02, 2020, 08:14:12 AM »
teşekkür, however my turkish is rusty im not sure what you are trying to show with the screenshot sorry.

ok see live
Username: demo

Password: 1234

https://webtiryaki.com/index.php
http://www.webtiryaki.com

webmaster forumu

Free & Premium Responsive Themes for SMF.

Offline shadav

  • Full Member
  • ***
  • Posts: 546
  • Gender: Female
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #13 on: July 02, 2020, 03:08:57 PM »
that's pretty nice


yeah, I haven't even touched 2.1 at all

might install a demo to play with

after playing around with all of this, decided to attempt at a theme...lol we'll see....basically just playing with the default theme and variants....

Offline Deaks

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 22,505
  • Gender: Male
    • SMFReview on Facebook
    • pouvik on GitHub
    • @@smfreview on Twitter
    • SMFReview
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #14 on: July 05, 2020, 04:50:51 PM »
i have implemented these on SMF Review update and some new ones based on these so big thank you

Offline shadav

  • Full Member
  • ***
  • Posts: 546
  • Gender: Female
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #15 on: July 05, 2020, 05:20:49 PM »
playing a bit more

let's break up the summary title bar


find and remove
Code: [Select]
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" class="icon" />', $txt['summary'], '</span>
</h3>
</div>
find
Code: [Select]
<div id="basicinfo">add after
Code: [Select]
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" class="icon" />', $txt['summary'], '</span>
</h3>
</div>
find
Code: [Select]
<div id="detailedinfo">add after
Code: [Select]
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['summary'], '" class="icon" />', $txt['summary'], '</span>
</h3>
</div>

OR let's move the username into the title bar
[find]<div id="basicinfo">[/code]
add after
Code: [Select]
<div class="cat_bar">
<h3 class="catbg">
<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" class="icon" />', $context['member']['name'], '</span>
</h3>
</div>
find and remove
Code: [Select]
', $context['member']['name'], '

Offline shadav

  • Full Member
  • ***
  • Posts: 546
  • Gender: Female
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #16 on: July 05, 2020, 05:36:18 PM »
let's make some things only visible to buddies

for age
find
Code: [Select]
echo '
<dt>', $txt['age'], ':</dt>
<dd>', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/cake.png" alt="" />' : ''), '</dd>';
replace
Code: [Select]
if ($context['member']['is_buddy'] || $context['user']['is_owner'] || $context['user']['is_admin'])
{
echo '
<dt>', $txt['age'], ':</dt>
<dd>', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/cake.png" alt="" />' : ''), '</dd>';
}

for location
find
Code: [Select]
if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
<dt>', $txt['location'], ':</dt>
<dd>', $context['member']['location'], '</dd>';
replace
Code: [Select]
if ($context['member']['is_buddy'] || $context['user']['is_owner'] || $context['user']['is_admin'])
{
if (!isset($context['disabled_fields']['location']) && !empty($context['member']['location']))
echo '
<dt>', $txt['location'], ':</dt>
<dd>', $context['member']['location'], '</dd>';
}

for gender
find
Code: [Select]
if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name']))
echo '
<dt>', $txt['gender'], ': </dt>
<dd>', $context['member']['gender']['name'], '</dd>';
replace
Code: [Select]
if ($context['member']['is_buddy'] || $context['user']['is_owner'] || $context['user']['is_admin'])
{
if (!isset($context['disabled_fields']['gender']) && !empty($context['member']['gender']['name']))
echo '
<dt>', $txt['gender'], ': </dt>
<dd>', $context['member']['gender']['name'], '</dd>';
}

for email
find
Code: [Select]
if ($context['member']['show_email'] === 'yes' || $context['member']['show_email'] === 'no_through_forum' || $context['member']['show_email'] === 'yes_permission_override')
echo '
<li><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '" title="', $context['member']['show_email'] == 'yes' || $context['member']['show_email'] == 'yes_permission_override' ? $context['member']['email'] : '', '" rel="nofollow"><img src="', $settings['images_url'], '/email_sm.gif" alt="', $txt['email'], '" /></a></li>';
replace
Code: [Select]
if ($context['member']['is_buddy'] || $context['user']['is_owner'] || $context['user']['is_admin'])
{
if ($context['member']['show_email'] === 'yes' || $context['member']['show_email'] === 'no_through_forum' || $context['member']['show_email'] === 'yes_permission_override')
echo '
<li><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '" title="', $context['member']['show_email'] == 'yes' || $context['member']['show_email'] == 'yes_permission_override' ? $context['member']['email'] : '', '" rel="nofollow"><img src="', $settings['images_url'], '/email_sm.gif" alt="', $txt['email'], '" /></a></li>';
}
find
Code: [Select]
if ($context['member']['show_email'] == 'yes')
echo '
<dt>', $txt['email'], ': </dt>
<dd><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></dd>';

// ... Or if the one looking at the profile is an admin they can see it anyway.
elseif ($context['member']['show_email'] == 'yes_permission_override')
echo '
<dt>', $txt['email'], ': </dt>
<dd><em><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></em></dd>';
replace
Code: [Select]
if ($context['member']['is_buddy'] || $context['user']['is_owner'] || $context['user']['is_admin'])
{
if ($context['member']['show_email'] == 'yes')
echo '
<dt>', $txt['email'], ': </dt>
<dd><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></dd>';

// ... Or if the one looking at the profile is an admin they can see it anyway.
elseif ($context['member']['show_email'] == 'yes_permission_override')
echo '
<dt>', $txt['email'], ': </dt>
<dd><em><a href="', $scripturl, '?action=emailuser;sa=email;uid=', $context['member']['id'], '">', $context['member']['email'], '</a></em></dd>';
}

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,307
  • Master of BBC Abuse
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #17 on: July 05, 2020, 06:28:17 PM »
It's addictive, isn't it? :D

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,806
    • StoryBB/StoryBB on GitHub
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #18 on: July 05, 2020, 06:49:01 PM »
Wait until you tell people that writing a regular mod is exactly the same as tweaking the templates and you realise that it's all literally the same thing :P
Please don’t PM me for paid work, I’m not for hire, and even if I was, I doubt you could afford me.
USD$150 per hour. Typical waiting list 3 months.

Offline shadav

  • Full Member
  • ***
  • Posts: 546
  • Gender: Female
    • Ask The Muslims: A Place To Ask Honest Questions and Receive Respectful Answers
Re: Let's play with the profile.template.php, just some basic rearranging
« Reply #19 on: July 05, 2020, 08:33:26 PM »
It's addictive, isn't it? :D

 :laugh: :laugh: :laugh:

Wait until you tell people that writing a regular mod is exactly the same as tweaking the templates and you realise that it's all literally the same thing :P
hm.... i've looked at some mods and from my understanding just need to make the xml file....and remember that it's backwards, search before and add is actually adding it after