Jevents 2.x (Free Access)

Change mod_jevents_latest module output

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 chuckt » Mon Nov 07, 2011 3:33 pm

I would like to change the output of the Latest module so that the date only shows up once in the list. If there is more than one event on a day, they will be listed under the date without the date being repeated.

example:

Nov 8, 2011
Youth Program 6:30 - 8:00pm
Band Practice 8:00
-----------------------------------------
Nov 9, 2011
Floor Hockey 8:00
-----------------------------------------
Nov 10, 2011
Men's Program 6:30 - 8:00pm
Women's Program 6:30 - 8:00pm
Trustee Meeting 7:00 - 9:00pm

I can't see a way to do this using the format string.
chuckt
 
Posts: 3
Joined: Sat Oct 08, 2011 1:33 am

Postby chuckt » Mon Nov 07, 2011 7:18 pm

Figured it out myself.

In latest.php I added the following after line 50:

Code: Select all
$sdate = htmlspecialchars($daysEvents[0]->publish_up());
$mdate = date("D, F jS", strtotime($sdate));
$content .= '<TR><TD>' . $mdate . '</TD></TR>';
chuckt
 
Posts: 3
Joined: Sat Oct 08, 2011 1:33 am

Postby Geraint » Tue Nov 08, 2011 9:11 am

Do this as a template override so you don't loose your customisations

See http://www.jevents.net/en/jevents-15-to ... jevents-15
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: 42837
Joined: Fri Feb 15, 2008 6:14 pm

Postby chuckt » Tue Nov 08, 2011 1:39 pm

I created the following directory structure:

Code: Select all
templates
   bj_venus_2
      html
         mod_jevents_latest
            alternative/latest.php
            default/latest.php


I made my changes in alternative/latest.php, but I get the following error:


Fatal error: Class name must be a valid object or a string in /home/maritime/public_html/j16/modules/mod_jevents_latest/mod_jevents_latest.php on line 108
chuckt
 
Posts: 3
Joined: Sat Oct 08, 2011 1:33 am

Postby Geraint » Wed Nov 09, 2011 11:35 am

What class name did you use in the file referred to in the error message ?
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: 42837
Joined: Fri Feb 15, 2008 6:14 pm

Postby LiliwoL » Fri Dec 02, 2011 4:10 pm

What is the name of the class to use in order to override mod_jevents_latest default template?

I used
class OverrideDefaultModLatestViewLatest extends DefaultModLatestView

but it doesn't work.

Where to find a doc? Am i forced to join the jevents club to get this documentation?

Regards
LiliwoL
Gold Members
 
Posts: 74
Joined: Fri Dec 02, 2011 4:07 pm

Postby LiliwoL » Fri Dec 02, 2011 4:28 pm

Ok i've found my bymyself...

Here is the code to override the mod_jevents_latest default template.

So you've created a file named latest.php in
YOURTEMPLATE/html/mod_jevents_latest/default/

and this latest.php starts with:
include_once(JPATH_SITE."/modules/mod_jevents_latest/tmpl/default/latest.php");

class OverrideDefaultModLatestView extends DefaultModLatestView {

Be careful with the name of the class:
OverrideDefaultModLatestView

don't forget to put the extends of the DefaultMoLatestView and more, don't forget to include the file who contains the extended class!

Regards.
LiliwoL
LiliwoL
Gold Members
 
Posts: 74
Joined: Fri Dec 02, 2011 4:07 pm


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