Jevents 2.x (Free Access)

Search: not show all event repetions

Discuss JEvents 2.x for Joomla 1.5-2.5 here - club members can use the special club forum for faster response times.
Forum rules
When requesting support please follow these steps:

1. Update all JEvents add on's first, via the Joomla! Updater
2. Copy and Paste the JEvents Support Information from the JEvents Control Panel.
3. If you get a 500 error OR white page, enable Maximum Error Reporting in Joomla! Global Config and visit the page again, this should give you a more detailed error and help us provide a prompt response.

Postby mitia » Tue Oct 25, 2011 8:42 am

Hi,
I'd like to know if it's possible to show all event repetions and not the first one when you search an event.
I'm using jevents v2.0.4 and plugin search.
Thanks a lot

Mitia
mitia
 
Posts: 2
Joined: Tue Oct 11, 2011 10:00 am

Postby Geraint » Tue Oct 25, 2011 10:24 am

The code is designed get the next occurring repeat - many sites would get thousands of results if all the repeats were to show.
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: 42795
Joined: Fri Feb 15, 2008 6:14 pm

Postby mitia » Tue Oct 25, 2011 10:38 am

Hi Geraint, thanks for your answer. I understand the problem of having hundreds of views,this could be not suitable in some case.
If the search shows only the name of the event and no other data (day and time) do you think it is more convenient to display? the user will find the event he is looking for and does not fall into ambiguity on times and days.

I hope that my English is clear enough
mitia
 
Posts: 2
Joined: Tue Oct 11, 2011 10:00 am

Postby axisStudios » Fri Aug 31, 2012 8:45 pm

Hi,

Using the events search built into jevents ( not the search plugin ) and the search results is returning ALL repeats - not just the NEXT repeat.
I'm not finding settings specific to the search view. In the JEvents config Component tab setting 'Event search type' is set to 'MySQL Regular Expression search' and the 'Year/Category view' tab 'Show All Repeat Events in List' is set to 'no'.
Is there a specific config setting to display only the next repeat? And where in the code is the control for displaying only the next repeat?

This forum post addresses the opposite problem that I'm running into:
viewtopic.php?f=29&t=11413&p=55063&hilit=repeats+search+results#p55063

Thanks,
Diane

Code: Select all
Joomla : 2.5.6
component_com_jevents : 2.2.5
component_com_jevlocations : 2.0.14
module_mod_jevents_dynamiclegend : 1.1.0
module_mod_jevents_latest : 2.2.4
module_mod_jevents_legend : 2.2.3
plugin_extensions_joomlalinks : 2.0.0beta1 (not enabled)
plugin_jevents_jevcustomfields : 1.3.5
plugin_jevents_jevfacebook : 1.3.5 (not enabled)
plugin_jevents_jevfeatured : 1.1.1 (not enabled)
plugin_jevents_jevfiles : 1.6.0
plugin_jevents_jevlocations : 2.0.15
plugin_jevents_jevmetatags : 1.0.1
plugin_jevents_jevsendfb : 1.0 (not enabled)
plugin_jevents_jevtimelimit : 1.5.5
plugin_search_jevlocsearch : 1.5.5 (not enabled)
axisStudios
Gold Members
 
Posts: 59
Joined: Tue Jun 19, 2012 4:30 pm

Postby Tonyp » Sat Sep 01, 2012 6:12 am

Hello,

I do not beleive so, if you want to see the next repeat go to event detail and click the link to the next repeat.

Regards
Tony
---------------------------------------
Feel free to PM me if you would like Custom Installs or Joomla! related work for a competitive quote.

User avatar
Tonyp
Team Staff
 
Posts: 23674
Joined: Tue Oct 12, 2010 9:12 pm
Location: Isle of Man

Postby Geraint » Mon Sep 03, 2012 8:27 am

When I do this search I get one repeat (unless some of the repeats have been edited in which case I get these too).

Are you getting all the repeats returned?
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: 42795
Joined: Fri Feb 15, 2008 6:14 pm

Postby axisStudios » Tue Sep 04, 2012 4:19 pm

Hi Geraint. Yes - all repeats of an event are returned. It does appear that if an event's repeats have not been edited - then only the next repeat is returned, while if an event's repeats have been edited then all the repeats are returned. Is there any way to change that behavior - so that only the next repeat of the event lists in the search results - even if it has been edited?
Diane
axisStudios
Gold Members
 
Posts: 59
Joined: Tue Jun 19, 2012 4:30 pm

Postby Geraint » Wed Sep 05, 2012 11:27 am

You would need to 'hack' the code to do this. edit the file components/com_jevents/libraries/dbmodel.php and at line c. 2731 you should see this code
Code: Select all
      $query = "SELECT DISTINCT det.evdet_id FROM  #__jevents_vevdetail as det"
            . "\n LEFT JOIN #__jevents_repetition as rpt ON rpt.eventdetail_id = det.evdet_id"
            . "\n LEFT JOIN #__jevents_vevent as ev ON ev.ev_id = rpt.eventid"
            . "\n LEFT JOIN #__jevents_icsfile as icsf ON icsf.ics_id=ev.icsid"
            . $extrajoin
            .$catwhere
            . "\n  AND icsf.state=1 AND icsf.access " . (version_compare(JVERSION, '1.6.0', '>=') ? ' IN (' . JEVHelper::getAid($user) . ')' : ' <=  ' . JEVHelper::getAid($user))
            . "\n AND ev.access " . (version_compare(JVERSION, '1.6.0', '>=') ? ' IN (' . JEVHelper::getAid($user) . ')' : ' <=  ' . JEVHelper::getAid($user))
      ;
      $query .= " AND ";
      $query .= $searchpart;
      $query .= $extrawhere;
      $query .= $having;
      $query .= "\n ORDER BY rpt.startrepeat ASC ";
      $query .= "\n $limitstring";
replace it with
Code: Select all
      $query = "SELECT DISTINCT det.evdet_id FROM  #__jevents_vevdetail as det"
            . "\n LEFT JOIN #__jevents_repetition as rpt ON rpt.eventdetail_id = det.evdet_id"
            . "\n LEFT JOIN #__jevents_vevent as ev ON ev.ev_id = rpt.eventid"
            . "\n LEFT JOIN #__jevents_icsfile as icsf ON icsf.ics_id=ev.icsid"
            . $extrajoin
            .$catwhere
            . "\n  AND icsf.state=1 AND icsf.access " . (version_compare(JVERSION, '1.6.0', '>=') ? ' IN (' . JEVHelper::getAid($user) . ')' : ' <=  ' . JEVHelper::getAid($user))
            . "\n AND ev.access " . (version_compare(JVERSION, '1.6.0', '>=') ? ' IN (' . JEVHelper::getAid($user) . ')' : ' <=  ' . JEVHelper::getAid($user))
      ;
      $query .= " AND ";
      $query .= $searchpart;
      $query .= $extrawhere;
      $query .= $having;
      $query .= "\n GROUP BY ev.ev_id  ";
      $query .= "\n ORDER BY rpt.startrepeat ASC ";
      $query .= "\n $limitstring";
and it should do what you want.

The reason we show the repeat exceptions is so that you can see special repeats like a christmas special or a different starting time straight away in the search results.
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: 42795
Joined: Fri Feb 15, 2008 6:14 pm

Postby axisStudios » Thu Sep 06, 2012 9:19 pm

Geraint,
Perfect - that did it!
Thanks so much,
Diane
axisStudios
Gold Members
 
Posts: 59
Joined: Tue Jun 19, 2012 4:30 pm

Postby Geraint » Fri Sep 07, 2012 8:38 am

Remember to make a note of the customisation so you can re-do it when you upgrade JEvents.
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: 42795
Joined: Fri Feb 15, 2008 6:14 pm

Next

Return to Jevents 2.x (Free Access)

  • Who is online
  • View new posts
  • View unanswered posts
  • In total there are 0 users online :: 0 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: No registered users