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.

Hide Group Name Code

7 years 11 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

Thank you again Michal,
I tried to add the extra code you gave me, "AND ($group->id != 21)) { ?>" and I added just this one line, but after adding it, the group name still appeared along with the code in black.

What am I doing wrong?

If you could just add on of the "AND lines" to that code, than I am sure I can copy that and simply change the group id to add all the ones I need. I think I am somehow getting the code line wrong. If you add one to this line, you can add the one for the Arizona Diamond Backs as I tried.


Thanks,

David

7 years 11 months ago
Licenses:

Hi,

sorry. I will take care this topic. could you please elaborate more about "Hide Group Name"
and please provide me FTP access detail at this topic, by editing your first post.

I will put the custom code for you and let you know after that.

Regards

7 years 11 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

Albertus,
I will try of course to explain with more details. I was supplied with some custom code from Michal at JomSocial, that would eliminate a groups name from appearing on the group cover image. By default, as you know, when you create a group in JomjSocial, the name you provide that group appears on the Cover image of that group. as shown below.



What I would like to do is hide the group name so that it does not appear on the Group Cover image like the attached screen shot of the one group that Michal created custom code for.



Michal created a custom .php file that contains the necessary code to display the group as it appears in the second attached image. However, in order to hide this group cover name text, I need to add the code to this file he created. Now, if I have more groups that I would like to hide this group cover image name text on, I am supposed to add the following like of code after the custom line he input for me in this custom .php file. This below line of code, if I have it correct, simply needs to be placed following the custom code he entered after line 72 of this file.
"AND ($group->id != 21)) { ?>"

To better understand, you can read the first and original help thread I created and Michal's answer and fix for this, which is here;
www.jomsocial.com/forum/groups/33008-hid...-name-on-cover-image

The below threads are all pertaining to the same thing if it helps you to see the history of this. The only reason there are so many threads on the same issue is that someone keeps marking my thread as resolved when it's not fixed yet, so I keep asking a similar question to resolve this. The file name and location are listed in Michals fix to this in the very first thread below.

www.jomsocial.com/forum/groups/33034-gro...age-still-showing-up
www.jomsocial.com/forum/groups/33029-jomsocial-group-id
www.jomsocial.com/forum/groups/33032-rem...oup-cover-image-name

At this point, all that remains to be done is add this line of code, "AND ($group->id != 21)) { ?>" after the new custom code that Michal created,
but for some reason, I can't seem to get it to work. So what would be very helpful is to have you Pro's created one more line that includes the "AND ($group->id != 21)) { ?>" so I can see how it should appear. Then I can go in and just copy and paste this line with a new group ID to hide the group names that I don't want shown.

Attachments:
7 years 11 months ago
Licenses:

Hi,

please check it:



you need to edit:
/templates/socialize/html/com_community/layouts/groups/single.php at line 72
I changing it from
<?php if($group->id != 217) { ?>  
to
<?php if($group->id != 217 && $group->id != 21) { ?>  

Regards

Attachments:
7 years 11 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

Albetus,
Thank you very much for looking at this and fixing it. This is exactly what I wanted and I see the problem. Your code is; <?php if($group->id != 217 && $group->id != 21) { ?> which has (&&) for the new line. When Michal sent me this same information he had it written down as (AND). I don't know this code stuff, but I know that is the only difference. LOL!
So can I assume that if I want to add more groups to this hidden name on the cover image, i just add new line code as follows below;

<?php if($group->id != 217 && $group->id != 21 && $group->id != 22 && $group->id != 23) { ?>
just keep adding new group ID's to this string and it will work?

Thanks,

David

7 years 11 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

Albertus,
Yes, it works perfectly.

Thanks,

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