You need to be logged in to view a user's profile.
  1. syrinx
  2. JEvents 1.5 Help
  3. Wednesday, 19 March 2008
Hey all -

I am using these two extentions for JEvents:
com_JEvents1.5alpha.zip
mod_events_latest1.5alpha.zip

All I need is a text listing of upcoming events printed on the front page.

Everything is working fine, except one small thing...

I've got two events on the same day, but different times, and they are out of order.

EVENT #1 starts at 8:00pm on April 5
EVENT #2 starts at 11:30pm on April 5

On the front page (module), they are listed as:
EVENT #2, 11:30pm....
EVENT #1, 8:00pm....

I tried to fix it by re-ordering the categories. (#1 = city event; #2 = show). So, I gave 'CITY' position #1 and 'SHOW' position #2. Unfortuently, that did not fix it. I've also deleted and re-created the event, after the category position switch. That didn't work either.

Any ideas?
Thanks!
Accepted Answer Pending Moderation
0
Votes
Undo
To go more in-depth of what I am asking....

The module and the component are working great. The only issue is that the output of multiple events, on the same day, are out of order.

As taken from my page...

Birthday
Thu, Mar 20th, 2008, 12:01am
Meeting
Sun, Mar 30th, 2008, 1:00pm
Show
Sat, Apr 5th, 2008, 11:30pm
City Event
Sat, Apr 5th, 2008, 8:00pm

All I need to know is how to force "City Event" and "Show" to be switched around. Logically, and cosmetically, it doesn't look right as is.

Deleting both events, and actually creating the City Event first, and the Show second, did not work either.
  1. more than a month ago
  2. JEvents 1.5 Help
  3. # 1
geraint
Support Team
Accepted Answer Pending Moderation
0
Votes
Undo
I have a fix for this which I will commit to SVN and will be in the next build.

You add the following method to class JEventsLatest in components/com_events/layouts/default/modView.php at line circa 1279
		function _sortEventsByDate($a, $b) 
{
$adate = $a->publish_up();
$bdate = $b->publish_up();
if ($adate>$bdate){
return -1;
}
else if ($adate<$bdate){
return 1;
}
return 0;
}


Then call it at line c. 1175
			$rows = $this->datamodel->queryModel->listEvents($periodStart, $periodEnd,"",$modcatids,$catidList);
$icalrows = $this->datamodel->queryModel->listIcalEvents( $periodStart, $periodEnd,"",$modcatids,$catidList);
$rows = array_merge($rows,$icalrows);

// sort combined array by date
usort($rows,array("JEventsLatest", "_sortEventsByDate"));

// determine the events that occur each day within our range


Geraint
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
  1. more than a month ago
  2. JEvents 1.5 Help
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
I apprecaite the reply and the code. Unfortuently, it is still not working.

Your line numbers slightly vary from mine. But using yours as a guide, here is where the two codeblocks were placed:

function _sortEventsByDate($a, $b)
actual line numbers: 1350-1361
after: function processFormatString(){
before: function displayLatestEvents(){


usort($rows,array("JEventsLatest", "_sortEventsByDate";));
actual line numbers: 1175-1176
after: $rows = array_merge($rows,$icalrows);
before: $events = 0;


Here's what I did:
Added the code, and re-uploaded the new file. Went into the Admin Panel, and published the "City Event". Went to my index page (where the module is placed), and it placed it after the show like before. Should I delete and create it again?

No errors were reported.
  1. more than a month ago
  2. JEvents 1.5 Help
  3. # 3
geraint
Support Team
Accepted Answer Pending Moderation
0
Votes
Undo
Strange - I could see your problem, figured out why it arose and this change fixed it for me. Are you sure your FTP session overwrote the existing file?

Are these 2 events iCal events or old fashioned events (or a mix?)?

Geraint
JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!
  1. more than a month ago
  2. JEvents 1.5 Help
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
I am positive that the FTP upload overwrote the old file. I checked it by logging directly into CPanel, and opened the file in the online editor. Both of the new codeblocks were there.

All of my events are created with "Manage Events" under Legacy Functions.
  1. more than a month ago
  2. JEvents 1.5 Help
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.