11) { $h = 1; } if ($h == 1) { $title = "The Dashhacks Network"; $base = "http://www.dashhacks.com"; } if ($h == 2) { $title = "Hack your Apple iPhone, iPad and iPod!"; $base = "http://www.dashhacks.com/iphone.html"; } if ($h == 3) { $title = "Kinect Hacks"; $base = "http://www.dashhacks.com/kinect.html"; } if ($h == 4) { $title = "PS3-Hacks :: Hack your PlayStation 3"; $base = "http://www.dashhacks.com/ps3.html"; } if ($h == 5) { $title = "PSP-Hacks: Hack your PlayStation Portable"; $base = "http://www.dashhacks.com/psp.html"; } if ($h == 6) { $title = "PS Vita-Hacks: Hack your PlayStation Vita"; $base = "http://www.dashhacks.com/ps-vita.html"; } if ($h == 7) { $title = "Xbox360-Hacks :: Hack your Xbox 360"; $base = "http://www.dashhacks.com/xbox-360.html"; } if ($h == 8) { $title = "Wii U-Hacks :: Hack your Wii U"; $base = "http://www.dashhacks.com/wii-u.html"; } if ($h == 10) { $title = "PS4-Hacks :: Hack your PlayStation 4"; $base = "http://www.dashhacks.com/ps4.html"; } if ($h == 11) { $title = "Xbox-One-Hacks :: Hack your Xbox One"; $base = "http://www.dashhacks.com/xbox-one.html"; } dostart($title, $base); $ptitle = $title; $dt = date("Y-m-d H:i:s"); $sec = ""; if ($h > 1) { $sec = "and sectionid = $h"; } $dt = date('Y-m-d H:i:s', mktime(date("H")+4, date("i"), date("s"), date("m") , date("d"), date("Y"))); $sql = "select * from jos_content where state=1 $sec and (publish_up <= '$dt' or publish_up = '0000-00-00 00:00:00') order by created desc, publish_up desc limit 20"; //echo "SQL: $sql
"; $database->setQuery($sql); $rows = $database->loadObjectList(); for ($a=0;$acreated; $title = $row->title; $desc = $row->introtext; $id = $row->id; $cat = $row->catid; $sec = $row->sectionid; $alias = $row->alias; $alias = str_replace(".","",$alias); $sefchk = "index.php?option=com_content&catid=$cat&id=$id&view=article"; $sql = "select * from jos_acesef_urls where url_real = '$sefchk'"; $database->setQuery($sql); $srows = $database->loadObjectList(); if (count($srows) > 0) { $srow=$srows[0]; $moo = $srow->url_sef; $newurl = "http://www.dashhacks.com/" . $moo; } else { $sql = "select alias from jos_categories where id = $cat"; $database->setQuery($sql); $catalias = $database->loadResult(); $sql = "select alias from jos_sections where id = $sec"; $database->setQuery($sql); $secalias = $database->loadResult(); $newurl = "http://www.dashhacks.com/$secalias/$catalias/$alias.html"; } $img = "/" . $row->images; $w = 200; $h = 142; if ($img == "/") { $img = "/img/dh.png"; $w = 180; $h = 180; } $img = "http://www.dashhacks.com" . $img; // pre-process teaser //echo "desc: $desc

"; $title = strtr ($title,chr(10),chr(32)); $title = str_replace(chr(180), "", $title); $title = str_replace(chr(237), "", $title); $title = str_replace(chr(31), "", $title); $title = str_replace(chr(146), "", $title); $title = str_replace(chr(147), "", $title); $title = str_replace(chr(148), "", $title); $desc = strtr ($desc,chr(10),chr(32)); $desc = str_replace(chr(180), "", $desc); $desc = str_replace(chr(237), "", $desc); $desc = str_replace(chr(31), "", $desc); $desc = str_replace(chr(146), "", $desc); $desc = str_replace(chr(147), "", $desc); $desc = str_replace(chr(148), "", $desc); $desc = strip_tags($desc); // . $title; if (str_word_count($desc) > 35) { $desc = wordLimit($desc, 35); } $link = $newurl; //$desc = "" . $desc; doitem($title, $link, $longdate, $desc, "", ""); } doend(); // =============================================================================== function dostart($title, $baseurl) { echo ''; $longdate = date("D, d M Y H:i:s O"); ?> <? echo $title; ?> en JamRSS 1 Read Full Article"; ?> <![CDATA[<? echo $title; ?>]]> ]]> = $i) { $string .= $explode[$i]." "; } } return $string.$dots; } // =============================================================================== ?>