Skip to content

Commit

Permalink
Merge pull request #1210 from Egnarts94/master
Browse files Browse the repository at this point in the history
JEM v2.3.0 Responsive
  • Loading branch information
depebo authored Mar 14, 2020
2 parents 5dc46f0 + 4f4021d commit a44615f
Show file tree
Hide file tree
Showing 354 changed files with 21,657 additions and 2,030 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,4 @@ pip-log.txt
#############
/build.config
/build.number

2 changes: 1 addition & 1 deletion 3rd/AcyMailingPlugin/tagjem/tagjem.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function acymailingtagjem_show()
$pageInfo->filter->order->dir = $app->getUserStateFromRequest($paramBase.".filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
if(strtolower($pageInfo->filter->order->dir) !== 'desc') $pageInfo->filter->order->dir = 'asc';
$pageInfo->search = $app->getUserStateFromRequest($paramBase.".search", 'search', '', 'string');
$pageInfo->search = JString::strtolower($pageInfo->search);
$pageInfo->search = \Joomla\String\StringHelper::strtolower($pageInfo->search);
$pageInfo->filter_cat = $app->getUserStateFromRequest($paramBase.".filter_cat", 'filter_cat', '', 'int');
$pageInfo->featured = $app->getUserStateFromRequest($paramBase.".featured", 'featured', $this->params->get('show_featured', 0), 'int');
$pageInfo->opendates = '0';
Expand Down
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Egnarts94/JEM-Project Responsive JEM
Forked from jemproject/JEM-Project



This version includes:
## This version includes:
- Import/Export view
- Multicategory support
- Parent category
Expand All @@ -14,6 +14,29 @@ This version includes:

Tips, suggestions are very welcome..

Project Homepage: https://www.joomlaeventmanager.net/

Translation via: https://www.transifex.com/projects/p/JEM/

## So, whats different?
- There is a simple way for installation: Just use this update package - no template overrides anymore!
- Some additional, simple settings in the backend for switching to JEM Responsive
- The original JEM can now be used with modern icons (FontAwesome available for old JEM)
- and many many more...

## Known Problems:
- You can not automatically update your JEM installation via the Joomla updater. If the default JEM releases an update and you install this, JEM-Responsive is removed automatically
- All new settings are in english?!?! - Yes, because I did not update all language packs.

## How do I install and enable it?
1. Download this package (or copy just download url)
2. Install it as a normal extension in Joomla
3. In Joomla Backend, go to Components -> JEM -> Settings -> Basic Settings, there you find a new entry called "Style". There are the global settings for enabling JEM Responsive. Set "Layout Style" to "Modern Responsive Style" and "Use Icon Font" to "Yes"
4. If you used the template override previously, delete all overrides from you template, they are not required anymore.

## What can I do with JEM-Responsive?
If you want a demo, take a look here: jem-test.lkgchemnitz.de
After installation, go to your Backend->Components->JEM->Help->JEM Responsive, where you can find a documentation of JEM Responsive. Let me know if you miss something!

## Why do you use already module-class suffix?
Because the default JEM does not support some settings of JEM-Responsive. And so, only expert users, that know what they do can change the behaviour of JEM Responsive.
14 changes: 3 additions & 11 deletions admin/controllers/attendee.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ public function cancel()
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

$attendee = JTable::getInstance('jem_register', '');
if (version_compare(JVERSION, '3.2', 'lt')) {
$attendee->bind(JRequest::get('post')); // before Joomla! 3.2.0 there is no good way to get them all from JInput :(
} else {
$attendee->bind(JFactory::getApplication()->input->post->getArray(/*get them all*/));
}
$attendee->bind(JFactory::getApplication()->input->post->getArray(/*get them all*/));
$attendee->checkin();

$this->setRedirect('index.php?option=com_jem&view=attendees&eventid='.JFactory::getApplication()->input->getInt('event', 0));
Expand All @@ -78,11 +74,7 @@ public function save()
$task = $jinput->getCmd('task');

// Retrieving $post
if (version_compare(JVERSION, '3.2', 'lt')) {
$post = JRequest::get('post'); // before Joomla! 3.2.0 we must and can use JRequest
} else {
$post = $jinput->post->getArray(/*get them all*/);
}
$post = $jinput->post->getArray(/*get them all*/);

// Retrieving email-setting
$sendemail = $jinput->getInt('sendemail','0');
Expand Down Expand Up @@ -125,7 +117,7 @@ public function save()
}
// but show warning if mailer is disabled
if (!JPluginHelper::isEnabled('jem', 'mailer')) {
JError::raiseNotice(100, JText::_('COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED'), 'notice');
}
}

Expand Down
12 changes: 6 additions & 6 deletions admin/controllers/attendees.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function remove()
$eventid = $jinput->getInt('eventid');

if (!is_array($cid) || count($cid) < 1) {
JError::raiseError(500, JText::_('COM_JEM_SELECT_ITEM_TO_DELETE'));
throw new Exception(JText::_('COM_JEM_SELECT_ITEM_TO_DELETE'), 500);
}

$total = count($cid);
Expand Down Expand Up @@ -123,9 +123,9 @@ public function toggleStatus()
$task = $this->getTask();

if (empty($pks)) {
JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('JERROR_NO_ITEMS_SELECTED'), 'warning');
} else {
JArrayHelper::toInteger($pks);
\Joomla\Utilities\ArrayHelper::toInteger($pks);
$model = $this->getModel('attendee');

JPluginHelper::importPlugin('jem');
Expand Down Expand Up @@ -205,12 +205,12 @@ public function setStatus()
$ids = $app->input->get('cid', array(), 'array');
$values = array('setWaitinglist' => 2, 'setAttending' => 1, 'setInvited' => 0, 'setNotAttending' => -1);
$task = $this->getTask();
$value = JArrayHelper::getValue($values, $task, 0, 'int');
$value = \Joomla\Utilities\ArrayHelper::getValue($values, $task, 0, 'int');

if (empty($ids))
{
$message = JText::_('JERROR_NO_ITEMS_SELECTED');
JError::raiseWarning(500, $message);
\Joomla\CMS\Factory::getApplication()->enqueueMessage($message, 'warning');
}
else
{
Expand All @@ -222,7 +222,7 @@ public function setStatus()
{
$message = $model->getError();
JemHelper::addLogEntry($message, __METHOD__, JLog::ERROR);
JError::raiseWarning(500, $message);
\Joomla\CMS\Factory::getApplication()->enqueueMessage($message, 'warning');
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions admin/controllers/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function deleteDisabled()

if (!is_array($cid) || count($cid) < 1)
{
JError::raiseWarning(500, JText::_($this->text_prefix . '_NO_ITEM_SELECTED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), 'warning');
}
else
{
Expand All @@ -104,7 +104,7 @@ public function deleteDisabled()

// Make sure the item ids are integers
jimport('joomla.utilities.arrayhelper');
JArrayHelper::toInteger($cid);
\Joomla\Utilities\ArrayHelper::toInteger($cid);

// Remove the items.
if ($model->delete($cid))
Expand Down Expand Up @@ -135,7 +135,7 @@ public function remove()
$cid= JFactory::getApplication()->input->post->get('cid', array(), 'array');

if (!is_array($cid) || count($cid) < 1) {
JError::raiseWarning(500, JText::_('COM_JEM_SELECT_ITEM_TO_DELETE'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('COM_JEM_SELECT_ITEM_TO_DELETE'), 'warning');
}

$model = $this->getModel('category');
Expand Down
2 changes: 1 addition & 1 deletion admin/controllers/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function _postSaveHook($model, $validData = array())

// but show warning if mailer is disabled
if (!JPluginHelper::isEnabled('jem', 'mailer')) {
JError::raiseNotice(100, JText::_('COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED'), 'notice');
}
}
}
8 changes: 4 additions & 4 deletions admin/controllers/events.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function featured()
$ids = JFactory::getApplication()->input->get('cid', array(), 'array');
$values = array('featured' => 1, 'unfeatured' => 0);
$task = $this->getTask();
$value = JArrayHelper::getValue($values, $task, 0, 'int');
$value = \Joomla\Utilities\ArrayHelper::getValue($values, $task, 0, 'int');

$glob_auth = $user->can('publish', 'event'); // general permission for all events

Expand All @@ -60,20 +60,20 @@ public function featured()
if (!$glob_auth && !$user->can('publish', 'event', (int)$id)) {
// Prune items that you can't change.
unset($ids[$i]);
JError::raiseNotice(403, JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED'), 'notice');
}
}

if (empty($ids)) {
JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('JERROR_NO_ITEMS_SELECTED'), 'warning');
}
else {
// Get the model.
$model = $this->getModel();

// Publish the items.
if (!$model->featured($ids, $value)) {
JError::raiseWarning(500, $model->getError());
\Joomla\CMS\Factory::getApplication()->enqueueMessage($model->getError(), 'warning');
}
}

Expand Down
2 changes: 1 addition & 1 deletion admin/controllers/groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function remove()
$cid = $jinput->get('cid', 0, 'array');

if (!is_array($cid) || count($cid) < 1) {
JError::raiseError(500, JText::_('COM_JEM_SELECT_ITEM_TO_DELETE'));
throw new Exception(JText::_('COM_JEM_SELECT_ITEM_TO_DELETE'), 500);
}

$total = count($cid);
Expand Down
6 changes: 3 additions & 3 deletions admin/controllers/imagehandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ public function uploadimage()

//upload the image
if (!JFile::upload($file['tmp_name'], $filepath)) {
echo "<script> alert('".JText::_('COM_JEM_UPLOAD_FAILED')."'); window.history.go(-1); </script>\n";
echo "<script> alert('".JText::_('COM_JEM_UPLOAD_FAILED')."'); </script>\n";
$app->close();
} else {
echo "<script> alert('".JText::_('COM_JEM_UPLOAD_COMPLETE')."'); window.history.go(-1); window.parent.SelectImage('$filename', '$filename'); </script>\n";
echo "<script> alert('".JText::_('COM_JEM_UPLOAD_COMPLETE')."'); window.parent.SelectImage('$filename', '$filename'); </script>\n";
$app->close();
}
}
Expand Down Expand Up @@ -115,7 +115,7 @@ public function delete()
if (count($images)) {
foreach ($images as $image) {
if ($image !== JFilterInput::getInstance()->clean($image, 'path')) {
JError::raiseWarning(100, JText::_('COM_JEM_UNABLE_TO_DELETE').' '.htmlspecialchars($image, ENT_COMPAT, 'UTF-8'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('COM_JEM_UNABLE_TO_DELETE').' '.htmlspecialchars($image, ENT_COMPAT, 'UTF-8'), 'warning');
continue;
}

Expand Down
8 changes: 6 additions & 2 deletions admin/controllers/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ private function CsvImport($type, $dbname)
$replace = JFactory::getApplication()->input->post->getInt('replace_'.$type, 0);
$object = JTable::getInstance('jem_'.$dbname, '');
$object_fields = get_object_vars($object);
$jemconfig = JemConfig::getInstance()->toRegistry();
$separator = $jemconfig->get('csv_separator', ';');
$delimiter = $jemconfig->get('csv_delimiter', '"');

if ($type === 'events') {
// add additional fields
Expand Down Expand Up @@ -96,11 +99,12 @@ private function CsvImport($type, $dbname)

// get fields, on first row of the file
$fields = array();
if (($data = fgetcsv($handle, 1000, ';')) !== false) {
if (($data = fgetcsv($handle, 1000, $separator, $delimiter)) !== false) {
$numfields = count($data);

// convert from ansi to utf-8 if required
if ($convert) {
$msg .= "<p>".JText::_('COM_JEM_IMPORT_BOM_NOT_FOUND')."</p>\n";
array_walk($data, 'jem_convert_ansi2utf8');
}

Expand Down Expand Up @@ -129,7 +133,7 @@ private function CsvImport($type, $dbname)
$records = array();
$row = 1;

while (($data = fgetcsv($handle, 10000, ';')) !== FALSE) {
while (($data = fgetcsv($handle, 10000, $separator, $delimiter)) !== FALSE) {
$num = count($data);

if ($numfields != $num) {
Expand Down
4 changes: 2 additions & 2 deletions admin/controllers/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ public function save()

// Access check.
if (!$this->allowSave()) {
return JError::raiseWarning(403, JText::_('JERROR_SAVE_NOT_PERMITTED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('JERROR_SAVE_NOT_PERMITTED'), 'warning');
}

// Validate the posted data.
$form = $model->getForm();
if (!$form) {
JError::raiseError(500, $model->getError());
\Joomla\CMS\Factory::getApplication()->enqueueMessage($model->getError(), 'error');
return false;
}

Expand Down
10 changes: 5 additions & 5 deletions admin/controllers/source.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ public function edit()
$context = 'com_jem.edit.source';

if (preg_match('#\.\.#', base64_decode($recordId))) {
return JError::raiseError(500, JText::_('COM_JEM_CSSMANAGER_ERROR_SOURCE_FILE_NOT_FOUND'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('COM_JEM_CSSMANAGER_ERROR_SOURCE_FILE_NOT_FOUND'), 'warning');
}

// Access check.
if (!$this->allowEdit()) {
return JError::raiseWarning(403, JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED'), 'warning');
}

// Check-out succeeded, push the new record id into the session.
Expand Down Expand Up @@ -152,19 +152,19 @@ public function save()

// Access check.
if (!$this->allowSave()) {
return JError::raiseWarning(403, JText::_('JERROR_SAVE_NOT_PERMITTED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('JERROR_SAVE_NOT_PERMITTED'), 'warning');
}

// Match the stored id's with the submitted.
if (empty($data['filename']) || ($data['filename'] != $file)) {
return JError::raiseError(500, JText::_('COM_JEM_CSSMANAGER_ERROR_SOURCE_ID_FILENAME_MISMATCH'));
throw new Exception(JText::_('COM_JEM_CSSMANAGER_ERROR_SOURCE_ID_FILENAME_MISMATCH'), 500);
}

// Validate the posted data.
$form = $model->getForm();
if (!$form)
{
JError::raiseError(500, $model->getError());
\Joomla\CMS\Factory::getApplication()->enqueueMessage($model->getError(), 'error');
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion admin/controllers/venue.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function _postSaveHook($model, $validData = array())

// but show warning if mailer is disabled
if (!JPluginHelper::isEnabled('jem', 'mailer')) {
JError::raiseNotice(100, JText::_('COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED'));
\Joomla\CMS\Factory::getApplication()->enqueueMessage(JText::_('COM_JEM_GLOBAL_MAILERPLUGIN_DISABLED'), 'notice');
}
}

Expand Down
4 changes: 2 additions & 2 deletions admin/controllers/venues.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ public function remove()
$cid = $jinput->get('cid',array(),'array');

if (!is_array( $cid ) || count( $cid ) < 1) {
JError::raiseError(500, JText::_( 'COM_JEM_SELECT_AN_ITEM_TO_DELETE' ) );
throw new Exception(JText::_('COM_JEM_SELECT_AN_ITEM_TO_DELETE'), 500);
} else {
$model = $this->getModel('venue');

jimport('joomla.utilities.arrayhelper');
JArrayHelper::toInteger($cid);
\Joomla\Utilities\ArrayHelper::toInteger($cid);

// trigger delete function in the model
$result = $model->delete($cid);
Expand Down
Loading

0 comments on commit a44615f

Please sign in to comment.