JEvents 1.5 (No longer actively supported)

Making Featured Events

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 abbymorgan » Tue Feb 17, 2009 5:30 pm


I hope I'm posting to the correct area, if not please let me know where to post or maybe an Admin can move this post to the correct spot.

I've never edited a component before, but I'm trying now and I'd like some advice and help.

I'm attempting to add a check box to the Admin area of JEvents to mark events as "Featured". Then use a module to load the Featured events rather than the Recent Events.

I added the checkbox by copying the ALLDAY Event code and renaming the references in the code to say FEATURED instead. I also added a field to the com_events database table by copying the alldayevent field and naming it the featuredevent field.

Code: Select all
  <span style="font-weight:bold"><?php echo JText::_('JEV_EVENT_ALLDAY');?></span>
  <span><input type="checkbox" id='allDayEvent' name='allDayEvent' value='0'
                  if (($cfg->get('com_calUseStdTime') == 1 && $start_time==$end_time && $start_pm==$end_pm) ||
                  ($cfg->get('com_calUseStdTime') != 1 && $start_time==$end_time) )
                  echo "checked";
      onclick="toggleAllDayEvent();" />
  <span style="font-weight:bold"><?php echo JText::_('JEV_EVENT_FEATURED');?></span>
  <span><input type="checkbox" id='featuredEvent' name='featuredEvent' value='0' onclick="togglefeaturedEvent();" />

But now I'm at a complete loss as to what to do to get it to work. I did find the reference in the language file admin_english.php and added
Code: Select all
define("_CAL_LANG_EVENT_FEATURED","Featured Event");

Can anyone tell me what to do next? Or perhaps this can just be added as an update? I have a client who is really wanting this feature quickly and I'm just at a loss as to how to give it to them.

Thank you so much,
Abby Morgan
Posts: 6
Joined: Tue Nov 25, 2008 8:38 pm

Postby Geraint » Tue Feb 17, 2009 6:29 pm

There is already a field that can be used for 'featured' events - its the "priority" field. So there's no need to modify the core files at all.

If you then create am "onListICalEvents" query you can modify the query used to find events and restrict them to those with a suitable priority.

Also the method listIcalEvents in dbmodel.php takes $filters as an argument so you can write your own module and use this method to get the events you want. You can model the filter code on the "published", "justmine" or "category" filters built into the codebase.

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
Posts: 42781
Joined: Fri Feb 15, 2008 6:14 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: Yahoo [Bot]