Esempio n. 1
0
                // echo $event->getCategoryName();
                ?>
                                            <?php 
                echo $event->location;
                ?>
                                        </div>
                                        <!-- <div class="eventTime"><?php 
                echo JText::sprintf('COM_COMMUNITY_EVENTS_DURATION', JHTML::_('date', $event->startdate, JText::_('DATE_FORMAT_LC2')), JHTML::_('date', $event->enddate, JText::_('DATE_FORMAT_LC2')));
                ?>
</div> -->
                                        <div class="cThumb-Members">
                                            <a href="<?php 
                echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&groupid=' . $group->id . '&eventid=' . $event->id . '&type=' . COMMUNITY_EVENT_STATUS_ATTEND);
                ?>
"><?php 
                echo JText::sprintf(!CStringHelper::isSingular($event->confirmedcount) ? 'COM_COMMUNITY_EVENTS_MANY_GUEST_COUNT' : 'COM_COMMUNITY_EVENTS_GUEST_COUNT', $event->confirmedcount);
                ?>
</a>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        <?php 
            }
            ?>
                    </ul>
                <?php 
        } else {
            ?>
                    <div class="cEmpty"><?php 
            echo JText::_('COM_COMMUNITY_EVENTS_NOT_CREATED');
Esempio n. 2
0
        echo $event->location;
        ?>
</a>
                        </li>
                        <li>
                            <svg class="joms-icon" viewBox="0 0 16 16">
                                <use xlink:href="<?php 
        echo CRoute::getURI();
        ?>
#joms-icon-user"/>
                            </svg>
                            <a href="<?php 
        echo $event->getGuestLink(COMMUNITY_EVENT_STATUS_ATTEND);
        ?>
"><?php 
        echo JText::sprintf(!CStringHelper::isSingular($event->getMembersCount(COMMUNITY_EVENT_STATUS_ATTEND)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY_NUMBER' : 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_NUMBER', $event->getMembersCount(COMMUNITY_EVENT_STATUS_ATTEND));
        ?>
</a>
                        </li>
                        <li>
                        	<div class="joms-gap"></div>
                            <svg class="joms-icon" viewBox="0 0 16 16">
                                <use xlink:href="<?php 
        echo CRoute::getURI();
        ?>
#joms-icon-clock"/>
                            </svg>
                        	<small><?php 
        echo JText::sprintf('COM_COMMUNITY_EVENTS_DURATION', JHTML::_('date', $event->startdate, JText::_('DATE_FORMAT_LC3')), JHTML::_('date', $event->enddate, JText::_('DATE_FORMAT_LC3')));
        ?>
</small>
Esempio n. 3
0
    function _getEventsHTML($createEvents, $rows, $user, $config, $totalEvents, $creatable)
    {
        ob_start();
        ?>

        <?php 
        if ($rows) {
            ?>
        <ul class="joms-list--event">
        <?php 
            foreach ($rows as $row) {
                $event = JTable::getInstance('Event', 'CTable');
                $event->load($row->id);
                $creator = CFactory::getUser($event->creator);
                // Get the formated date & time
                $format = $config->get('eventshowampm') ? JText::_('COM_COMMUNITY_DATE_FORMAT_LC2_12H') : JText::_('COM_COMMUNITY_DATE_FORMAT_LC2_24H');
                $startdatehtml = CTimeHelper::getFormattedTime($event->startdate, $format);
                $enddatehtml = CTimeHelper::getFormattedTime($event->enddate, $format);
                ?>

            <li class="joms-media--event" title="<?php 
                echo CStringHelper::escape($event->summary);
                ?>
">
                <div class="joms-media__calendar">
                    <span class="month"><?php 
                echo CEventHelper::formatStartDate($event, JText::_('M'));
                ?>
</span>
                    <span class="date"><?php 
                echo CEventHelper::formatStartDate($event, JText::_('d'));
                ?>
</span>
                </div>
                <div class="joms-media__body">
                    <a href="<?php 
                echo CRoute::_('index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id);
                ?>
"><?php 
                echo $event->title;
                ?>
</a>
                    <span class="joms-block"><?php 
                echo $event->location;
                ?>
</span>
                    <a href="<?php 
                echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type=' . 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>
            </li>
            <?php 
            }
            ?>
        </ul>
        <?php 
        } else {
            ?>
            <div><?php 
            echo JText::_('PLG_EVENTS_NO_EVENTS_CREATED_BY_THE_USER_YET');
            ?>
</div>
        <?php 
        }
        ?>
        <small>
        <?php 
        if ($creatable) {
            ?>
        <a class="joms-button--link" href="<?php 
            echo CRoute::_('index.php?option=com_community&view=events&task=create');
            ?>
"><?php 
            echo JText::_('COM_COMMUNITY_EVENTS_CREATE');
            ?>
</a>
        <?php 
        }
        ?>
        <a class="joms-button--link" href="<?php 
        echo CRoute::_('index.php?option=com_community&view=events');
        ?>
"><?php 
        echo JText::_('COM_COMMUNITY_EVENTS_ALL_EVENTS') . ' (' . $totalEvents . ')';
        ?>
</a>
        </small>

        <?php 
        $content = ob_get_contents();
        ob_end_clean();
        return $content;
    }
Esempio n. 4
0
        public function _getMyGroupsHTML($userid = null)
        {
            $document = JFactory::getDocument();
            $is_rtl = $document->direction == 'rtl' ? 'dir="rtl"' : '';
            $html = '';
            $groupsModel = CFactory::getModel('groups');
            $my = CFactory::getUser($userid);
            $user = CFactory::getRequestUser();
            $this->loadUserParams();
            $params = $user->getParams();
            // site visitor
            $relation = 10;
            // site members
            if ($my->id != 0) {
                $relation = 20;
            }
            // friends
            if (CFriendsHelper::isConnected($my->id, $user->id)) {
                $relation = 30;
            }
            // mine
            if (COwnerHelper::isMine($my->id, $user->id)) {
                $relation = 40;
            }
            if ($relation >= $params->get('privacyGroupsView')) {
                // count the groups
                $groups = $groupsModel->getGroups($user->id, 'latest', false);
                $total = count($groups);
                if ($this->params->get('hide_empty', 0) && !$total) {
                    return '';
                }
                $count = $this->userparams->get('count', $this->params->get('count', 10));
                $groupsModel->setState('limit', $count);
                $groups = $groupsModel->getGroups($user->id, 'latest', false);
                if ($groups) {
                    shuffle($groups);
                }
                ob_start();
                ?>

                <?php 
                if ($groups) {
                    $i = 0;
                    ?>
                    <?php 
                    foreach ($groups as $group) {
                        if ($i >= $count) {
                            break;
                        }
                        $table = JTable::getInstance('Group', 'CTable');
                        $table->load($group->id);
                        if ($table->unlisted && !$groupsModel->isMember($my->id, $table->id)) {
                            continue;
                        }
                        $i++;
                        ?>
                        <div class="joms-stream__header">

                            <div class="joms-avatar--stream">
                                <a href="<?php 
                        echo CRoute::_('index.php?option=com_community&view=groups&groupid=' . $group->id . '&task=viewgroup');
                        ?>
">
                                    <img src="<?php 
                        echo $table->getThumbAvatar();
                        ?>
" alt="<?php 
                        echo CStringHelper::escape($group->name);
                        ?>
" >
                                </a>
                            </div>


                            <div class="joms-stream__meta">
                                <a class="joms-text--title" href="<?php 
                        echo CRoute::_('index.php?option=com_community&view=groups&groupid=' . $group->id . '&task=viewgroup');
                        ?>
">
                                    <?php 
                        echo $group->name;
                        ?>
                                </a>

                                <a href="<?php 
                        echo CRoute::_("index.php?option=com_community&view=groups&task=viewmembers&groupid=" . $group->id);
                        ?>
" class="joms-block"><small>
                                        <?php 
                        echo JText::sprintf(!CStringHelper::isSingular($group->membercount) ? 'COM_COMMUNITY_GROUPS_MEMBERS_MANY' : 'COM_COMMUNITY_GROUPS_MEMBERS_SINGULAR', $group->membercount);
                        ?>
                                    </small></a>

                            </div>
                        </div>

                    <?php 
                    }
                    ?>

                <?php 
                } else {
                    ?>
                    <div><?php 
                    echo JText::_('COM_COMMUNITY_NO_GROUPS_YET');
                    ?>
</div>
                <?php 
                }
                if ($i < $total) {
                    ?>
                    <div class="joms-gap"></div>
                    <a href="<?php 
                    echo CRoute::_('index.php?option=com_community&view=groups&task=mygroups&userid=' . $userid);
                    ?>
">
                        <span><?php 
                    echo JText::_('PLG_MYGROUPS_VIEWALL_GROUPS');
                    ?>
</span>
                        <span>(<?php 
                    echo $total;
                    ?>
)</span>
                    </a>
                <?php 
                }
                ?>

                <?php 
                $html = ob_get_contents();
                ob_end_clean();
            }
            return $html;
        }
Esempio n. 5
0
                        </div>
                        <div class="joms-gap--small"></div>
                        <ul class="joms-list--inline">
                            <li>
                                <svg class="joms-icon" viewBox="0 0 16 16">
                                    <use xlink:href="<?php 
        echo CRoute::getURI();
        ?>
#joms-icon-user"/>
                                </svg>
                                <a href="<?php 
        echo $event->getGuestLink(COMMUNITY_EVENT_STATUS_ATTEND);
        ?>
"><?php 
        $membercount = $event->getMembersCount(COMMUNITY_EVENT_STATUS_ATTEND);
        echo JText::sprintf(!CStringHelper::isSingular($membercount) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY_NUMBER' : 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_NUMBER', $membercount);
        ?>
</a>
                            </li>
                            <?php 
        if ($event->permission == 1) {
            ?>
                                <li>
                                    <svg class="joms-icon" viewBox="0 0 16 16">
                                        <use xlink:href="<?php 
            echo CRoute::getURI();
            ?>
#joms-icon-lock"/>
                                    </svg>
                                    <?php 
            echo JText::_('COM_COMMUNITY_GROUPS_PRIVATE');
Esempio n. 6
0
        echo CRoute::_('index.php?option=com_community&view=groups&groupid=' . $group->id . '&task=viewgroup');
        ?>
">
                <?php 
        echo $group->name;
        ?>
            </a>
            <?php 
        if ($showTotal == 1) {
            ?>
                <a href="<?php 
            echo CRoute::_("index.php?option=com_community&view=groups&task=viewmembers&groupid=" . $group->id);
            ?>
" class="joms-block"><small>
                    <?php 
            echo JText::sprintf(!CStringHelper::isSingular($group->totalMembers) ? 'MOD_ACTIVEGROUPS_MEMBER_MANY' : 'MOD_ACTIVEGROUPS_MEMBER', $group->totalMembers);
            ?>
                </small></a>
            <?php 
        }
        ?>
        </div>
    </div>

    <?php 
    }
} else {
    echo JText::_("MOD_ACTIVEGROUPS_NO_ACTIVE_GROUPS");
}
?>
Esempio n. 7
0
 public static function isPlural($num)
 {
     return !CStringHelper::isSingular($num);
 }
						<a href="<?php 
            echo $event->getGuestLink(COMMUNITY_EVENT_STATUS_ATTEND);
            ?>
"><?php 
            echo JText::sprintf(!CStringHelper::isSingular($event->getMembersCount(COMMUNITY_EVENT_STATUS_ATTEND)) ? 'COM_COMMUNITY_EVENTS_COUNT_MANY_PAST' : 'COM_COMMUNITY_EVENTS_COUNT_PAST', $event->getMembersCount(COMMUNITY_EVENT_STATUS_ATTEND));
            ?>
</a>
						<?php 
        } else {
            ?>

						<a href="<?php 
            echo $event->getGuestLink(COMMUNITY_EVENT_STATUS_ATTEND);
            ?>
"><?php 
            echo JText::sprintf(!CStringHelper::isSingular($event->getMembersCount(COMMUNITY_EVENT_STATUS_ATTEND)) ? 'COM_COMMUNITY_EVENTS_MANY_GUEST_COUNT' : 'COM_COMMUNITY_EVENTS_GUEST_COUNT', $event->getMembersCount(COMMUNITY_EVENT_STATUS_ATTEND));
            ?>
</a>
						<?php 
        }
        ?>

					</div>
					<?php 
        if ($isCommunityAdmin && $showFeatured) {
            if (!in_array($event->id, $featuredList)) {
                ?>

					<div class="cIndex-Feature">
						<a class="btn Icon"
						   onclick="joms.featured.add('<?php 
Esempio n. 9
0
            echo $data[0]->title;
            ?>
</a>
                        <small>
                        <?php 
            echo JText::_('COM_COMMUNITY_BY');
            ?>
 <a href="<?php 
            echo CRoute::_('index.php?option=com_community&view=profile&userid=' . $creator->id);
            ?>
"><?php 
            echo $creator->getDisplayName();
            ?>
</a>
                        <span class="joms-block"><?php 
            echo JText::sprintf(!CStringHelper::isSingular($data[0]->counter) ? 'MOD_LATESTDISC_REPLY_MANY' : 'MOD_LATESTDISC_REPLY', $data[0]->counter);
            ?>
</span>
                        </small>
                    </div>

                </div>
                <?php 
        }
    }
    ?>
                <?php 
} else {
    echo JText::_("MOD_LATESTDISC_NO_DISCUSSION");
}
?>
Esempio n. 10
0
            echo $data[0]->title;
            ?>
</a>
                    <small>
                    <?php 
            echo JText::_('COM_COMMUNITY_BY');
            ?>
 <a href="<?php 
            echo CRoute::_('index.php?option=com_community&view=profile&userid=' . $creator->id);
            ?>
"><?php 
            echo $creator->getDisplayName();
            ?>
</a>
                    <span class="joms-block"><?php 
            echo JText::sprintf(!CStringHelper::isSingular($data[0]->counter) ? 'MOD_COMMUNITY_DISCUSSIONS_REPLY_MANY' : 'MOD_COMMUNITY_DISCUSSIONS_REPLY', $data[0]->counter);
            ?>
</span>
                    </small>
                </div>

            </div>
            <?php 
        }
    }
    ?>
            <?php 
} else {
    echo JText::_("MOD_COMMUNITY_DISCUSSIONS_NO_DISCUSSION");
}
?>