fetchAll();
$id = “Newsletter”;
$category = db_query(‘SELECT cid, title, block FROM {aggregator_category} WHERE title = :title’, array(‘:title’ => $id))->fetchObject();
$block[‘subject’] = check_plain($category->title);
$result = db_query_range(‘SELECT i.* FROM {aggregator_category_item} ci LEFT JOIN {aggregator_item} i ON ci.iid = i.iid WHERE ci.cid = :cid ORDER BY i.timestamp DESC, i.iid DESC’, 0, $category->block, array(‘:cid’ => $category->cid));
$output = $result -> fetchAll();
//print_r($output);
echo “
Jump to a Previous Newsletter:
“;
$counter = 0;
foreach ($output as $item) {
$counter++;
echo “
“.$item->title.”
“;
}
$counter = 0;
foreach ($output as $item) {
$counter++;
echo “
“.$item->title.”
“;
$text = $item->description;
$text = str_replace(“#6DC6DD”, “#5ca20d”, $text);
$text = str_replace(“#0000CD”, “#5ca20d”, $text);
/*
preg_match_all(“/width=\”(\d+)\” style=\”max-width: \d+.px;/”, $text, $find);
$replacements = $find[1];
$find = $find[0];
print_r($find);
for ($i=1; $i
$text = str_replace(“
$text = str_replace(““);
$substring = substr($text,strpos($text,”