Second issue...
Here's my $output code:
// format the news listing for display
$output .= "
<li>
<h3>".$rs[$x]['pagetitle']."</h3>
<blockquote>
".$rest."
</blockquote>
<cite>".$author."".$username."</cite>
<p>".strftime($date_time_format, $rs[$x]['createdon'] + $server_offset_time)."</p>
<a href=\"[~".$rs[$x]['id']."~]\">".$more."</a>
</li>";
}
}
// display list of links to older news articles
if(($limit > $numListings) && ($numListings < $maxListings)) {
$output .= "".$olderNews."";
for ($x = $numListings; $x < $limit; $x++) {
$output .= "<li><a href=\"[~".$rs[$x]['id']."~]\">".$rs[$x]['pagetitle']."</a></li>";
}
}
I'd like a function that will allow me to put <ol> & </ol> tags at the beginning and end of these lists. Adding it to the $output variable just makes each list item its own list, which is pointless.
How do I do this?
Third issue ...
How can I specify a date range for the list, i.e. only list documents updated in the last week, as opposed to just a particular date or a particular number of listings?
Fourth issue ... ListDocuments doesn't seem to grab all of the html tags associated with the beginning of the document. It's just printing the text without enclosing it in the appropriate tags. This is causing my browser to throw html errors. I can't just add <p> tags to the snippet because not everything that starts the document would work with <p> tags. On the other hand, it seems to work fine with other pages. Here's an example of the output I'm getting:
<ol>
<li>
<h3>Youth Activities</h3>
<blockquote>
The Cause Youth Convention:
Dates: Thursday April 9th and Friday April 10th
Locati …
</blockquote>
<cite>Posted by: Miss Debbie</cite>
<p>2009-02-24</p>
<a href="youth_activities.php">Read more »</a>
</li>
</ol>
<ol>
<li>
<h3>Pizza Party</h3>
<blockquote>
A Pizza Party will be held Friday, March 6th at 5:30 p.m. at Pastor Ron's house in Olyphant.
Dire …
</blockquote>
<cite>Posted by: Webmaster</cite>
<p>2009-02-17</p>
<a href="pizza.php">Read more »</a>
</li>
</ol>
<ol>
<li>
<h3>Pastor</h3>
<blockquote>
Pastor Ron Liples comes to the pulpit of Cross Road Assembly with a wide range of education and ex …
</blockquote>
<cite>Posted by: Webmaster</cite>
<p>2009-02-12</p>
<a href="pastor.php">Read more »</a>
</li>
</ol>
<ol>
<li>
<h3>News Archive</h3>
<blockquote>
<p>Archived list of old news items</p>
</blockquote>
<cite>Posted by: Webmaster</cite>
<p>2009-01-28</p>
<a href="news-archive.php">Read more »</a>
</li>
</ol>
<ol>
<li>
<h3>RSS</h3>
<blockquote>
<p>Form to subscribe to RSS service</p>
<p>What's RSS?</p>
</blockquote>
<cite>Posted by: Webmaster</cite>
<p>2009-01-28</p>
<a href="rss.php">Read more »</a>
</li>
</ol>
As you can see, some of the list items have text just floating there with no tags, while others have tags. How do I fix this?
Thanks,
Dan
Edited by danlanphear, 25 February 2009 - 02:16 AM.