JEvents 1.5 (No longer actively supported)

SOLVED - latest events module to show PAST x days inste

JEvents 2.0 was launched over 2 years ago and the latest stable version is version 2.2 which will run on Joomla 1.5 and Joomla 2.5. JEvents 1.5 is therefore no longer actively supported - you should upgrade to JEvents 2.2+ as soon as possible.
Forum rules
Please include as much detail in any test or bug reports for JEvents 1.5 as possible.

First of all, check if you are running the latest available version of Joomla! and JEvents. Posts for issues, where both systems are not updated, will be ignored.

We need the following at least:

* PHP version (e.g. 5.2.5). Note: Support for PHP4 is discontinued.
* Joomla! version
* JEvents version
* Web Server software (Apache or IIS with version number if possible)
* Server Operating system (e.g. Linux, Windows, Solaris, Darwin ...)
* Database version
* memory_limit from your phpinfo
* Web browser and version

Please enable error reporting and include any error messages in your posting. You do this via the Joomla Configuration - set "error reporting" to "maximum" on the Server tab.

Finally, please describe the steps required to recreate the problem and also please enable error reporting and give us any error messages generated.

Postby sitemaker » Thu Mar 15, 2012 1:43 pm

I've been trying to find the file where the latest events module has the logic (probably the construction of a where clause) that implements the selection mode. I want to hack or clone the module to have it show the PAST x days rather than the NEXT x days --- (a change to mode 2). For the future, I'd love to see that as an additional mode (a standard feature). But in the meantime, I need to make and maintain the hack to show the most recent event in a certain category.

I have a weekly event each Saturday, and I want the module to display the most recent one. I've tried using the mode that looks back when there's nothing in the future, and set the future to one day. But it can't work right because I can't set the number of look-ahead days to zero. So at some point each week, the module switches to the next event rather than the last.

Can someone point me where to hack? tHANKS.
sitemaker
 
Posts: 27
Joined: Sun Nov 02, 2008 10:52 pm

Postby Geraint » Thu Mar 15, 2012 2:10 pm

Did you try mode 3 and set the days to look at 4 days - it will then find the next event if its within the next 4 days otherwise fall back to the previous one which will (by definition) be 3 days in the past and hence within the 4 day limit.

Failing that there is a silver member plugin called "TimeLimit" which allows you to configure JEvents menus and modules to only show events from a date range you specify.
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!
User avatar
Geraint
 
Posts: 42848
Joined: Fri Feb 15, 2008 6:14 pm

Postby sitemaker » Thu Mar 15, 2012 10:10 pm

Yes, I explored all the existing modes and none can do it.

Mode 3 won't do the trick. If it is set as you suggested, it will show the correct (i.e., last Saturday's) event until midweek, and then show the wrong information (next Saturday's event) for the rest of the week.

I'm not familiar with "Time Limit", but it doesn't sound like it would do what I want. I do not want to limit the time frame to an absolute date range; and I do not want any other instances of the module to be affected; nor do I want the component to be affected.

I want to set up an instance of the module and then forget about it; and know that it will always show "last Saturday's event". Since there is always one event (in the relevant category) every Saturday, this amounts to looking backwards until it finds the most recent event.

The simplest thing would be to fix mode two so that it would accept negative numbers. In that case it would look back instead of forward.

I will either hack the module to add a "mode 5" that looks back, or hack the module to enhance mode 2 so that it will accept negative values; whichever is easier.

What I need to know is where (in what file) is the code that implements the selection rules implied by the modes.

Anybody know where to find it?

Thanks for your attention.
sitemaker
 
Posts: 27
Joined: Sun Nov 02, 2008 10:52 pm

Postby Geraint » Fri Mar 16, 2012 9:23 am

I misunderstood your requirement I thought you wanted the nearest instance.

Try mode 3 with 7 days limit and "Past Events Only" option enabled - you will need version 2.1 of JEvents to take advantage of this option
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!
User avatar
Geraint
 
Posts: 42848
Joined: Fri Feb 15, 2008 6:14 pm

Postby sitemaker » Fri Mar 16, 2012 9:53 pm

Many thanks!

I was running a very hacked Jevents 1.5.5f.

I have upgraded to the latest, and have re-applied all the hacks.

The new functionality in mod_jEvents_latest is exactly what I needed!

Thank you!
sitemaker
 
Posts: 27
Joined: Sun Nov 02, 2008 10:52 pm

Postby charlie445 » Fri Apr 13, 2012 8:09 pm

just wanted to say thanks, I had the same problem, guess its always the obvious solutions you miss.


thanks
charlie445
 
Posts: 1
Joined: Thu Apr 12, 2012 9:12 pm


Return to JEvents 1.5 (No longer actively supported)

  • Who is online
  • View new posts
  • View unanswered posts
  • In total there is 1 user online :: 1 registered and 0 hidden (based on users active over the past 5 minutes)
  • Most users ever online was 94 on Tue Sep 01, 2009 12:33 am
  • Users browsing this forum: Bing [Bot]