[Tutorial] Replacing the 'Ratings' column with 'Thread Starter'
#1
Someone asked me this earlier in Support, so I thought I may as well post it for all:

Go to: Admin CP-> Templates and Style-> Templates.
Select your forum template (Default by the looks of your screenshots).
Expand 'Forum Display Templates' by clicking on it.

Go into 'forumdisplay_thread' by clicking on it to get the edit box.

Where it says:
{$rating}
Replace it with:
<td align="center" class="{$bgcolor}">{$thread['profilelink']}</td>

Then, click 'Save and Return to Listing' and then click on 'forumdisplay_threadlist'.

Find:
{$rating}
And replace it with:
<td class="tcat" align="center" width="10%"><span class="smalltext"><strong>Thread Starter</strong></span></td>

Click any of the save buttons, then exit out of that and go to your forum.

You're DONE!

This is a screenshot of the finished result:

[Image: author-mod.png]

Thanks,

Jlong1
Reply
#2
Moved, very good tutorial Smile
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#3
(2009-02-11, 09:56 PM)MattR Wrote: Moved, very good tutorial Smile

Thanks Big Grin. As I said, someone in Support asked for it and I decided that other users might want to know how to apply it.
Reply
#4
This post has been updated to remove nbsp spacing and remove / Author from category names which sits besides Thread... There should no longer be any issues here with that.

Not to hijack your thread.... but this may be more efficient.

Step 1..

Go into Templates>ForumDisplay>Threadlist

Remove:
/ <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong>

Step 2..

In the same template

Find:
{$ratingcol}
Replace with
<td class="tcat" align="center" width="80"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>

Step 3..

Go into ForumDisplay>Thread

Remove:
<div class="author smalltext">{$thread['profilelink']}</div>

Step 4..

In the same template

Find:
{$rating}

Replace with
<td class="{$bgcolor}" align="center" valign="middle"><div class="author smalltext">{$thread['profilelink']}</div></td> 
Reply
#5
(2009-02-12, 02:51 AM)atomicj Wrote: Not to hijack your thread.... but this may be more efficient.

Go into Templates>ForumDisplay>Threadlist

Find:

{$ratingcol}

Replace with

		<td class="tcat" align="center" width="80"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>

Next go into ForumDisplay>Thread

Select ALL (assuming it's still default) and replace with ---

<tr>
	<td align="center" class="{$bgcolor}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
	<td align="center" class="{$bgcolor}" width="2%">{$icon}</td>
	<td class="{$bgcolor}">
		{$attachment_count}
		<div>
			<span>{$prefix} {$gotounread}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
			</div>
	</td>
	<td align="center" class="{$bgcolor}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
	<td align="center" class="{$bgcolor}">{$thread['views']}</td>
	<td class="{$bgcolor}" align="center" valign="middle">
<div class="author smalltext">{$thread['profilelink']}</div>
	</td>	
	<td class="{$bgcolor}" style="white-space: nowrap; text-align: right;">
		<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
		<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
	</td>
{$modbit}
</tr>

This works but not very well. It adds a load of whitespace to the forum. Check the attachment.


Attached Files
.bmp   untitled.bmp (Size: 426.91 KB / Downloads: 275)
Reply
#6
the second one gives more space while i cannot find the 2nd rating in the first post
it should be ratingcol
Reply
#7
I did leave one thing out by accident.. Forgot to remove

/ <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong>

from the threadlist...

I noticed for some reason that when you copy and paste from this post, it adds whitespacing and a bunch of those & n b s p ; all throughout the pasted code (the second portion).. that is what caused the spacing... I have no idea why it'd do that.. It's not an issue with my coding of this.. If you looked back into your template you would have noticed a ton of the nbsp's (which are spaces).. removing them would bring you back to normal..

I'm gonna edit that post to get rid of the whitespacing...

Here is an example of what it looks like when it's all done. Note that the "sort" function carries over and the "Author" is removed from the left portion of the category names.


Attached Files Thumbnail(s)
   
Reply
#8
hey atomicj heres an error i get
plz check it out

   
Reply
#9
You need to increase the colspan on the header.
Reply
#10
Glen, keep in mind I have created that tutorial with the "default" templates in mind. If your theme is custom it may not display correctly...

I have just did this again on a default forum and it shows perfectly fine.

If you're having trouble with using this on a custom theme just leave your screenshot here and I or someone else will advise you further.

Thanks
I noticed you had sticky threads also from your example, I even confirmed on my test forum that there are no issues with that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)