Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Remove Default name text on Profile

10 years 5 months ago
  • David's Avatar
    Topic Author
  • David
  • Offline
  • Junior Boarder
  • Posts: 154
  • Thank you received: 0
Licenses:
JomSocial Active Publisher Active AdAgency Expired Socialize Expired

Greetings Pro's,
Several weeks ago you helped me remove the Group Name text from the Group Cover Image. I have the code, it works perfectly and I love it. Now, I would like to be able to do the same thing for member profile cover images. I would like to be able to hide or remove the members name from their profile cover image when needed, as shown in the green box in the attached image.



Would you mind helping me do this one as well?

Thanks,

David

Attachments:
10 years 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi David,

Open this file components/com_community/templates/jomsocial/layouts/profile/focus.php, find this

<h2><?php echo $user->getDisplayName(); ?></h2>
change to (the ID do you want to hide):
<?php if($user->id!='ID1' || $user->id!='ID2' || $user->id!='ID3') :
<h2><?php echo $user->getDisplayName(); ?></h2>
<?php endif ?>

thank you!

10 years 5 months ago
  • David's Avatar
    Topic Author
  • David
  • Offline
  • Junior Boarder
  • Posts: 154
  • Thank you received: 0
Licenses:
JomSocial Active Publisher Active AdAgency Expired Socialize Expired

Dimas,
I appreciate you sharing this code with me and I am sure it's going to work just fine. If you don't mind, would you go into the file you sent me, components/com_community/templates/jomsocial/layouts/profile/focus.php and ad two of these for me. I am concerned that I will not cut and past the correct account information into that file in the correct location or get it right. I will also need to do this from time to time on different accounts and like the group modification you shared with me, I will need to add this code specifically correct to get it to work on each new member account I want to do this for. So just to make sure I am getting it perfectly correct, I would like to ask you to please set up the first two for me and then I can just add the additional ones to that same file copying what you have done. The two accounts are listed below:

Zach Boychuk
madd-talent.com/en/home-eng/1125-zach-boychuk/profile

The Sports Guy Mike
madd-talent.com/en/home-eng/sportsguymike/profile

10 years 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

You can get the iduser from backend, just search the username on user manager



the complete code
<?php if($user->id!=1058 || $user->id!=1125) :
<h2><?php echo $user->getDisplayName(); ?></h2>
<?php endif ?>

Attachments:
10 years 5 months ago
  • David's Avatar
    Topic Author
  • David
  • Offline
  • Junior Boarder
  • Posts: 154
  • Thank you received: 0
Licenses:
JomSocial Active Publisher Active AdAgency Expired Socialize Expired

Dimas,
I am pretty sure I have added this code exactly as you have given it to me, but the names will not hide on the front end. Is there something else that I need to do?

Thanks,

David Martin

10 years 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi David,

I am sorry, the code should be like this :

<?php $arrId = array(1058,1125);?>
            <?php if(!in_array($user->id,$arrId)) :?>
                <h2><?php echo $user->getDisplayName(); ?></h2>
<?php endif?>

I changed the code on override focus.php file

thank you

10 years 5 months ago
  • David's Avatar
    Topic Author
  • David
  • Offline
  • Junior Boarder
  • Posts: 154
  • Thank you received: 0
Licenses:
JomSocial Active Publisher Active AdAgency Expired Socialize Expired

Dimas,
I love you man. In a nice way mind you. LOL! It looks great and it's exactly what I wanted. Now, I will mark this as fixed so it's off you Pro's list, but if I am correct, and I want to include others on like this, I just add the one small line of code to the end of this code, (1058,1125)

10 years 5 months ago
  • David's Avatar
    Topic Author
  • David
  • Offline
  • Junior Boarder
  • Posts: 154
  • Thank you received: 0
Licenses:
JomSocial Active Publisher Active AdAgency Expired Socialize Expired

Dimas,
This works great, but I can't find the file where this code is so I can add accounts. Please give me the directory?

Thanks,

David

10 years 5 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

This is the file /templates/socialize/html/com_community/layouts/profile/focus.php

10 years 5 months ago
  • David's Avatar
    Topic Author
  • David
  • Offline
  • Junior Boarder
  • Posts: 154
  • Thank you received: 0
Licenses:
JomSocial Active Publisher Active AdAgency Expired Socialize Expired

Dimas,
Works perfectly. Thank you so much.

David

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW