My Subscriptions

No active or expired subscriptions. View Available Subscriptions

Advanced Search

Home arrow Forum arrow Extensionsarrow JCal Pro and JCal Clientarrow JCal Pro 1.5.x for Joomla! 1.0.xarrow SOLVED: Show past events is set to no in admin, but...
Pages: [1]
Print
Author Topic: SOLVED: Show past events is set to no in admin, but...  (Read 1060 times)
dee01
Newbie
*

Karma: +0/-0
Posts: 3


View Profile
« on: December 23, 2006, 09:29:45 AM »

Past events are still showing up!
« Last Edit: April 09, 2007, 11:36:17 PM by V-man » Logged
sargdeckeli
Newbie
*

Karma: +0/-0
Posts: 4


View Profile
« Reply #1 on: January 24, 2007, 11:09:23 AM »

I have the same problem. Any solutions ?
Logged
V-man
Administrator
Hero Member
*****

Karma: +14/-1
Posts: 2027


Ignorance is curable, stupid is forever.


View Profile
« Reply #2 on: January 28, 2007, 11:16:51 AM »

When past events are set to "No", there are no changes made to the events data or how the events are displayed. It simply prevents viewing events in the month prior to the current month. Thus, you can't scroll backward through time, even if you manually type the date in the url. As a result, past events in current month remain visible.

Are you experiencing some behaviour different from this?
Logged

*** Please read this post and the FAQs before posting in the forum. ***

Support questions via PM will be ignored. Please use
sargdeckeli
Newbie
*

Karma: +0/-0
Posts: 4


View Profile
« Reply #3 on: January 29, 2007, 04:48:45 AM »

I d'like to see no past events in the flat view. Do  you have an idea, how to do that. I have no fear to make some changes in the code. But a clue where and how to do that would be very helpfull and could save a lot of time.

Thanks for this great component.

Logged
fooz007
Newbie
*

Karma: +0/-0
Posts: 1


View Profile
« Reply #4 on: March 07, 2007, 04:25:24 AM »

I echo the above.  I had expected (assumed) that the setting "show past events" to "no" would hide all expired events, similarly to standard joomla content expiration.  Would love to see this implemented in some fashion, either globally (all events past current date do not show), by extmode, or by event (ala content expiration).

Thanks for the great ext.

PS - any thoughts on a quick hack to make this possible now?  i could always cron a mysql purge script i suppose...
Logged
raul7
Newbie
*

Karma: +0/-0
Posts: 5


View Profile
« Reply #5 on: March 19, 2007, 03:01:55 AM »

any idea on this guys? i would love to have this feature as well, on flayer view, hide all expired events, thanks
Logged
van
Sr. Member
****

Karma: +0/-0
Posts: 442


View Profile
« Reply #6 on: March 20, 2007, 10:00:08 PM »

As V-man explained, this configuration setting will keep your site users from scrolling back to previous time displays in the past, so it sounds like all you need to add is the ability to disable past events on the current views.

Here are some hacks to do this to satisfy your request ... keep in mind these are just hacks to eliminate past dates on the current display. The user could still access these events directly. A decision would have to be made to change the core functionality before a more complete solution could be provided. So, keep these hacks around, as you may have to re-apply them on your next upgrade.

But, they seem to work fine.

For flyer view, in "jcalpro.php", around line 673, change the number "1" to "$day" as indicated in red below:

Quote
   echo "<img class='miniarrow' src='$mosConfig_live_site/components/com_jcalpro/images/mini_arrowright.gif' border='0' alt='$date' />";
    echo "</a>&nbsp;</td>";
    echo "</tr>\n";

    for ($i=$day;$i<=$nr;$i++)
    {
      $date_stamp = mktime(0,0,0,$month,$i,$year);
      $events = get_events($date_stamp,$CONFIG_EXT['show_recurrent_events'],$CONFIG_EXT['show_overlapping_recurrences_flatview']);

For the monthly view, in "jcalpro.php" around line 523, change the lines in red below to look like the following:

Quote
       // 'existing' days in month
       for ($i=1;$i<=$nr;$i++) {
            $date_stamp = mktime(0,0,0,$month,$i,$year);
            $events = array();
            if( $i>=$day )
$events = get_events($date_stamp,$CONFIG_EXT['show_recurrent_events'],$CONFIG_EXT['show_overlapping_recurrences_monthlyview']);
           //$events = sort_events($events, $event_stack, $date_stamp);

For the category view, in "jcalpro.php" around line 836, change the line in red to look like the following:

Quote
         $day_pattern = sprintf("%04d%02d%02d",$today['year'],$today['month'],$today['day']); // day pattern: 20041231 for 'December 31, 2004'
         $query = "SELECT * FROM ".$CONFIG_EXT['TABLE_EVENTS'] . " AS e WHERE (DATE_FORMAT(e.start_date,'%Y%m%d') >= $day_pattern OR DATE_FORMAT(e.end_date,'%Y%m%d') >= $day_pattern OR DATE_FORMAT(e.recur_until,'%Y%m%d') >= $day_pattern) AND cat = '$cat_id' AND approved = 1 AND published = 1 ORDER BY title";
         $result = extcal_db_query($query);
Logged
erjati
Newbie
*

Karma: +0/-0
Posts: 10


View Profile
« Reply #7 on: April 09, 2007, 10:09:07 PM »

I tried applying this for just the flat/flyer view and the category view, but I wanted to leave the month view normal as I thought it would look strange to have it look like nothing happened, but when I clicked on a past event in month view I get a white page starting with the row of view buttons and then: "Template error. Failed to find block 'contact_row' in : <!-- BEGIN info_row --> followed by html code and no normal joomla page layout or images.

Upcoming event links will go to their events correctly. Is there any way to disable the url link in past events, or allow them to work right from the monthly view? I want them to at least appear in the current month view so it doesn't look strange.

I don't really expect people to click on past events, but if they were to do so, it would be nice of nothing strange happened.

Thanks.
Logged
erjati
Newbie
*

Karma: +0/-0
Posts: 10


View Profile
« Reply #8 on: April 09, 2007, 10:20:34 PM »

Had to change it all back to original code as it turns out that some but not all future events were also getting the strange page error and layout mess.

UPDATE: Backtracking I found I had "stored" some unused code in a preexisting comment from a change I made with Van's help to correct my problem with contact urls not opening the way i wanted. When I removed this stored code bit  - {CONTACT_URL_TARGET}  - from the comment the events all display correctly.
« Last Edit: April 09, 2007, 11:01:44 PM by erjati » Logged
klh
Newbie
*

Karma: +0/-0
Posts: 11


View Profile
« Reply #9 on: June 14, 2007, 09:16:25 PM »

This hack worked for me in 1.5.3, removed my old events from the "categories" view and from "flat" view.

I don't mind the old events in the Month view.

Awesome!!!
Logged
red26
Newbie
*

Karma: +0/-0
Posts: 1


View Profile
« Reply #10 on: May 07, 2008, 05:44:34 PM »

Worked in 1.5.3!!! THANK YOU!!! Grin
Logged
Pages: [1]
Print
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com

Original Joomla Template design by RocketTheme ( Conversion by Bloc)

 



Mailing List Subscriptions

Use the form below to Subscribe or Unsubscribe to the Anything-Digital.com mailing lists.

Note that both Subscribe and Unsubscribe actions will require confirmation via e-mail.

 

E-mail Address: (required)
First Name: (required)
Last Name: (required)
Select List(s): JCal Pro Mailing List
Advanced Search Mailing List
JContent Subscription Mailing List
Exposé Mailing List
Choose Action: Subscribe
UnSubscribe
 

 



RSS News Feeds