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
if(isset($group)){ if(stripos($group, ',') === false){ $group =" AND group_id=".$group; }else{ $mod_params = explode(',', $group); $group =" AND group_id IN (".$mod_params[0]; for($i=1; $i<count($mod_params); $i++){ $group .=", ".$mod_params[$i]; } $group .=")"; }}else{ $group = '';}global $database, $wb;$mod_query = $database->query("SELECT title, link, content_long FROM ".TABLE_PREFIX."mod_news_posts WHERE active='1'".$group." ORDER BY RAND() LIMIT 1");$mod_list = " ";while ( $row =& $mod_query->fetchRow()){ $mod_randomQuote = explode('<!--siteQuote-->', $row["content_long"]); if(isset($mod_randomQuote[1])){ $mod_list = '<a class="siteQuote" href="'.WB_URL.PAGES_DIRECTORY.$row["link"].PAGE_EXTENSION.'" '; $mod_list .= 'title="'.$row["title"].'">'; $mod_list .= $mod_randomQuote[1]; $mod_list .= '</a>'; }}return $mod_list;
hi Kontrax,your Droplets are great!i've tested both!This one is a very goog idea! Just a few hints1. is it possible to get random texts from all groups per default?2. is it possible to set the css for this a href of the linked quote you can put the css in the template like in the droplet Showad? then the Linkformats are different from the template link and can styled in the droplet itself not in the template css... i don't know if this make sense?I've set up a quick and dirty testpage online with a few entries in some news it works very well!regards martin