Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Thread title leads to new (unread) posts like Xenforo does, instead to the first post Details »»
Thread title leads to new (unread) posts like Xenforo does, instead to the first post
Mod Version: 2.10, by Alan_SP (Contributor) Alan_SP is offline
Developer Last Online: Oct 2014 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (0 vote - 0 average) Installs: 8
Released: 13 Apr 2012 Last Update: Never Downloads: 0
Supported Template Edits Re-usable Code  

We now have situtation where we have small image ( - Here I'm using image from vBorg, not image that's used in your forums) that leads us to first unread post in thread and the whole big thread title leads us to first post of thread. This is not the happiest solution in my opinion and I also heard that Xenforo uses thread title to lead you to first unread post.

I'm talking about this:



Version 2.10:
After some thinking I realized that using image is totally unnecessary, as thread title is enough for good UI. If thread has more than one page, we could always use page numbers available under thread title.

So, to remove image completely find this code and remove it:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And, to make thread title function like it always should have, go and make this change:

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace it with:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now thread title leads to first new post if there's a one, or leads to a last post. If there's more than one page, we could use page numbers below, like shown on this picture:



---------------------------------------

Fixed in version 2.10:
We need to use same id to be able to edit thread title by double click next to thread title. If we exchange id with image's id, then double click doesn't enable us to edit thread title.

In code above change is already made, and changed is this:

from

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

back to (that's original id)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

For some who maybe would like to use image , I'll leave version 1.00 below, but I corrected id error (i.e. id stays same).
---------------------------------------------------
Version 1.00:
Anyway, if you want that thread title leads to new (unread) post, and small image () leads to first post of the thread, it's relatively simple template edit.

You need to edit template threadbit.

Find this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace it with this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This code makes little image leads you to the first post of thread, not as before to first unread post.

But, this image appears only if there are new posts in thread, so to make this image appear all the time, you need to remove this if statment in front of code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Don't forget to remove closing if statment:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now you'll always have link that leads to first post of thread. This may be important to you because thread title (if you apply this template modification) leads to last post in thread if there are no new posts.

Second, more important change as it changes where thread title leads is this:

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace it with:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now, when you and your users click on thread title it leads them to first unread post in the thread (or last, if there are no new posts) and if they click on icon, it leads them to the first post of thread.

You can also completely remove icon (by removing code, and not just replacing it), if you want that users go only to first unread post (or last, if there are no new posts in thread). But, if you want to keep icon (which I personally prefer, to go to first post in thread easily), I suggest that you also change phrase go_to_first_new_post, as icon now leads to first post, not first new post.

To explain what I did, I exchanged link (href) info between the two (icon and thread title), so you could fairly easy make template change even if this particular code changes with future versions of vBulletin.

Hope you'll find this useful.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 01:36.

Layout Options | Width: Wide Color: