By Paul on Saturday, 21 October 2017
Posted in General Issues
Likes 0
Views 546
Votes 0
I want to create a special profile type for members that are exceptional for some reason and give it some special recognition on their profile beyond just the text that says "Registered User". For example if they were a volunteer that helps out with something putting some big label on their profile that says "VOLUNTEER" with a big thumbs up graphic or something along those lines you see?

Is there a way to achieve this?
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here.

I think what you can do is create 2 profile type from your site.

- Registered member
- Registered volunteer

So that whoever register into your site, they user account will belong to this 'Registered volunteer' profile type.

Then you can easier to customise from the theme file what thing you would like to show on their user profile page.
·
Saturday, 21 October 2017 11:15
·
0 Likes
·
0 Votes
·
0 Comments
·
In the back end, I don't see any way to associate a theme with a Profile Type? In the Documentation, I don't see any documentation on how to hack the theme files by profile type. Please provide some guidance.
·
Saturday, 21 October 2017 11:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Paul,

You can't actually change a theme for a profile type but you could in the theme file code it so that it renders a unique text for users on a particular profile type. For instance, you could edit the file /components/com_easysocial/themes/wireframe/profile/default/default.php and change the codes at line 171,

[gist]
<?php if ($this->config->get('users.layout.profiletitle')) { ?>
<span>
<a href="<?php echo $user->getProfile()->getPermalink();?>" class="t-text--muted">
<i class="fa fa-shield"></i> <?php echo $user->getProfile()->get('title');?>
</a>
</span>
<?php } ?>
[/gist]

To something like this,

[gist]
<?php if ($this->config->get('users.layout.profiletitle')) { ?>
<span>
<a href="<?php echo $user->getProfile()->getPermalink();?>" class="t-text--muted">
<i class="fa fa-shield"></i>
<?php if ($user->getProfile()->id == 2) { ?>
Super Cool User
<?php } else { ?>
<?php echo $user->getProfile()->get('title');?>
<?php } ?>
</a>
</span>
<?php } ?>
[/gist]

You need to replace 2 with the correct profile id.
·
Saturday, 21 October 2017 14:08
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm using the RC2 and there code looks different in the default.php that you mentioned. It also only has 116 lines.

but aside from that, I'm using the Elegant theme. Could I use the component override and if I did would I structure it like this and then edit that default.php that I copied from the path that you indicated?

templates/elegant/html/com_easysocial/themes/wireframe/profile/default/default.php
·
Tuesday, 24 October 2017 07:14
·
0 Likes
·
0 Votes
·
0 Comments
·
If you are on 2.1, you need to look into the file /components/com_easysocial/themes/wireframe/helpers/cover/user.php
·
Tuesday, 24 October 2017 12:41
·
0 Likes
·
0 Votes
·
0 Comments
·
OK I updated to ES 2.1.1 and modified the user.php and changed the template override structure to:
templates/elegant/html/com_easysocial/themes/wireframe/helpers/cover/user.php

this had no effect. is the override structure proper or the code hack at issue?
·
Tuesday, 24 October 2017 23:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Paul,

It should be:

templates/elegant/html/com_easysocial/helpers/cover/user.php

By the way, that code that I provided is just a sample, you need to alter it accordingly by changing the profile id.
·
Tuesday, 24 October 2017 23:21
·
0 Likes
·
0 Votes
·
0 Comments
·
That did it. You da man! I'm going to try to hack it further with an image or maybe even a watermark...
·
Tuesday, 24 October 2017 23:27
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome
·
Tuesday, 24 October 2017 23:36
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post