PDA

View Full Version : How To Put The Thread Starter In Its Own Column



Jake Bunce
Sat 18th Sep '04, 2:22pm
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:



<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] /
<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername]
</td>
<td class="thead" align="center" nowrap="nowrap">
<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername]
</td>
<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:



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

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

<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:



<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 go to this template:

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

Remove the red code and add the blue 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>
<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>
</div>
</td>

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

<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:



<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 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:



<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] /
<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername]
</td>
<td class="thead" align="center" nowrap="nowrap">
<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername]
</td>
<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:



colspan="6"


Change all 3 instances to this:



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:



<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] / $vbphrase[thread_starter]</td>
<td class="thead" nowrap="nowrap">$vbphrase[thread_starter]</td>
<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.

Jake Bunce
Tue 21st Dec '04, 6:51pm
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:



<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']">5<else />4</if>">
<div>


This fixes a problem where announcements on the forumdisplay page don't span the entire table.

Jake Bunce
Tue 26th Apr '05, 3:15pm
In 3.0.4 (http://www.vbulletin.com/forum/showthread.php?t=124876), the following template change was made:



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:



colspan="7"


...to:



colspan="8"


Thanks to SecTa for pointing this out in this thread (http://www.vbulletin.com/forum/showthread.php?t=137281).

Jake Bunce
Sun 8th May '05, 4:52pm
Another one I missed:

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

Remove the red code, add the blue 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] / $vbphrase[thread_starter]</td>
<td class="thead" nowrap="nowrap">
$vbphrase[thread_starter]
</td>
<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 (http://www.vbulletin.com/forum/showthread.php?t=137281).