By Saleh Salem Bahwini on Wednesday, 09 September 2015
Posted in General Issues
Replies 3
Likes 0
Views 345
Votes 0
Hi,

I've created several different Themes under components/com_easysocial/themes and different user profiles as well.

Now i have assigned each profile with a different layout but i can't seem to understand how we can route for example the User 1 with the Layout 1 see the User 2 with the Layout 2 but when the User 1 goes back to his/her own profile he see the Layout 1 instead of the Layout 2 that he saw on the User 2 profile.

I know that the the user will see any other users of different Profiles with his/her own assigned Theme and not what the other user has his/her profile assigned theme.

I am unable to understand the implementation or a workaround for it.

Please advice.

Thanks
Hey Saleh,

When you assign a custom theme for the profile type, the user that is logged into the site will see the theme that it was assigned to. It is actually not the other way around where you see a different theme for a different user because that would make your site look pretty inconsistent

For instance, if you view user's from "profile A", and decide to click on another user from "profile B", you will end up seeing a different theme altogether. It would be pretty inconsistent
·
Thursday, 10 September 2015 03:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey,

Thanks for the reply.

I understand you very well but the modification will be only on the profile page, So the theme stays the same in all of the Profile Types but the "My Profile area" has some changes for each of the type.

For example, "Profile A" has a menu under the "Cover" image (Which is not there as default), I coded the files to have that menu and changed some other positioning of items, Now the "Profile B" dosen't have that menu but has the same positions of the items.

Now after thinking for a while, I came to a conclusion that to detect user profile types i should modify one of the theme and assign each user profile in a logic to show different modifications for each profile type and that way i accomplish the thing that i am trying to achieve by having multiple theme folders.

Now if you could provide me the files that are suitable for implementing my logic.

Thanks
·
Thursday, 10 September 2015 17:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Saleh,

Hm. As far as I know it would be quite difficult for you to achieve this as it will involves some heavy modification in order to achieve this. By the way below is the file path on where you could try to alter the theme behavior of easysocial based on profile type of a user.
1) /components/com_easysocial/views/profile/view.html.php where easysocial will render the profile page
2) /administrator/components/com_easysocial/includes/themes/themes.php at method @resolve where easysocial will render the themes based on current user's profile type.

Hope these help.
·
Thursday, 10 September 2015 18:55
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post