Page 1 of 3

Forum Title Link

Posted: Sun Jul 29, 2007 8:28 pm
by Extensions Robot
Modification name: Forum Title Link
Author: eviL<3
Modification description: This MOD will allow forums to be links.
Modification version: 1.0.0
Tested on phpBB version: 2.0.22

Download file: forum_title_link_1_0_0a.zip
File size: 22967 Bytes

Modification overview page: View


Selected tags:
  1. category
    1. Add-Ons
  2. complexity
    1. SQL Schema Changes
    2. Template Changes
    3. Language Changes
    4. File Edits
  3. time
    1. ~ 10 Minutes
  4. phpbb
    1. 2.0.22
Support for this modification needs to be asked within this topic. The phpBB Team is not responsible or required to give anyone support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version listed in the topic. It may not work in any other versions of phpBB.

Forum Title Link

Posted: Sun Jul 29, 2007 8:28 pm
by igorw
Modification validated/released

Notes:
Finally! The description says all, i guess :)

Re: Forum Title Link

Posted: Sun Jul 29, 2007 8:31 pm
by igorw
Thanks MOD team!

Re: Forum Title Link

Posted: Mon Jul 30, 2007 12:23 am
by ShadowKnyght
Any changes of note from the pre-release version? 0.1.1 I think it was...
http://www.phpbb.com/community/viewtopic.php?f=16

Or only adding the release information and the Subforum capabilities?
## 2007-01-21 - Version 1.0.0
## - Added license.txt :P
## - Simple subforums addon by noobarmy

As I don't use subforums... I am not sure there is any need to update mine... - please let me know though if any changes need to be incorporated for security... or other reasons.

Again great mod - thanks! :)

Re: Forum Title Link

Posted: Mon Jul 30, 2007 8:40 am
by igorw
The only change is in viewtopic.php from this:

Code: Select all

redirect(append_sid("{$phpbb_root_path}index.$phpEx", true));
to:

Code: Select all

redirect(append_sid("index.$phpEx", true));
But it should even work if you don't do that. I still suggest you change it though, since it's cleaner.

Re: Forum Title Link

Posted: Tue Aug 07, 2007 7:38 am
by xmenfile
Demo please. or can you give me more details about it (forum will be links) ?

Re: Forum Title Link

Posted: Tue Aug 07, 2007 8:48 am
by ShadowKnyght
For a demo click on my sig - or follow this link:
http://www.cyber-mag.com/phpBB2/index.php

The forums that have this icon next to them are links to external sites or pages outside of the standard forum one expects to enter.
Image

The icon to use is totally up to you of course - I generated my own for each template in use.

Image

Re: Forum Title Link

Posted: Tue Aug 07, 2007 4:46 pm
by xmenfile
Thank you ShadowKnyght for your clarification. BTW, it's very impressive site.

Re: Forum Title Link

Posted: Wed Aug 08, 2007 12:21 am
by ShadowKnyght
Thank you - although I do need to speed it up a little - first time visitors have a pretty bad loading time... especially if they are on dial up instead of broad band / cable.

Re: Forum Title Link

Posted: Mon Aug 20, 2007 7:04 pm
by cavallino
This is from the simple subforums addon install file:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_forums.php
#
#-----[ FIND ]------------------------------------------
#
				$prune_enabled = '';
			}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
			$link_ary = array( 'link_is' => 0, 'link_url' => '', 'link_append_sid' => 0, 'link_count' => 0, 'link_count_do' => 0 );;
			while( list($key, $val) = each($link_ary) )
			{
				$$key = ( $mode == 'editforum' ) ? $row[$key] : $val;
			}
//-- fin mod : Forum Title Link --------------------------------------------------------
note the ";;"

please correct it

Re: Forum Title Link

Posted: Tue Aug 21, 2007 7:45 am
by igorw
Yes i know, it's a minor issue and doesn't prevent the MOD from working ;)

Re: Forum Title Link

Posted: Tue Aug 21, 2007 9:30 am
by Dynamicadam
Maybe I'm being stupid, but I can't find any installation instructions, so I haven't got a clue what to do...

EDIT: Sorry - ignore that - i was opening Install.xml before I extracted it.

Re: Forum Title Link

Posted: Mon Oct 08, 2007 7:01 pm
by quahappy
Hi,

I've been looking at this MOD for ages but had no need for it... until now! But, have a problem.

I have Simple Subforums installed but have hit an issue with the required code changes to index.php:

Code: Select all

#
#-----[ IN-LINE FIND ]------------------------------------------
#
append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id")
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
$u_viewforum
#
#-----[ FIND ]------------------------------------------
#
							);
#
#-----[ AFTER, ADD ]------------------------------------------
#

//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
							if( $forum_data[$j]['link_is'] && !empty($forum_data[$j]['link_url']) )
							{
								$template->assign_block_vars( 'catrow.forumrow.is_link', array() );
							}
							else
							{
								$template->assign_block_vars( 'catrow.forumrow.not_link', array() );
							}
//-- fin mod : Forum Title Link --------------------------------------------------------
The first INLINE FIND is repeated twice in the index file! What is the code before / after in order to determine exactly where it needs to go (replace)?

The second FIND. Quite a few of them! Again, where about does the required AFTER, ADD need to go?

Yes, I've installed a lot of MOD's but I'm sorry to say the Forum Title Link MOD (simple subforums) install file is confusing and I apologise for saying that!

Many thanks!

Re: Forum Title Link

Posted: Sat Oct 20, 2007 6:12 am
by xmenfile
Hi,

I haved installed and when fine, except my index file layout. please help

Code: Select all

<center><script type="text/javascript"><!--
google_ad_client = "pub-4157398074485335";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-08-26: hotdealsfinder.info/clearance, hotdealsfinder.info/coupons, hotdealsfinder.info/discount, hotdealsfinder.info/onsale
google_ad_channel = "6597707948+0463420267+1005924403+9309232264";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
<!-- mod : announces -->
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="bottom"><span class="gensmall">{CURRENT_TIME}</span></td>
  </tr>
</table>
<table width="100%" cellpadding="3" cellspacing="1" class="forumline">
  <tr> 
	<td class="catHead" colspan="2"><span class="cattitle"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
  </tr>
  <tr> 
	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/RedSilver/images/welcome_panel.gif" alt="" /></td>
	<td class="row1" width="100%"><span class="genmed">{WELCOME_USER}</span><br /><span class="gensmall">{WELCOME_USER_INFO}</span></td>
  </tr>
  <!-- BEGIN switch_user_logged_in -->
  <tr> 
	<td class="row1" width="100%"><span class="gensmall">{LAST_VISIT_DATE}<br />{WELCOME_NEWS}</span></td>
  </tr>
  <!-- END switch_user_logged_in -->
  <!-- BEGIN switch_user_logged_out -->
  <form method="post" action="{S_LOGIN_ACTION}">
  <tr> 
      <td class="row1" valign="middle" height="28"><span class="gensmall">{L_USERNAME}: 
	<input class="post" type="text" name="username" size="10" />
	&nbsp;&nbsp;&nbsp;{L_PASSWORD}: 
	<input class="post" type="password" name="password" size="10" maxlength="32" />
	&nbsp;&nbsp; &nbsp;&nbsp;{L_AUTO_LOGIN} 
	<input class="text" type="checkbox" name="autologin" />
	&nbsp;&nbsp;&nbsp; 
	<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /></span> </td>
  </tr>
  </form>
  <!-- END switch_user_logged_out -->
  <!-- BEGIN switch_suggest_topic -->
  <tr> 
	<td class="row1" width="100%" colspan="2"><span class="gensmall">{WELCOME_SUGGESTED_TOPICS}&nbsp;&nbsp;<a href="{WELCOME_SUGGESTED_LINK}" class"gensmall">{WELCOME_SUGGESTED_TITLE}</a></span></td>
  </tr>
  <!-- END switch_suggest_topic -->
</table>

<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr>
	<td align="right" valign="bottom" class="gensmall"><a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
  </tr>
</table>
{BOARD_ANNOUNCES}

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr> 
	<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
	<th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
  </tr>
  <!-- BEGIN catrow -->
  <tr> 
	<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
	<td class="rowpic" colspan="3" align="right">&nbsp;</td>
  </tr>
  <!-- BEGIN forumrow -->
  <tr> 
	<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
	<td class="row1" width="100%" height="50"><table width="100%" cellpadding="2" cellspacing="0" border="0">
		<tr><td><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_ICON_IMG}</a></td>
			<td width="100%"><span class="forumlink"><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
  				</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
  				</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span>
  			</td>
	<!-- BEGIN not_link -->  			
  		</tr>
  	</table></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
	<!-- END not_link -->
	<!-- BEGIN is_link -->
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.LINK_STATS}</span></td>
	<!-- END is_link -->	
  </tr>
  <!-- END forumrow -->
  <!-- END catrow -->
</table>

<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
  <tr> 
 	<td align="left">
 	<!-- BEGIN switch_user_logged_in -->
 		<span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span>
 	<!-- END switch_user_logged_in -->
 	</td>
	<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
  </tr>
</table>

<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
  <tr> 
	<td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
  </tr>
  <tr> 
	<td class="row1" align="center" valign="middle" rowspan="2"><object type="application/x-shockwave-flash" data="relog.swf" width="80" height="80">
	<param name="movie" value="relog.swf" />
	<param name="WMode" value="Transparent" />
</object></td>
	<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
	</td>
  </tr>
  <tr> 
	<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
  </tr>
</table>


<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
	<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>

<br clear="all" />
<!-- BEGIN switch_user_logged_out -->
{SUBSCRIBE_FORM}
<!-- END switch_user_logged_out -->
<table cellspacing="3" border="0" align="center" cellpadding="0">
  <tr> 
	<td width="20" align="center"><img src="templates/RedSilver/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td>
	<td><span class="gensmall">{L_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center"><img src="templates/RedSilver/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td>
	<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center"><img src="templates/RedSilver/images/folder_locked_big.gif" alt="{L_FORUM_LOCKED}" /></td>
	<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
  </tr>
</table>
Thank you

Re: Forum Title Link

Posted: Sat Oct 20, 2007 9:07 am
by quahappy
xmenfile wrote:Hi,

I haved installed and when fine, except my index file layout. please help

Code: Select all

<center><script type="text/javascript"><!--
google_ad_client = "pub-4157398074485335";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-08-26: hotdealsfinder.info/clearance, hotdealsfinder.info/coupons, hotdealsfinder.info/discount, hotdealsfinder.info/onsale
google_ad_channel = "6597707948+0463420267+1005924403+9309232264";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
<!-- mod : announces -->
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr> 
	<td align="left" valign="bottom"><span class="gensmall">{CURRENT_TIME}</span></td>
  </tr>
</table>
<table width="100%" cellpadding="3" cellspacing="1" class="forumline">
  <tr> 
	<td class="catHead" colspan="2"><span class="cattitle"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
  </tr>
  <tr> 
	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/RedSilver/images/welcome_panel.gif" alt="" /></td>
	<td class="row1" width="100%"><span class="genmed">{WELCOME_USER}</span><br /><span class="gensmall">{WELCOME_USER_INFO}</span></td>
  </tr>
  <!-- BEGIN switch_user_logged_in -->
  <tr> 
	<td class="row1" width="100%"><span class="gensmall">{LAST_VISIT_DATE}<br />{WELCOME_NEWS}</span></td>
  </tr>
  <!-- END switch_user_logged_in -->
  <!-- BEGIN switch_user_logged_out -->
  <form method="post" action="{S_LOGIN_ACTION}">
  <tr> 
      <td class="row1" valign="middle" height="28"><span class="gensmall">{L_USERNAME}: 
	<input class="post" type="text" name="username" size="10" />
	&nbsp;&nbsp;&nbsp;{L_PASSWORD}: 
	<input class="post" type="password" name="password" size="10" maxlength="32" />
	&nbsp;&nbsp; &nbsp;&nbsp;{L_AUTO_LOGIN} 
	<input class="text" type="checkbox" name="autologin" />
	&nbsp;&nbsp;&nbsp; 
	<input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /></span> </td>
  </tr>
  </form>
  <!-- END switch_user_logged_out -->
  <!-- BEGIN switch_suggest_topic -->
  <tr> 
	<td class="row1" width="100%" colspan="2"><span class="gensmall">{WELCOME_SUGGESTED_TOPICS}&nbsp;&nbsp;<a href="{WELCOME_SUGGESTED_LINK}" class"gensmall">{WELCOME_SUGGESTED_TITLE}</a></span></td>
  </tr>
  <!-- END switch_suggest_topic -->
</table>

<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
  <tr>
	<td align="right" valign="bottom" class="gensmall"><a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
  </tr>
</table>
{BOARD_ANNOUNCES}

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr> 
	<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
	<th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
	<th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
  </tr>
  <!-- BEGIN catrow -->
  <tr> 
	<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
	<td class="rowpic" colspan="3" align="right">&nbsp;</td>
  </tr>
  <!-- BEGIN forumrow -->
  <tr> 
	<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
	<td class="row1" width="100%" height="50"><table width="100%" cellpadding="2" cellspacing="0" border="0">
		<tr><td><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_ICON_IMG}</a></td>
			<td width="100%"><span class="forumlink"><a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
  				</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
  				</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span>
  			</td>
	<!-- BEGIN not_link -->  			
  		</tr>
  	</table></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
	<!-- END not_link -->
	<!-- BEGIN is_link -->
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.LINK_STATS}</span></td>
	<!-- END is_link -->	
  </tr>
  <!-- END forumrow -->
  <!-- END catrow -->
</table>

<table width="100%" cellspacing="0" border="0" align="center" cellpadding="2">
  <tr> 
 	<td align="left">
 	<!-- BEGIN switch_user_logged_in -->
 		<span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span>
 	<!-- END switch_user_logged_in -->
 	</td>
	<td align="right"><span class="gensmall">{S_TIMEZONE}</span></td>
  </tr>
</table>

<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
  <tr> 
	<td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
  </tr>
  <tr> 
	<td class="row1" align="center" valign="middle" rowspan="2"><object type="application/x-shockwave-flash" data="relog.swf" width="80" height="80">
	<param name="movie" value="relog.swf" />
	<param name="WMode" value="Transparent" />
</object></td>
	<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
	</td>
  </tr>
  <tr> 
	<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
  </tr>
</table>


<table width="100%" cellpadding="1" cellspacing="1" border="0">
<tr>
	<td align="left" valign="top"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>

<br clear="all" />
<!-- BEGIN switch_user_logged_out -->
{SUBSCRIBE_FORM}
<!-- END switch_user_logged_out -->
<table cellspacing="3" border="0" align="center" cellpadding="0">
  <tr> 
	<td width="20" align="center"><img src="templates/RedSilver/images/folder_new_big.gif" alt="{L_NEW_POSTS}"/></td>
	<td><span class="gensmall">{L_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center"><img src="templates/RedSilver/images/folder_big.gif" alt="{L_NO_NEW_POSTS}" /></td>
	<td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
	<td>&nbsp;&nbsp;</td>
	<td width="20" align="center"><img src="templates/RedSilver/images/folder_locked_big.gif" alt="{L_FORUM_LOCKED}" /></td>
	<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
  </tr>
</table>
Thank you
This part of your index_body.tpl file:

Code: Select all

<!-- END not_link -->
       <!-- BEGIN is_link -->
       <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.LINK_STATS}</span></td>
       <!-- END is_link -->   
      </tr>
      <!-- END forumrow -->
      <!-- END catrow -->
Should be:

Code: Select all

	<!-- END not_link -->
	<!-- BEGIN is_link -->
	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap" colspan="3">
		<span class="gensmall">{catrow.forumrow.LINK_STATS}</span>
	</td>
	<!-- END is_link -->
<!-- END forumrow --> 
<!-- END catrow --> 
In other words, replace </tr> with </td> as above.

Hope that helps. ;)