function output_newsflash(&$row, &$params, &$access) { global $mainframe; $row->text = $row->introtext; $row->groups = ''; $row->readmore = trim($row->fulltext) != ''; $row->metadesc = ''; $row->metakey = ''; $row->access = ''; $row->created = ''; $row->modified = ''; HTML_content::show($row, $params, $access, 0); }
} echo "</tr>\n</table>\n"; break; case 'vert': foreach ($rows as $id) { $row->load($id); $row->text = $row->introtext; if ($image == 0) { $row->text = preg_replace('/\\<img[^>]+\\>/i', '', $row->text); } $row->groups = ''; HTML_content::show($row, $params, $access, 0, 'com_content'); } break; case 'flash': default: if ($numrows > 0) { srand((double) microtime() * 1000000); $flashnum = $rows[rand(0, $numrows - 1)]; } else { $flashnum = 0; } $row->load($flashnum); $row->text = $row->introtext; if ($image == 0) { $row->text = preg_replace('/\\<img[^>]+\\>/i', '', $row->text); } $row->groups = ''; HTML_content::show($row, $params, $access, 0, 'com_content'); break; }
//$Itemid = $mainframe->getItemid( $row->id, 0, 0, $bs, $bc, $gbs ); $query = "SELECT id" . "\n FROM #__menu" . "\n WHERE " . "\n link LIKE '%task=section&id=" . $row->sectionid . "%'" . "\n OR link LIKE '%sectionid=" . $row->sectionid . "%'"; $database->setQuery($query); $Itemid = $database->loadResult(); break; } // Blank itemid checker for SEF /* if ($Itemid == NULL) { $Itemid = ''; } else { $Itemid = '&Itemid='. $Itemid; } */ $link = sefRelToAbs('index.php?option=com_content&task=view&id=' . $row->id . $Itemid); echo "<td valign=top>\n"; //echo '<a href="'.$link.'">'.$row->title.'</a>'."\n"; $newrow->load($row->id); $newrow->text = $newrow->introtext; $newrow->groups = ''; $ItemidCount = array('bc' => $bc, 'bs' => $bs, 'gbs' => $gbs); //$params->set( 'readmore', 0 ); HTML_content::show($newrow, $params, $access, 0, 'com_content', $ItemidCount); //print_r($ItemidCount); //echo '<a class="readon" href="'.$link.'">Read More..</a>'."\n"; echo "</td>\n"; } echo "</tr>\n</table>\n"; break; } }