foreach ($posts as $post) echo ' <tr> <td valign="top"> <div class="banner_area_recent_topics_topic_title"><a class="banner_area_recent_topics_topic_title" href="', $post['href'], '">', $post['subject'], '</a></div> </td> <td align="right" nowrap="nowrap" class="banner_area_recent_topics_time">  <small>', $txt['by'], ' ', $post['poster']['link'], '</small> <small>', $post['time'], '</small> </td> </tr>';
foreach ($posts as $post){ if(!empty($posts)) { echo ' <tr> <td valign="top"> <div class="banner_area_recent_topics_topic_title"><a class="banner_area_recent_topics_topic_title" href="', $post['href'], '">', $post['subject'], '</a></div> </td> <td align="right" nowrap="nowrap" class="banner_area_recent_topics_time">  <small>', $txt['by'], ' ', $post['poster']['link'], '</small> <small>', $post['time'], '</small> </td> </tr>'; } else { <tr> <td valign="top"> No new Threads </td> </tr> }}
The file you tried to save generated the following error:Parse error: syntax error, unexpected '<' in index.template.php on line 681
foreach ($posts as $post){ if(!empty($posts)) { echo ' <tr> <td valign="top"> <div class="banner_area_recent_topics_topic_title"><a class="banner_area_recent_topics_topic_title" href="', $post['href'], '">', $post['subject'], '</a></div> </td> <td align="right" nowrap="nowrap" class="banner_area_recent_topics_time">  <small>', $txt['by'], ' ', $post['poster']['link'], '</small> <small>', $post['time'], '</small> </td> </tr>'; } else { echo ' <tr> <td valign="top"> No new Threads </td> </tr> '; }}
// Just return it. if ($output_method != 'echo' || empty($posts)) return $posts; echo ' <table border="0" class="ssi_table recent_topics_ssi_table">'; foreach ($posts as $post) echo ' <tr> <td valign="top"> <div class="banner_area_recent_topics_topic_title"><a class="banner_area_recent_topics_topic_title" href="', $post['href'], '">', $post['subject'], '</a></div> </td> <td align="right" nowrap="nowrap" class="banner_area_recent_topics_time">  <small>', $txt['by'], ' ', $post['poster']['link'], '</small> <small>', $post['time'], '</small> </td> </tr>'; echo ' </table>'; echo ' <center> <div class="recent_posts_link_banner_area"> <a href="', $scripturl ,'?action=recent"><small>::ALL RECENT POSTS::</small></a> </div> </center> ';
// vp $stop_the_recent_posts_in_its_tracks = false; if(!empty($posts)) { $stop_the_recent_posts_in_its_tracks = true; } if($stop_the_recent_posts_in_its_tracks == true) { // Just return it. if ($output_method != 'echo' || empty($posts)) return $posts; echo ' <table border="0" class="ssi_table recent_topics_ssi_table">'; foreach ($posts as $post) { echo ' <tr> <td valign="top"> <div class="banner_area_recent_topics_topic_title"><a class="banner_area_recent_topics_topic_title" href="', $post['href'], '">', $post['subject'], '</a></div> </td> <td align="right" nowrap="nowrap" class="banner_area_recent_topics_time">  <small>', $txt['by'], ' ', $post['poster']['link'], '</small> <small>', $post['time'], '</small> </td> </tr>'; } echo ' </table>'; echo ' <center> <div class="recent_posts_link_banner_area"> <a href="', $scripturl ,'?action=recent"><small>::ALL RECENT POSTS::</small></a> </div> </center> '; } else { echo ' <table border="0" class="ssi_table recent_topics_ssi_table"> <tr> <td valign="top"> No new Threads </td> </tr> </table> '; }
You should make it default, so other people dont have problems! I have mine saying "Sorry, no new Threads" and have it centered. "http://www.forum.hostellroleplay.net/index.php"
You probably just messed up the edits.... Try this one:http://pastebin.com/VrirRzh4
Thank you. I added the file from pastebin. I got the index to show "No new threads" but not actually show any new threads. Any ideas?