From RNWiki
Revision as of 21:47, 10 January 2012 by JakeC (talk | contribs) (Add Sub-Forums to PHPBB Forums)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Home>Recipes

This page will eventually become the contents for finding key RavenNuke™ "recipes" (How TO's).

Add Sub-Forums to PHPBB Forums

In RN 2.50.00 the core file edits will be included in the distribution. If you would like to install sub-forums on a RN 2.40.x site see the following forum thread for a link to download the files. Theme edits for themes that are included in the distribution have been included in the download. The templates edits listed below are only for third party themes.

http://www.ravenphpscripts.com/postt18866.html

This can probably be installed on a RN 2.3X site. It has not been tested on a RN 2.3X site, and no support will be offically given.

#
#-----[ OPEN ]------------------------------------------------
#
   /templates/subSilver/index_body.tpl  You must also add this to
   themes/YOURTHEME/forums/index_body.tpl


#
#-----[ FIND ]------------------------------------------------
#

</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>


#
#-----[ REPLACE WITH ]------------------------------------------------
#
	  </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span>
	  <!-- BEGIN switch_attached_forums -->
	  <!-- BEGIN br -->
	  <br />
	  <!-- END br -->
	  <span class="genmed">{catrow.forumrow.switch_attached_forums.L_ATTACHED_FORUMS}:
	       <!-- BEGIN attached_forums -->
	        <a class="nav" href="{catrow.forumrow.switch_attached_forums.attached_forums.U_VIEWFORUM}"><img alt="{catrow.forumrow.switch_attached_forums.attached_forums.L_FORUM_IMAGE}" border="0" src="{catrow.forumrow.switch_attached_forums.attached_forums.FORUM_IMAGE}" title="{catrow.forumrow.switch_attached_forums.attached_forums.L_FORUM_IMAGE}" />{catrow.forumrow.switch_attached_forums.attached_forums.FORUM_NAME}</a>
	       <!-- END attached_forums -->
	  </span>
	  <!-- END switch_attached_forums -->
</td>
#
#-----[ OPEN ]------------------------------------------------
#
   /templates/subSilver/viewforum_body.tpl  You must also add this to
   themes/YOURTHEME/forums/viewforum_body.tpl

#
#-----[ FIND ]------------------------------------------------
#

	  <td align="left" valign="middle" class="nav" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>

#
#-----[ REPLACE WITH ]------------------------------------------------
#

	  <td align="left" valign="middle" class="nav" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>

	  	  <!-- BEGIN switch_parent_link -->
	  	   -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a>
	  	  <!-- END switch_parent_link -->
 -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>

#
#-----[ FIND ]------------------------------------------------
#
   <table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

<!-- BEGIN switch_attached_list -->
   <br />
   <table width="100%" border="0" cellpadding="4" cellspacing="1" class="forumline">
     <tr>
		<th colspan="2" class="thCornerL" height="15" nowrap="nowrap"> {switch_attached_list.L_ATTACHED_FORUM} </th>
		<th width="50" class="thTop" nowrap="nowrap"> {switch_attached_list.L_ATTACHED_TOPICS} </th>
		<th width="50" class="thTop" nowrap="nowrap"> {switch_attached_list.L_ATTACHED_POSTS} </th>
		<th width="50" class="thTop" nowrap="nowrap"> {switch_attached_list.L_LAST_POST} </th>
     </tr>
	<!-- BEGIN switch_attached_present -->
	<tr>
		<td class="row1" align="center" valign="middle" height="38" width="50"><img src="{switch_attached_list.switch_attached_present.FORUM_FOLDER_IMG}" width="46" height="25" alt="{switch_attached_list.switch_attached_present.L_FORUM_FOLDER_ALT}" title="{switch_attached_list.switch_attached_present.L_FORUM_FOLDER_ALT}" /></td>
		<td class="row1" width="75%"><span class="topictitle"><a class="forumlink" href="{switch_attached_list.switch_attached_present.U_VIEWFORUM}">{switch_attached_list.switch_attached_present.FORUM_NAME}</a></span><br /><span class="genmed">{switch_attached_list.switch_attached_present.FORUM_DESC}</span></td>
		<td class="row2" align="center" valign="middle"><span class="gensmall">{switch_attached_list.switch_attached_present.TOPICS}</span></td>
		<td class="row2" align="center" valign="middle"><span class="gensmall">{switch_attached_list.switch_attached_present.POSTS}</span></td>
		<td class="row2" align="center" nowrap="nowrap" valign="middle"><span class="gensmall">{switch_attached_list.switch_attached_present.LAST_POST_ID}</span></td>
	</tr>
	<!-- END switch_attached_present -->
   </table>
   <br />
<!-- END switch_attached_list -->

NOTE: You may have to adjust the icon size "height="38" width="50" to suite your theme.
Several lines below the above added code there should bea line with the proper dimensions
#
#-----[ FIND ]------------------------------------------------
#
	  <td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>

#
#-----[ REPLACE WITH ]------------------------------------------------
#
	  <td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
	  	  <!-- BEGIN switch_parent_link -->
	  	   -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a>
	  	  <!-- END switch_parent_link -->
 -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a></span></td>
#
#-----[ OPEN ]------------------------------------------------
#
   /templates/subSilver/viewtopic_body.tpl  You must also add this to
   themes/YOURTHEME/forums/viewtopic_body.tpl

###############
#-----[ FIND ]------------------------------------------------
#
	<td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
	  -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>

#
#-----[ REPLACE WITH ]------------------------------------------------
#
	<td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>

	  	  <!-- BEGIN switch_parent_link -->
 -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a>
	  	  <!-- END switch_parent_link -->
 -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
#
#-----[ FIND ]------------------------------------------------
#
	<td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
	  -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>


#
#-----[ REPLACE WITH ]------------------------------------------------
#
	<td align="left" valign="middle" width="100%"><span class="nav">   <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
	  	  <!-- BEGIN switch_parent_link -->
	  -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a>
	  	  <!-- END switch_parent_link -->
	  -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
#
#-----[ OPEN ]------------------------------------------------
#
   /templates/subSilver/posting_body.tpl   You must also add this to
   themes/YOURTHEME/forums/posting_body.tpl

#
#-----[ FIND ]------------------------------------------------
#
<td align="left"><span  class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a>
#
#-----[ AFTER, ADD ]------------------------------------------------
#
	  	  <!-- BEGIN switch_parent_link -->
	  -> <a class="nav" href="{PARENT_URL}">{PARENT_NAME}</a>
	  	  <!-- END switch_parent_link -->