WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
<?php// query to obtain news items for the selected group$post_intervall = time() - (1 * 24 * 3600); // allow post from now - 1 day * 24h * 60m * 60sif ($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;";}?>
<script type="text/javascript">var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?var copyspeed=marqueespeedvar pausespeed=(pauseit==0)? copyspeed: 0var actualheight=''function scrollmarquee(){if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"elsecross_marquee.style.top=parseInt(marqueeheight)+8+"px"}function initializemarquee(){cross_marquee=document.getElementById("vmarquee")cross_marquee.style.top=0marqueeheight=document.getElementById("marqueecontainer").offsetHeightactualheight=cross_marquee.offsetHeightif (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exitcross_marquee.style.height=marqueeheight+"px"cross_marquee.style.overflow="scroll"return}setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)}if (window.addEventListener)window.addEventListener("load", initializemarquee, false)else if (window.attachEvent)window.attachEvent("onload", initializemarquee)else if (document.getElementById)window.onload=initializemarquee</script>
#marqueecontainer{text-align: left;height: 180px;width: 150px;position: relative;background-color: #E94747;/* d31515 */overflow: hidden;border: 1px solid Maroon;padding: 2px;}
echo "Heutiger Auszug aus dem Veranstaltungskalender<br>";echo "<div id=\"marqueecontainer\" onMouseover=\"copyspeed=pausespeed\" onMouseout=\"copyspeed=marqueespeed\"><div id=\"vmarquee\" style=\"position: relative; width: 98%;\">";$datum = date("Y-m-d");$get_page = 2; // change to your page_id you needglobal $database;$query = "SELECT * FROM `".TABLE_PREFIX."mod_event_dates` WHERE page_id = '$get_page' && date = '$datum' ORDER BY date DESC LIMIT 0, 5;";$error = mysql_error();if (!$result = mysql_query($query)) {print "$error";exit;}while($data = mysql_fetch_object($result)){$eventsgefunden=1;$page_id = $data->page_id;$date = $data->date;$event_longdesc = $data->event_longdesc;$event_desc = $data->event_desc;echo "<u>".$date."</u><br>".$event_desc;echo "<div align=\"right\">".$event_longdesc."</div><br><br><br>";}if(!isset($eventsgefunden)) { echo "Heute finden leider keine Veranstaltungen statt";}echo "</div></div><div style=\"font-size:9px;\">Maus zum stoppen über Text bewegen</div><br>";
<head>....<?php $page_id = PAGE_ID; if ($page_id==3) { ?><script .......</script><? } ?></head>
$termine = array();$query = "SELECT event_desc, event_longdesc, DATE_FORMAT(date,'%d.%m.%y') as date_formated FROM ".TABLE_PREFIX."mod_event_dates WHERE date >= NOW() AND event_desc NOT LIKE '' ORDER BY date LIMIT 0, 5";$result = mysql_query($query);if(!empty($result)){while($data = mysql_fetch_assoc($result)){ $termine[] = $data;}if(!empty($termine)){?><div id="termine"><fieldset><legend>Termine...</legend><br /><? foreach($termine as $termin){ ?><div style="border-bottom:1px solid #cccccc;"><strong>Am <?=$termin['date_formated']?></strong><p><?=$termin['event_desc']?></p><p><?=$termin['event_longdesc']?></p></div><? } ?></fieldset></div><?}}
Oh - wait - does it matter which calendar is this for? Do they all use the same database? I'm using EventCalendar by Keijo Karvonen v1.1.1
It is not difficult to change this to use any of the calendars, you just need to know what database table and fields to modify in the snippets.I use a modified version of the Calendar by David ilicz Klementa, and took me five minutes to look up in my database and figure out which fields to change.