How To Put The Thread Starter In Its Own Column

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    How To Put The Thread Starter In Its Own Column

    This requires several template edits. First go to your:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Display Templates -> FORUMDISPLAY

    Find this code. Remove the red code and add the blue code:

    Code:
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    $announcebits
    <tr>
    	<if condition="$show['threadicons']">
    		<td class="thead" colspan="2">&nbsp;</td>
    	<else />
    		<td class="thead">&nbsp;</td>
    	</if>	
    	<td class="thead" width="100%">
    		<if condition="$show['threadratings']"><span style="float:$stylevar[right]"><a href="$sorturl&amp;order=desc&amp;sort=voteavg">$vbphrase[rating]</a> $sortarrow[voteavg]</span></if>
    		<a href="$sorturl&amp;order=asc&amp;sort=title">$vbphrase[thread]</a> $sortarrow[title] [color=red]/
    		<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername][/color]
    	</td>
    	[color=blue]<td class="thead" align="center" nowrap="nowrap">
    		<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername]
    	</td>[/color]
    	<td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=lastpost">$vbphrase[last_post]</a> $sortarrow[lastpost]</span></td>
    	<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=replycount">$vbphrase[replies]</a> $sortarrow[replycount]</span></td>
    	<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=views">$vbphrase[views]</a> $sortarrow[views]</span></td>
    </tr>
    Then go to this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Threadbit Templates -> threadbit

    Find this code. Remove the red code and add the blue code:

    Code:
    		<div class="smallfont">
    			<if condition="$show['threadratings'] AND $show['threadrating']"><span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" border="0" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span></if>
    			[color=red]<if condition="$show['guestuser']">
    				$thread[postusername]
    			<else />
    				<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span>
    			</if>[/color]
    		</div>
    		
    		<if condition="$show['unsubscribe']">
    			<div class="smallfont">
    				<a href="newreply.php?$session[sessionurl]do=newreply&amp;t=$thread[threadid]">$vbphrase[reply]</a> |
    				<a href="subscription.php?$session[sessionurl]do=removesubscription&amp;return=ucp&amp;t=$thread[threadid]">$vbphrase[unsubscribe]</a>
    			</div>
    		</if>
    		
    	</td>
    
    	[color=blue]<td class="alt2" align="center" nowrap="nowrap">
    		<if condition="$show['guestuser']">
    			$thread[postusername]
    		<else />
    			<a href="member.php?$session[sessionurl]u=$thread[postuserid]">$thread[postusername]</a>
    		</if>
    	</td>[/color]
    	
    	<if condition="$show['threadmoved']">
    	<td class="alt2" align="center">-</td>
    	<else />
    	<td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">
    		<div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap">
    			$thread[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$thread[lastposttime]</span></if><br />
    			<phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase>  <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
    		</div>
    	</td>
    	</if>
    	
    	<if condition="$show['notificationtype']">
    		<td class="alt1"><div class="smallfont">
    			<label for="sub$subscribethread[$threadid]">$thread[notification]</label>
    			<input type="hidden" name="oldemailupdate[$subscribethread[$threadid]]" id="oe_$subscribethread[$threadid]" value="$emailupdate[$threadid]" />
    		</div></td>
    		<td class="alt2"><input type="checkbox" name="deletebox[$subscribethread[$threadid]]" id="sub$subscribethread[$threadid]" value="yes" /></td>
    	<else />
    		<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><a href="#" onclick="who($thread[threadid]); return false;">$thread[replycount]</a></if></td>
    		<td class="alt2" align="center">$thread[views]</td>
    			
    		<if condition="$show['forumlink']">
    			<td class="alt1"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></td>
    		</if>
    	</if>
    </tr>
    Then in the same template (threadbit), find this code (at the bottom). Change the classes highlighted in blue. alt1 becomes alt2, and vice versa:

    Code:
    	<if condition="$show['threadmoved']">
    	<td class="[color=blue]alt2[/color]" align="center">-</td>
    	<else />
    	<td class="[color=blue]alt2[/color]" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">
    		<div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap">
    			$thread[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$thread[lastposttime]</span></if><br />
    			<phrase 1="member.php?find=lastposter&amp;t=$thread[threadid]" 2="$thread[lastposter]">$vbphrase[by_x]</phrase>  <a href="showthread.php?$session[sessionurl]goto=lastpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
    		</div>
    	</td>
    	</if>
    	
    	<if condition="$show['notificationtype']">
    		<td class="[color=blue]alt1[/color]"><div class="smallfont">
    			<label for="sub$subscribethread[$threadid]">$thread[notification]</label>
    			<input type="hidden" name="oldemailupdate[$subscribethread[$threadid]]" id="oe_$subscribethread[$threadid]" value="$emailupdate[$threadid]" />
    		</div></td>
    		<td class="[color=blue]alt2[/color]"><input type="checkbox" name="deletebox[$subscribethread[$threadid]]" id="sub$subscribethread[$threadid]" value="yes" /></td>
    	<else />
    		<td class="[color=blue]alt1[/color]" align="center"><if condition="$show['threadmoved']">-<else /><a href="#" onclick="who($thread[threadid]); return false;">$thread[replycount]</a></if></td>
    		<td class="[color=blue]alt2[/color]" align="center">$thread[views]</td>
    			
    		<if condition="$show['forumlink']">
    			<td class="[color=blue]alt1[/color]"><a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></td>
    		</if>
    	</if>
    </tr>
    Then go to this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Threadbit Templates -> threadbit_deleted

    Remove the red code and add the blue code:

    Code:
    <tr>
    	<td class="alt1"><img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" alt="" /></td>
    	
    	<if condition="$show['threadicons']">
    		<td class="alt2"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else />&nbsp;</if></td>
    	</if>
    	
    	<td class="alt1">
    		
    		<div>
    			<if condition="$show['viewthread']"><span style="float:$stylevar[right]" class="smallfont"><a href="showthread.php?$session[sessionurl]t=$thread[threadid]">$vbphrase[view]</a></span></if>		
    			$thread[typeprefix]
    			<if condition="$show['threadtitle']"><em>$thread[threadtitle]</em></if>
    		</div>
    	
    		<div class="smallfont">
    			<if condition="$show['managethread']"><span style="float:$stylevar[right]"><a href="postings.php?$session[sessionurl]do=editthread&amp;t=$thread[threadid]">$vbphrase[manage]</a></span></if>
    			[color=red]<if condition="$show['guestuser']">
    				$thread[postusername]
    			<else />
    				<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span>
    			</if>[/color]
    		</div>
    	</td>
    
    	[color=blue]<td class="alt2" align="center" nowrap="nowrap">
    		<if condition="$show['guestuser']">
    			$thread[postusername]
    		<else />
    			<a href="member.php?$session[sessionurl]u=$thread[postuserid]">$thread[postusername]</a>
    		</if>
    	</td>[/color]
    	
    	<td class="alt2" colspan="3" align="center">
    		<div class="smallfont"><phrase 1="member.php?$session[sessionurl]u=$thread[del_userid]" 2="$thread[del_username]">$vbphrase[thread_deleted_by_x]</phrase></div>
    		<if condition="$show['deletereason']">
    			<div class="smallfont">$vbphrase[reason]: <em>$thread[del_reason]</em></div>
    		</if>
    	</td>
    </tr>
    Then at the bottom of that same template (threadbit_deleted), change alt2 to alt1:

    Code:
    	<td class="[color=blue]alt2[/color]" colspan="3" align="center">
    		<div class="smallfont"><phrase 1="member.php?$session[sessionurl]u=$thread[del_userid]" 2="$thread[del_username]">$vbphrase[thread_deleted_by_x]</phrase></div>
    		<if condition="$show['deletereason']">
    			<div class="smallfont">$vbphrase[reason]: <em>$thread[del_reason]</em></div>
    		</if>
    	</td>
    </tr>
    Then edit this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Subscribed Thread Templates -> SUBSCRIBE

    Find this code. Remove the red code and add the blue code:

    Code:
    <tr>
    	<td class="thead" colspan="2">&nbsp;</td>
    	<td class="thead" width="100%">
    		<a href="$sorturl&amp;order=asc&amp;sort=title">$vbphrase[thread]</a> $sortarrow[title] [color=red]/
    		<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername][/color]
    	</td>
    	[color=blue]<td class="thead" align="center" nowrap="nowrap">
    		<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername]
    	</td>[/color]
    	<td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=lastpost">$vbphrase[last_post]</a> $sortarrow[lastpost]</span></td>
    	<!--<td class="thead" align="center" nowrap="nowrap"><a href="$sorturl&amp;order=desc&amp;sort=replycount">$vbphrase[replies]</a> $sortarrow[replycount]</td>-->
    	<!--<td class="thead" align="center" nowrap="nowrap"><a href="$sorturl&amp;order=desc&amp;sort=views">$vbphrase[views]</a> $sortarrow[views]</td>-->
    	<td class="thead">$vbphrase[notification]</td>
    	<td class="thead"><input name="allbox" type="checkbox" value="Check All" title="$vbphrase[check_uncheck_all]" onClick="checkall(this.form);" /></td>
    </tr>
    Now in that same template (SUBSCRIBE), there are 3 instances of this code:

    Code:
    colspan="6"
    Change all 3 instances to this:

    Code:
    colspan="7"
    Then edit this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Search Templates -> search_results

    Find this code. Remove the red code and add the blue code:

    Code:
    <if condition="$search[showposts]">
    
    </table>
    $searchbits
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    
    <else />
    
    <tr>
    	<td class="thead" colspan="2">&nbsp;</td>
    	<td class="thead" width="75%">$vbphrase[thread] [color=red]/ $vbphrase[thread_starter][/color]</td>
    	[color=blue]<td class="thead" nowrap="nowrap">$vbphrase[thread_starter]</td>[/color]
    	<td class="thead" width="150" align="center" nowrap="nowrap">$vbphrase[last_post]</td>
    	<td class="thead" align="center" nowrap="nowrap">$vbphrase[replies]</td>
    	<td class="thead" align="center" nowrap="nowrap">$vbphrase[views]</td>
    	<td class="thead" width="25%">$vbphrase[forum]</td>
    </tr>
    $searchbits
    
    </if>
    All done.
    Last edited by Jake Bunce; Thu 7 Oct '04, 11:41pm.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    One thing I missed:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Display Templates -> forumdisplay_announcement

    Find this code. Change the 5 and 4 to 6 and 5:

    Code:
    <tr>
    	<td class="alt1"><img src="$stylevar[imgdir_statusicon]/announcement_$announcement[statusicon].gif" border="0" alt="$vbphrase[announcement]" /></td>
    	<td class="alt2" colspan="<if condition="$show['threadicons']">[color=red]5[/color]<else />[color=red]4[/color]</if>">
    		<div>
    This fixes a problem where announcements on the forumdisplay page don't span the entire table.

    Comment

    • Jake Bunce
      Senior Member
      • Dec 2000
      • 46598
      • 3.6.x

      #3
      In 3.0.4, the following template change was made:

      Originally posted by Kier
      search_results
      Changed all instances of colspan="20" to colspan="7" for Opera.
      Requires revert? No.
      This causes a problem with my original instructions. If you are running 3.0.4 or later, then you need to edit this template:

      Admin CP -> Styles & Templates -> Style Manager -> « » -> Search Templates -> search_results

      Change all 3 instances of:

      Code:
      colspan="7"
      ...to:

      Code:
      colspan="8"
      Thanks to SecTa for pointing this out in this thread.

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Another one I missed:

        Admin CP -> Styles & Templates -> Style Manager -> « » -> User Control Panel Templates -> USERCP

        Remove the red code, add the blue code:

        Code:
        		<tr class="thead">
        		
        			<if condition="$show['threadicons']">
        				<td class="thead" colspan="2">&nbsp;</td>
        			<else />
        				<td class="thead">&nbsp;</td>
        			</if>
        			
        			<td class="thead" width="100%">$vbphrase[thread] [color=red]/ $vbphrase[thread_starter][/color]</td>
        			[color=blue]<td class="thead" nowrap="nowrap">
        				$vbphrase[thread_starter]
        			</td>[/color]
        			<td class="thead" width="150" align="center" nowrap="nowrap">$vbphrase[last_post]</td>
        			<td class="thead" align="center">$vbphrase[replies]</td>
        			<td class="thead" align="center">$vbphrase[views]</td>
        		</tr>
        		$threadbits
        Thanks to marsauae for pointing this out in this thread.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...