display todays events from event-calender on frontpage

doc

Hello,

you need to add one more query statement to the display news anywhere snippet to achieve what you want. Replace the code lines in the include.php file with the code posted below (without <?php and ?>).

<?php
// query to obtain news items for the selected group
$post_intervall time() - (24 3600);  // allow post from now - 1 day * 24h * 60m * 60s
if ($group_id 1) {
  
$query "SELECT * FROM " .TABLE_PREFIX ."mod_news_posts WHERE active=1 AND (posted_when > $post_intervall) ORDER BY position DESC LIMIT 0, $max_news_items;";
} else {
  
$query "SELECT * FROM " .TABLE_PREFIX ."mod_news_posts WHERE group_id=$group_id AND active=1 AND (posted_when > $post_intervall) ORDER BY position DESC LIMIT 0, $max_news_items;";
}
?>



Regards Christian

Olli


kweitzel

OK ... have a close look at the database tables where you pull the data from ... I think, that is the main difference to the news script.

cheers

Klaus

Olli

hi klaus,
i deleted it because of the time i wasted. and it wasn't working so nothing is lost... ;-)
but i will start over and post it here then. hopefully it will work then at once.

bye

kweitzel

Why don't you post your code and we can see what is going wrong ...

cheers

Klaus

Olli

hello everybody,
this morning i tried to get a code snippet (based on the "display-news-anywhere-snippet") working to display todays events from the eventcalender module on the frontpage...

unfortunately i did not succeed  :-(

has anyone of you ever adapted this snippet to the eventcalender and might help me out?
maybe it's the weathers fault... it's too hot to concentrate on this for proper results ;-)

bye