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.

Eventmodule only for special group

10 years 11 months ago
Licenses:
JomSocial Active

Hi

Is there a way to show only events from one specific group (not eventcategory) in the module?

regards

Rolf

10 years 11 months ago
Licenses:

Hi, Rolf.

Yes, it could be done :)

Copy this file:

ROOT/modules/mod_community_events/tmpl/default.php

to:

ROOT/templates/your-template/html/mod_community_events (if you don't have "html" or "mod_community_events" folders, feel free to create them)

Now just replace all from lines 12 to the end of file with this:

<div>
    <div class="app-box-content">
        <ul class="cThumbDetails cResetList">
            <?php foreach ($events as $event) { ?>
            <?php if($event->contentid == 8) { ?>
                <li <?php if (!empty($event->summary)): ?>class="jomNameTips" title="<?php echo CStringHelper::escape($event->summary); ?>" <?php endif; ?>>
                    <b class="cThumb-Calendar cFloat-L">
                        <b><?php echo CEventHelper::formatStartDate($event, JText::_('M')); ?></b>
                        <b><?php echo CEventHelper::formatStartDate($event, JText::_('d')); ?></b>
                    </b>
                    <div class="cThumb-Detail">
                        <a href="<?php echo $event->getLink(); ?>" class="cThumb-Title"><?php echo CStringHelper::escape($event->title); ?></a>
                        <div class="cThumb-Location">
                            <?php echo CStringHelper::escape($event->location); ?>
                        </div>
                        <div class="cThumb-Members small">
                            <a href="<?php echo $event->getGuestLink(COMMUNITY_EVENT_STATUS_ATTEND); ?>">
                                <?php echo JText::sprintf((!CStringHelper::isSingular($event->confirmedcount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY' : 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $event->confirmedcount); ?>
                            </a>
                        </div>
                    </div>
                </li>
                <?php } ?>
            <?php } ?>
        </ul>
    </div>
    <div class="app-box-footer">
        <a href="<?php echo CRoute::_('index.php?option=com_community&view=events'); ?>"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_VIEW_ALL_EVENTS'); ?></a>
    </div>
</div>

What we have here? I add a small condition to code:
<?php if($event->contentid == 8) { ?>

That said that only events that have "contentid" (it shares groupid) equal to 8 will be displayed. So I have group with id = 8 and module will display events that belong only to that group.

Just change number to group id that fits you.

but this solution has one but BIG limitations. Unfortunately JomSocial modules don't use template select feature... so such a module could be created only for ONE group... unless you duplicate a module with different name (i mean duplicate whole file structure of module - not duplicate in backend).


- 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
The following user(s) said Thank You: Rolf Würgler, guillermo
10 years 11 months ago
Licenses:
JomSocial Active

Hi Michal

We have one private group for club users and the modified module should show the events only for that club group. But there are many other groups with "public" events and the "original" module should still show those events.

Does this modification allow that the "original" module is still working and shows events from all groups (except the private one)? Or is it an override?

regards

Rolf

The following user(s) said Thank You: guillermo
10 years 11 months ago
Licenses:

Hi, Rolf.

Well, this modification will change how module woks... yes, it's a drawback I mentioned before.
But don't worry :D Magic Mike has cure for it ;)

Please use my fix (attached).
Make safe copy of original files first!
Upload it to: ROOT/modules/mod_community_events (replace original ones as you have - I hope - a safe copy of them).

Now you able to use a great feature of alternative layouts in module :)

Copy this file:

ROOT/modules/mod_community_events/tmpl/default.php

to:

ROOT/templates/your-template/html/mod_community_events (if you don't have "html" or "mod_community_events" folders, feel free to create them) and rename it to, lets say name-of-group.php and use my code inside.

Then browse to: Backend -> Extensions -> Modules and find Community Events module.
Then in tab Advanced you'll find additional dropdown list: prntscr.com/3jowos
Select: say name-of-group

Now this module will display events only for that group.

Want to have module with original display? Just select default on the list.
Want to have the same module but with different group?
Just make a copy of: name-of-group.php rename it and change groupid inside file.
Then copy Community module in backend and select new layout name from dropdown list.

Sky is the limit 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

This message has an attachment file.
Please log in or register to see it.

The following user(s) said Thank You: Rolf Würgler
10 years 11 months ago
Licenses:
JomSocial Active

Yeah!! Magic Mike is on the right way!!! ;-) This would be a cool solution which many other users are waiting for...

But i have a strange issue after implementing this...

First, the original module with default template is ok.

The modified template/module works if i choose group id 16. If i choose group id 17 which is trhe one i need or 18 for testing the module is empty. In both groups are upcoming events. 16 is a private group, 18 not.

This makes not really sense... Any idea, dear Magic Mike? :-)

regards

rolf

Attachments:
10 years 11 months ago
Licenses:

Hi, Rolf.

Well, private group events will be not shown that way as they have display restrictions.
Please show wide print screen of _community_events table... or provide me with PHPMyAdmin credentials.


- 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
The following user(s) said Thank You: Rolf Würgler
10 years 11 months ago
Licenses:
JomSocial Active

Hi Michal

Provided you with PHPMyAdmin credentials... ;-)

regards

Rolf

10 years 11 months ago
Licenses:

Hi, Rolf.

I don't see them...
You need to edit your first post and add them to Miscellaneous field.


- 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 11 months ago
Licenses:
JomSocial Active

done....

10 years 11 months ago
Licenses:

Hi, Rolf.

DB is ok... I tried to investigate customized file... but every time I lost connection ... so I can't do anything on your site...
Is this a kind of security?


- 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
The following user(s) said Thank You: Rolf Würgler
10 years 11 months ago
Licenses:
JomSocial Active

Hi Michal

Thank you very much for your investigation! I had to talk with the hoster.

But i'm away for the next 4 weeks. So if it's ok for you, we "freeze" this and i will contact you when i'm back.

Have a nice time!!!

Rolf

10 years 10 months ago
Licenses:

Hi, Rolf.

We have not received any response back from you in over 7 days, and would like to know if you consider this issue to be resolved. If you have any further questions, simply reply to this post.


- 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 10 months ago
Licenses:
JomSocial Active

Can you give me your IP-Address or range? I had to give it to my hoster... ;-)

10 years 10 months ago
Licenses:

Hi, Rolf.

192.168.1.100


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