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.

Restrict frontpage streamline tot only USER and FRIENDS

10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

Dear support-team,

I wanted to ask if i can restrict the filter options to only User and Friends. I need a more "Facebook" like approach so that it involves more there friends in stead of every member.

Best regards,

Lafemme

10 years 7 months ago
Licenses:

HI, Cynthia.

You mean you want to have "Mu Friends & I" filter enabled by default and don't allow to change it?
So remove other filtering options?

If yes, then first you need to set "My friends & I" as default filter here: Backend -> Components -> JomSocial -> Configuration -> Layout ->
Frontpage Activity Stream box -> Default Frontpage Activity Filter set to i.imgur.com/fQCj8eW.png

Then you'll need to modify filter options by removing some of them.

Copy this file:

ROOT/components/com_community/templates/jomsocial/layouts/frontpage/base.php

to:

ROOT/templates/your-template/html/com_community/layouts/frontpage (if you don't have those folders - feel free to create them)

Edit file and in line 63 replace this:

<ul class="unstyled joms-activity-filter-dropdown joms-postbox-dropdown" style="display: none">
                            <li <?php echo ($filterKey == 'all') ? 'class="active"' : ''; ?>
                                data-filter="all"
                                data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=all'); ?>">
                                <svg viewBox="0 0 16 18" class="joms-icon">
                                    <use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-star3"></use>
                                </svg>
                                <?php echo JText::_("COM_COMMUNITY_FILTERBAR_ALL"); ?>
                            </li>
                            <li <?php echo ($filterKey == 'apps' && $filterValue == "profile") ? 'class="active"' : ''; ?>
                                data-filter="apps" data-value="profile"
                                data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=apps&value=profile'); ?>">
                                <svg viewBox="0 0 16 18" class="joms-icon">
                                    <use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-pencil"></use>
                                </svg>
                                <?php echo JText::_("COM_COMMUNITY_FILTERBAR_STATUS"); ?>
                            </li>
                            <?php if ($config->get('enablephotos')) { ?>
                                <li <?php echo ($filterKey == 'apps' && $filterValue == "photo") ? 'class="active"' : ''; ?>
                                    data-filter="apps" data-value="photo"
                                    data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=apps&value=photo'); ?>">
                                    <svg viewBox="0 0 16 18" class="joms-icon">
                                        <use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-images"></use>
                                    </svg>
                                    <?php echo JText::_("COM_COMMUNITY_FILTERBAR_PHOTO"); ?>
                                </li>
                            <?php } ?>
                            <?php if ($config->get('enablevideos') == 1) { ?>
                                <li <?php echo ($filterKey == 'apps' && $filterValue == "video") ? 'class="active"' : ''; ?>
                                    data-filter="apps" data-value="video"
                                    data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=apps&value=video'); ?>">
                                    <svg viewBox="0 0 16 18" class="joms-icon">
                                        <use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-camera2"></use>
                                    </svg>
                                    <?php echo JText::_("COM_COMMUNITY_FILTERBAR_VIDEO"); ?>
                                </li>
                            <?php } ?>
                            <?php if ($config->get('enablegroups') == 1) { ?>
                                <li <?php echo ($filterKey == 'apps' && $filterValue == "group") ? 'class="active"' : ''; ?>
                                    data-filter="apps" data-value="group"
                                    data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=apps&value=group'); ?>">
                                    <svg viewBox="0 0 16 18" class="joms-icon">
                                        <use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-users"></use>
                                    </svg>
                                    <?php echo JText::_("COM_COMMUNITY_FILTERBAR_GROUP"); ?>
                                </li>
                            <?php } ?>
                            <?php if ($config->get('enableevents') == 1) { ?>
                                <li <?php echo ($filterKey == 'apps' && $filterValue == "event") ? 'class="active"' : ''; ?>
                                    data-filter="apps" data-value="event"
                                    data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=apps&value=event'); ?>">
                                    <svg viewBox="0 0 16 18" class="joms-icon">
                                        <use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-calendar"></use>
                                    </svg>
                                    <?php echo JText::_("COM_COMMUNITY_FILTERBAR_EVENT"); ?>
                                </li>
                            <?php } ?>
                            <li <?php echo ($filterKey == 'privacy' && $filterValue == "me-and-friends") ? 'class="active"' : ''; ?>
                                data-filter="privacy" data-value="me-and-friends"
                                data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=privacy&value=me-and-friends'); ?>">
                                <svg viewBox="0 0 16 18" class="joms-icon">
                                    <use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-user"></use>
                                </svg>
                                <?php echo JText::_("COM_COMMUNITY_FILTERBAR_MEANDFRIENDS"); ?>
                            </li>
                            <li <?php echo ($filterKey == 'keyword' || $filterKey == 'hashtag') ? 'class="active"' : '' ?>
                                data-filter="__filter__" data-value="__value__"
                                data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=__filter__&value=__value__'); ?>"
                                style="margin-top:20px">
                                <div class="joms-select--wrapper" style="margin-bottom:4px">
                                    <select class="joms-select">
                                        <option value="keyword" <?php echo ( $filterKey == 'keyword' ) ? 'selected="selected"' : '' ?>><?php echo JText::_("COM_COMMUNITY_FILTERBY_KEYWORD"); ?></option>
                                        <option value="hashtag" <?php echo ( $filterKey == 'hashtag' ) ? 'selected="selected"' : '' ?>><?php echo JText::_("COM_COMMUNITY_FILTERBY_HASHTAG"); ?></option>
                                    </select>
                                </div>
                                <input type="text" class="joms-input" value="<?php echo ($filterKey == 'keyword' || $filterKey == 'hashtag') ? $filterValue : '' ?>"
                                    placeholder="<?php echo JText::_("COM_COMMUNITY_ENTER_KEYWORD"); ?>"
                                    data-label-keyword="<?php echo JText::_("COM_COMMUNITY_ENTER_KEYWORD"); ?>"
                                    data-label-hashtag="<?php echo JText::_("COM_COMMUNITY_ENTER_HASHTAG"); ?>"
                                    style="margin-bottom:8px">
                                <button class="joms-button--primary joms-button--full"
                                    data-label-keyword="<?php echo JText::_("COM_COMMUNITY_SEARCH_KEYWORD"); ?>"
                                    data-label-hashtag="<?php echo JText::_("COM_COMMUNITY_SEARCH_HASHTAG"); ?>"
                                    style="margin-bottom:3px"><?php echo JText::_( $filterKey == "hashtag" ? "COM_COMMUNITY_SEARCH_HASHTAG" : "COM_COMMUNITY_SEARCH_KEYWORD"); ?></button>
                            </li>
                        </ul>

With this:
<ul class="unstyled joms-activity-filter-dropdown joms-postbox-dropdown" style="display: none">
                            
                            <li <?php echo ($filterKey == 'privacy' && $filterValue == "me-and-friends") ? 'class="active"' : ''; ?>
                                data-filter="privacy" data-value="me-and-friends"
                                data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=privacy&value=me-and-friends'); ?>">
                                <svg viewBox="0 0 16 18" class="joms-icon">
                                    <use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-user"></use>
                                </svg>
                                <?php echo JText::_("COM_COMMUNITY_FILTERBAR_MEANDFRIENDS"); ?>
                            </li>
                            <li <?php echo ($filterKey == 'keyword' || $filterKey == 'hashtag') ? 'class="active"' : '' ?>
                                data-filter="__filter__" data-value="__value__"
                                data-url="<?php echo CRoute::_('index.php?option=com_community&view=frontpage&filter=__filter__&value=__value__'); ?>"
                                style="margin-top:20px">
                                <div class="joms-select--wrapper" style="margin-bottom:4px">
                                    <select class="joms-select">
                                        <option value="keyword" <?php echo ( $filterKey == 'keyword' ) ? 'selected="selected"' : '' ?>><?php echo JText::_("COM_COMMUNITY_FILTERBY_KEYWORD"); ?></option>
                                        <option value="hashtag" <?php echo ( $filterKey == 'hashtag' ) ? 'selected="selected"' : '' ?>><?php echo JText::_("COM_COMMUNITY_FILTERBY_HASHTAG"); ?></option>
                                    </select>
                                </div>
                                <input type="text" class="joms-input" value="<?php echo ($filterKey == 'keyword' || $filterKey == 'hashtag') ? $filterValue : '' ?>"
                                    placeholder="<?php echo JText::_("COM_COMMUNITY_ENTER_KEYWORD"); ?>"
                                    data-label-keyword="<?php echo JText::_("COM_COMMUNITY_ENTER_KEYWORD"); ?>"
                                    data-label-hashtag="<?php echo JText::_("COM_COMMUNITY_ENTER_HASHTAG"); ?>"
                                    style="margin-bottom:8px">
                                <button class="joms-button--primary joms-button--full"
                                    data-label-keyword="<?php echo JText::_("COM_COMMUNITY_SEARCH_KEYWORD"); ?>"
                                    data-label-hashtag="<?php echo JText::_("COM_COMMUNITY_SEARCH_HASHTAG"); ?>"
                                    style="margin-bottom:3px"><?php echo JText::_( $filterKey == "hashtag" ? "COM_COMMUNITY_SEARCH_HASHTAG" : "COM_COMMUNITY_SEARCH_KEYWORD"); ?></button>
                            </li>
                        </ul>

This customization will remove all other option but "My friends & I".


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

Yes!! thank you very much michal !! :D

10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

Dear Michal,

I am trying to implement this... but when i use the Me & Friends filter in the back-end... the status update box on the frontpage is missing...

What to do?

10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

well... it shows but loading takes forever....

10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

and... although file replaced... i can still choose other setting for filter...

10 years 7 months ago
Licenses:

Hi, Cynthia.

Please provide us working administrator credentials.
I can't login to your site.
Please, edit your first post and add credentials to corresponding fields.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

Dear Michal,

I have done that now.... i will also place that file again in the template folder. Hope it will helps....

10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

Dear Michal...

Any idea what have gone wrong?? can i just otherwise remove the filter-box? so that they can not choose anymore? Or only show that filterbox to admin?? because that would be better so that we still can see the whole list so that we have more controle what happends on the website.

10 years 7 months ago
Licenses:

HI, Cynthia.

I fixed that on your site - it's fine now.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

HI Michal... i am sorry...

but problem now is that page loading takes really long... it takes atleast 14 seconds for the status box to show... so i do not think that is a solution...

Isnt there a way where the filter is just shown to admins and not to normal users and that i will just take controle in the back-end for it?

10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

i btw logged in with an other account, but you still see all streams.... so this is not working Michal...

10 years 7 months ago
Licenses:

Hi, Cynthia.

That's a bit strange as when I log in I see stream with post box right away.
Could you check on different device?


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
10 years 7 months ago
  • lafemme's Avatar
    Topic Author
  • lafemme
  • Offline
  • Fresh Boarder
  • Posts: 72
  • Thank you received: 9
Licenses:
JomSocial Active

edit :D it works :) and i see only my friends with test account. Maybe because i was looking with admin account that i still saw also non-friends?

In safari it loads instantly... in chrome it doesnt... there is takes a long time...

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