Forum Title Link

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
xmenfile
Registered User
Posts: 163
Joined: Sun Apr 22, 2007 10:32 pm

Re: Forum Title Link

Post by xmenfile »

Thank you for your respond,

I have tried that, but that screw up my side bar block.
look at this, it got it stays rignt on top of my forum. I want it on the side

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="0" cellspacing="3" border="0">
  <tr>
    <td class="forumline" width="100">{AMAZON_4}</td>
    <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 -->
	   <!-- 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 --> 
</table>

  </tr>
</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>


<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>
User avatar
quahappy
Former Team Member
Posts: 1416
Joined: Tue Dec 12, 2006 8:19 pm
Location: South Yorkshire
Name: Andy Green

Re: Forum Title Link

Post by quahappy »

xmenfile wrote:Thank you for your respond,

I have tried that, but that screw up my side bar block.
look at this, it got it stays rignt on top of my forum. I want it on the side

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="0" cellspacing="3" border="0">
  <tr>
    <td class="forumline" width="100">{AMAZON_4}</td>
    <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 -->
	   <!-- 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 --> 
</table>

  </tr>
</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>


<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>
On rechecking your code, you appear to be missing a closed </table> that may be causing the problem. Could you give us a link to your forum?


Can I just say, thanks to evil<3 for this great MOD (I got there in the end!). I've combined this MOD with Image for each Forum on Index MOD, made a small modification so that the actual forum images for each Title Link is changed but the rest doesn't. Example (note: this is just on my test site - images are WIP so some links just contain text!):

Image
NOTE: I use Aphrodite template as standard throughout my forum.

The Image for each Forum on Index MOD displays images to the right of forum description. I just thought it looks better replacing the forum folder image instead. ;)

Back on Topic...
If you don't ask.....
User avatar
xmenfile
Registered User
Posts: 163
Joined: Sun Apr 22, 2007 10:32 pm

Re: Forum Title Link

Post by xmenfile »

Here you go http://hotdealsfinder.info
I skipped this step and it works fine, except it shows 0 post, 0 reply... at all time. how can i fix it?

Code: Select all

Open: templates/subSilver/index_body.tpl
Find
Tip: This may be a partial find and not the whole line. 

	  </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.

	<!-- BEGIN not_link -->
Find
Tip: This may be a partial find and not the whole line. 

	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.

	<!-- 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 -->
User avatar
quahappy
Former Team Member
Posts: 1416
Joined: Tue Dec 12, 2006 8:19 pm
Location: South Yorkshire
Name: Andy Green

Re: Forum Title Link

Post by quahappy »

Sorry for taking so long to get back to you. Been very busy trying to fix a "bug" with my own forum layout only to find out after many hours it's IE7 not being web standard!!

Have you managed to sort this one xmenfile?
If you don't ask.....
User avatar
azra
Registered User
Posts: 325
Joined: Thu Apr 12, 2007 8:06 pm

Re: Forum Title Link

Post by azra »

when i open this mod this is what i see. it is very hard to understand

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.subsilver.en.xsl"?>
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.xsd">
  <header>
    <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license>
    <title lang="en-gb">Forum Title Link</title>
    <description lang="en-gb">This MOD will allow forums to be links.</description>
    <author-notes lang="en-gb">This MOD was inspired by a MOD by oxpus, Categories hierarchy and of course Olympus (phpBB3).

The image has been borrowed from phpBB3, it is (c) 2006 phpBB Group - http://www.phpbb.com/ and is licensed under the GPL (GNU General Public License)</author-notes>
    <author-group>
      <author>
        <realname>Igor Wiedler</realname>
        <email>[email protected]</email>
        <username><![CDATA[eviL<3]]></username>
        <homepage>http://phpbbmodders.net</homepage>
        <contributions />
      </author>
    </author-group>
    <mod-version>
      <major>1</major>
      <minor>0</minor>
      <revision>0</revision>
    </mod-version>
    <installation>
      <level>easy</level>
      <time>600</time>
      <target-version>
        <target-primary>2.0</target-primary>
        <target-major allow="exact">2</target-major>
        <target-minor allow="exact">0</target-minor>
      </target-version>
    </installation>
    <history>
      <entry>
        <date>2006-12-04</date>
        <rev-version>
          <major>0</major>
          <minor>1</minor>
          <revision>0</revision>
        </rev-version>
        <changelog lang="en-GB">
          <change>Initial release</change>
        </changelog>
      </entry>
      <entry>
        <date>2006-12-05</date>
        <rev-version>
          <major>0</major>
          <minor>1</minor>
          <revision>1</revision>
        </rev-version>
        <changelog lang="en-GB">
          <change>Fixed up the format</change>
          <change>Fixed little errors</change>
          <change>Thanks to HoundoftheB for testing!</change>
        </changelog>
      </entry>
      <entry>
        <date>2007-01-21</date>
        <rev-version>
          <major>1</major>
          <minor>0</minor>
          <revision>0</revision>
        </rev-version>
        <changelog lang="en-GB">
          <change>Added license.txt :P</change>
          <change>Simple subforums addon by noobarmy</change>
        </changelog>
      </entry>
    </history>
  </header>
  <action-group>
    <sql>ALTER TABLE phpbb_forums ADD link_is TINYINT( 1 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_url VARCHAR( 100 ) NULL DEFAULT '';
ALTER TABLE phpbb_forums ADD link_count MEDIUMINT( 8 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_count_do TINYINT( 1 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_append_sid TINYINT( 1 ) NULL DEFAULT '0';</sql>
	<copy>
		<file from="root/templates/subSilver/images/forum_link.gif" to="templates/subSilver/images/forum_link.gif" />
	</copy>
    <open src="index.php">
      <edit>
        <find><![CDATA[							$template->assign_block_vars('catrow.forumrow',	array(]]></find>
        <action type="before-add"><![CDATA[
//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
							$u_viewforum = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id");
							if( $forum_data[$j]['link_is'] && !empty($forum_data[$j]['link_url']) )
							{
								if( $forum_data[$j]['link_count_do'] )
								{
									$link_view_num = $forum_data[$j]['link_count'];
								}
								else
								{
									$u_viewforum = ( $forum_data[$j]['link_append_sid'] ) ? append_sid($forum_data[$j]['link_url']) : $forum_data[$j]['link_url'];
								}
								
								$folder_image	= $images['forum_web_link'];
								$folder_alt		= $lang['forum_link_folder_alt'];
							}
//-- fin mod : Forum Title Link --------------------------------------------------------
]]></action>
      </edit>
      <edit>
        <find><![CDATA[								'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))]]></find>
        <action type="before-add"><![CDATA[//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
								'LINK_STATS' => ( isset($link_view_num) ) ? sprintf( $lang['forum_link_total_redirects'], $link_view_num ) : '&nbsp;',
//-- fin mod : Forum Title Link --------------------------------------------------------]]></action>
        <inline-edit>
          <inline-find>append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id")</inline-find>
		  <inline-action type="replace-with">$u_viewforum</inline-action>
		</inline-edit>
      </edit>
      <edit>
        <find>							);</find>
        <action type="after-add"><![CDATA[
//-- 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 --------------------------------------------------------]]></action>
      </edit>
    </open>
    <open src="viewforum.php">
      <edit>
        <find>// End of auth check
//</find>
        <action type="after-add"><![CDATA[
//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
if( $forum_row['link_is'] && !empty( $forum_row['link_url'] ) )
{
	if( $forum_row['link_count_do'] )
	{
		$db->sql_query( 'UPDATE ' . FORUMS_TABLE . ' SET link_count = link_count + 1 WHERE forum_id = ' . $forum_id );
	}
	
	if( $forum_row['link_append_sid'] )
	{
		$redirect_url	= append_sid($forum_row['link_url'], true);
		$redirect_func	= 'redirect';
	}
	else
	{
		$redirect_url	= $forum_row['link_url'];
		$redirect_func	= 'redirect_external';
	}

	$redirect_func( $forum_row['link_url'] );
}
//-- fin mod : Forum Title Link --------------------------------------------------------
]]></action>
      </edit>
    </open>
    <open src="viewtopic.php">
      <edit>
        <find>$sql = "SELECT t.topic_id, t.topic_title</find>
        <inline-edit>
          <inline-find>, f.forum_id</inline-find>
          <inline-action type="after-add">, f.link_is</inline-action>
        </inline-edit>
      </edit>
      <edit>
        <find>// End auth check
//</find>
        <action type="after-add">
//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
if( $forum_topic_data['link_is'] )
{
	redirect(append_sid("index.$phpEx", true));
}
//-- fin mod : Forum Title Link --------------------------------------------------------
</action>
      </edit>
    </open>
    <open src="admin/admin_forums.php">
      <edit>
        <find>				$prune_enabled = '';
			}</find>
        <action type="after-add"><![CDATA[//-- 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 --------------------------------------------------------]]></action>
      </edit>
      <edit>
        <find><![CDATA[				'L_DAYS' => $lang['Days'],]]></find>
        <action type="after-add"><![CDATA[//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
				'L_FORUM_LINK_TITLE'	=> $lang['Forum_link_title'],
				'L_FORUM_LINK_IS'		=> $lang['Forum_link_is'],
				'L_FORUM_LINK_URL'		=> $lang['Forum_link_url'],
				'L_FORUM_LINK_SID'		=> $lang['Forum_link_sid'],
				'L_FORUM_LINK_SID_EX'	=> $lang['Forum_link_sid_ex'],
				'L_FORUM_LINK_COUNT'	=> $lang['Forum_link_count'],
				'L_FORUM_LINK_COUNT_DO'	=> $lang['Forum_link_count_do'],
				
				'LINK_URL'		=> $link_url,
				'LINK_COUNT'	=> $link_count,
				
				'LINK_IS_ENABLED'		=> ( $row['link_is'] ) ? 'checked="checked" ' : '',
				'LINK_SID_ENABLED'		=> ( $row['link_append_sid'] ) ? 'checked="checked" ' : '',
				'LINK_COUNT_ENABLED'	=> ( $row['link_count_do'] ) ? 'checked="checked" ' : '',
//-- fin mod : Forum Title Link --------------------------------------------------------]]></action>
      </edit>
      <edit>
        <find>			$sql = "INSERT INTO " . FORUMS_TABLE</find>
        <inline-edit>
          <inline-find>, forum_desc</inline-find>
          <inline-action type="after-add">, link_is, link_url, link_append_sid, link_count, link_count_do</inline-action>
        </inline-edit>
      </edit>
      <edit>
        <find>				VALUES ('" . $next_id . "',</find>
        <inline-edit>
          <inline-find>, '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "'</inline-find>
          <inline-action type="after-add">, " . (int) $HTTP_POST_VARS['link_is'] . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['link_url']) . "', " . (int) $HTTP_POST_VARS['link_append_sid'] . ", " . (int) $HTTP_POST_VARS['link_count'] . ", " . (int) $HTTP_POST_VARS['link_count_do'] . "</inline-action>
        </inline-edit>
      </edit>
      <edit>
        <find>				SET forum_name</find>
        <inline-edit>
          <inline-find>, forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "'</inline-find>
          <inline-action type="after-add">, link_is = '" . (int) $HTTP_POST_VARS['link_is'] . "', link_url = '" . str_replace("\'", "''", $HTTP_POST_VARS['link_url']) . "', link_append_sid = '" . (int) $HTTP_POST_VARS['link_append_sid'] . "', link_count = '" . (int) $HTTP_POST_VARS['link_count'] . "', link_count_do = '" . (int) $HTTP_POST_VARS['link_count_do'] . "'</inline-action>
        </inline-edit>
      </edit>
    </open>
    <open src="includes/functions.php">
      <edit>
        <find><![CDATA[?>]]></find>
        <action type="before-add"><![CDATA[
//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
/**
 * Redirect to an external URL
 * 
 * @author		eviL3 <[email protected]>
 * @copyright	(c) 2006 eviL3
 * @license		http://opensource.org/licenses/gpl-license.php GNU Public License 
 * @param		string	$url
 * @global		db		$db
 * @return		void
 */ 
function redirect_external( $url )
{
	global $db;

	if (!empty($db))
	{
		$db->sql_close();
	}

	// Redirect via an HTML form for PITA webservers
	if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')))
	{
		header( 'Refresh: 0; URL=' . $url );
		echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $url . '">HERE</a> to be redirected</div></body></html>';
		exit;
	}

	// Behave as per HTTP/1.1 spec for others
	header('Location: ' . $url);
	exit;
}
//-- fin mod : Forum Title Link --------------------------------------------------------
]]></action>
      </edit>
    </open>
    <open src="language/lang_english/lang_admin.php">
      <edit>
        <find><![CDATA[?>]]></find>
        <action type="before-add"><![CDATA[
//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
$lang += array(
	'Forum_link_title'		=> 'Forum Link',
	'Forum_link_is'			=> 'Forum is a Link',
	'Forum_link_url'		=> 'Link URL',
	'Forum_link_sid'		=> 'Append sid',
	'Forum_link_sid_ex'		=> 'Enable this option, if you\'re using local pages, that are part of phpBB, eg. "posting.php"',
	'Forum_link_count'		=> 'Count of clicks',
	'Forum_link_count_do'	=> 'Count Clicks',
);
//-- fin mod : Forum Title Link --------------------------------------------------------
]]></action>
      </edit>
    </open>
    <open src="language/lang_english/lang_main.php">
      <edit>
        <find><![CDATA[?>]]></find>
        <action type="before-add">
//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
$lang['forum_link_total_redirects'] = 'Total redirects: %s'; // %s = number of redirects
$lang['forum_link_folder_alt']		= 'Forum is a link';
//-- fin mod : Forum Title Link --------------------------------------------------------
</action>
      </edit>
    </open>
    <open src="templates/subSilver/index_body.tpl">
      <edit>
        <find><![CDATA[	  </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>]]></find>
        <action type="after-add"><![CDATA[	<!-- BEGIN not_link -->]]></action>
      </edit>
      <edit>
        <find><![CDATA[	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>]]></find>
        <action type="after-add"><![CDATA[	<!-- 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 -->]]></action>
      </edit>
    </open>
    <open src="templates/subSilver/subSilver.cfg">
      <edit>
        <find>$images['forum_locked'] = "$current_template_images/folder_locked_big.gif";</find>
        <action type="after-add">//-- mod : Forum Title Link ------------------------------------------------------------
//-- add
$images['forum_web_link'] = "$current_template_images/forum_link.gif";
//-- fin mod : Forum Title Link --------------------------------------------------------</action>
      </edit>
    </open>
    <open src="templates/subSilver/admin/forum_edit_body.tpl">
      <edit>
        <find><![CDATA[	<tr> 
	  <td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{S_SUBMIT_VALUE}" class="mainoption" /></td>]]></find>
        <action type="before-add"><![CDATA[	<tr> 
		<td class="row1">{L_FORUM_LINK_TITLE}</td>
		<td class="row2">
			<input type="checkbox" name="link_is" id="link_is" value="1" {LINK_IS_ENABLED}/>
			<label for="link_is">{L_FORUM_LINK_IS}</label>
			<br />
			<input type="checkbox" name="link_append_sid" id="link_append_sid" value="1" {LINK_SID_ENABLED}/>
			<label for="link_append_sid">{L_FORUM_LINK_SID}</label>
				<span class="gensmall">({L_FORUM_LINK_SID_EX})</span>
			<br />
			<input type="checkbox" name="link_count_do" id="link_count_do" value="1" {LINK_COUNT_ENABLED}/>
			<label for="link_count_do">{L_FORUM_LINK_COUNT_DO}</label>
			
			<table cellspacing="0" cellpadding="1" border="0">
				<tr>
					<td><label for="link_url">{L_FORUM_LINK_URL}:</label></td>
					<td><input type="text" name="link_url" id="link_url" value="{LINK_URL}" size="25" class="post" /></td>
				</tr>
				<tr>
					<td><label for="link_count">{L_FORUM_LINK_COUNT}:</label></td>
					<td><input type="text" name="link_count" id="link_count" value="{LINK_COUNT}" size="5" class="post" /></td>
				</tr>
			</table>
		</td>
	</tr>]]></action>
      </edit>
    </open>
  </action-group>
</mod>
azra :D
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Forum Title Link

Post by igorw »

azra, open it in your web browser ;)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
azra
Registered User
Posts: 325
Joined: Thu Apr 12, 2007 8:06 pm

Re: Forum Title Link

Post by azra »

when i open it in firefox i get this message
Error loading stylesheet: (null)file:///C:/Documents%20and%20Settings/Azra/My%20Documents/forum/modx.subsilver.en.xsl

:shock:
azra :D
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Forum Title Link

Post by igorw »

Hi,

you need to extract modx.subsilver.en.xsl aswell.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
azra
Registered User
Posts: 325
Joined: Thu Apr 12, 2007 8:06 pm

Re: Forum Title Link

Post by azra »

thanks, but what does it mean by this?

Code: Select all

ALTER TABLE phpbb_forums ADD link_is TINYINT( 1 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_url VARCHAR( 100 ) NULL DEFAULT '';
ALTER TABLE phpbb_forums ADD link_count MEDIUMINT( 8 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_count_do TINYINT( 1 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_append_sid TINYINT( 1 ) NULL DEFAULT '0';
azra :D
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Forum Title Link

Post by igorw »

They are sql queries you need to run, more info can be found here: http://phpbbmodders.net/viewtopic.php?f=66&t=108
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
azra
Registered User
Posts: 325
Joined: Thu Apr 12, 2007 8:06 pm

Re: Forum Title Link

Post by azra »

so in my phpmyadmin on this window, i press the query button and put

Code: Select all

ALTER TABLE phpbb_forums ADD link_is TINYINT( 1 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_url VARCHAR( 100 ) NULL DEFAULT '';
ALTER TABLE phpbb_forums ADD link_count MEDIUMINT( 8 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_count_do TINYINT( 1 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_append_sid TINYINT( 1 ) NULL DEFAULT '0';
into it?

Image

I just want to make sure this is where i do it because one time when i was working with SQL, it messed up my entire website
azra :D
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Forum Title Link

Post by igorw »

You press the "SQL" button.
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
azra
Registered User
Posts: 325
Joined: Thu Apr 12, 2007 8:06 pm

Re: Forum Title Link

Post by azra »

yes, i know i press the SQL button, but do I need to click anything like "phpbb_config" before I press SQL and put in this?

Code: Select all

ALTER TABLE phpbb_forums ADD link_is TINYINT( 1 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_url VARCHAR( 100 ) NULL DEFAULT '';
ALTER TABLE phpbb_forums ADD link_count MEDIUMINT( 8 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_count_do TINYINT( 1 ) NULL DEFAULT '0';
ALTER TABLE phpbb_forums ADD link_append_sid TINYINT( 1 ) NULL DEFAULT '0';
azra :D
User avatar
azra
Registered User
Posts: 325
Joined: Thu Apr 12, 2007 8:06 pm

Re: Forum Title Link

Post by azra »

In the mod for index.php, when it says to find

Code: Select all

);
there are so many of those. which one is it referring to?
azra :D
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: Forum Title Link

Post by igorw »

No, just click SQL.

It refers to the first after all previous finds ;)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
Post Reply

Return to “[2.0.x] MOD Database Releases”