Customize Module Display

  • wdollar
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 5 months ago - 14 years 5 months ago #5095 by wdollar
Customize Module Display was created by wdollar
I need the output for the upcoming events module to be formatted / display the following:

City, State
Date
Location

I have located the template, but I don't know how to go about calling the location and echoing the city / state for output. I also need to know how to echo just the name of the venue.

Thanks in advance for the help.
Last edit: 14 years 5 months ago by wdollar. Reason: Added additional info that might help answer my questions.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #5117 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Customize Module Display
Hi

You will need to modify several places to make it works as you want .

1. First, you need to open the file modules/mod_eb_events/mod_eb_events.php, look at line #6 and change the code to :
Code:
$sql = 'SELECT a.id, a.title, a.event_date, a.category_id, b.name AS category_name, c.* FROM #__eb_events AS a LEFT JOIN #__eb_categories AS b ON a.category_id = b.id LEFT JOIN #__eb_locations AS c ON a.location_id=c.id AS WHERE a.published=1 AND event_date >= NOW() AND (cut_off_date = "'.$db->getNullDate().'" OR cut_off_date >= NOW()) ORDER BY event_date LIMIT '.$numberEvents;

(You can just download the attached file here, unzip it and upload it to modules/mod_eb_events folder)

2. In the template file(which you found already), you can use the echo command to display any information you want :

$row->city for City
$row->state for state
$row->event_date for event date
$row->name for location name

(I assume that you know alitle about PHP code ) .

Please let me know if you need more help .

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • wdollar
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 5 months ago #5119 by wdollar
Replied by wdollar on topic Re: Customize Module Display
When I make that change, it returns

"There are no up-coming events"

This is vital to the project. Any help would be appreciated.

Thanks.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #5120 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Customize Module Display
Hi

I forgot to attach file. Please get the file here .

Thanks,

Tuan

Attachment mod_eb_events.zip not found

Attachments:

Please Log in or Create an account to join the conversation.

  • wdollar
  • Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 5 months ago #5121 by wdollar
Replied by wdollar on topic Re: Customize Module Display
Perfect! You rock! Will be leaving a very positive review on the extension boards within the next few days.

Please Log in or Create an account to join the conversation.

More
14 years 5 months ago #5122 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Customize Module Display
Thanks so much. I am looking forward to receiving your review .

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc