Topic: Forum Description
Just sharing this with some of you
this modification is rather simple and what it does is add a forum description block to viewforum.php depending on whether or not a description is set.
Add this to viewforum.php:
if($cur_forum['forum_desc'] != '')
$forum_description = '<div class="block"><h2><span>Forum Description</span></h2><div class="box"><div style="margin: 3px" class="inbox"><strong>'.$cur_forum['forum_name'].':</strong> '.$cur_forum['forum_desc'].'</div></div></div>';
else
$forum_description = '';
Find this query:
$result = $db->query('SELECT f.forum_name, f.redirect_url, f.moderators, f.num_topics, f.sort_by, fp.post_topics FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$id) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error());
Add this to the query:
f.forum_desc,
Find these lines:
<div class="linkst">
<div class="inbox">
<p class="pagelink conl"><?php echo $paging_links ?></p>
<?php echo $post_link ?>
<ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
<div class="clearer"></div>
</div>
</div>
Before these lines add this line:
<?php echo $forum_description ?>
As a result to the following step above you should have something like this:
<?php echo $forum_description ?>
<div class="linkst">
<div class="inbox">
<p class="pagelink conl"><?php echo $paging_links ?></p>
<?php echo $post_link ?>
<ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
<div class="clearer"></div>
</div>
</div>
That should be it let me know if you encounter any problems and i will see what steps i have missed.