XF 1.4 Change the Forum initial view to list new topics instead of the forum list

farang

Well-known member
Hi there. My XF 1.4 installation is made in the web site root. My question may sound odd but it isn't really. I recently converted from a SMF 2.0 installation with a portal page.

When someone browse to http://mywebsite/ , I would like them to see the "Unread Posts" page (or "Recent Posts" page for guests). By doing that, I will immediately catch the interest of a new visitor. It's about lowering the threshold since web visitors by nature are very lazy and they don't want to drill down into the forum hierarcy to find out if there is something interesting for them to read.

Ideally I would like the list of unread posts show up when I enter http://mywebsite/ or when I the click the "Forums" main meny item. Unread posts would then be the initial forum view as well as the web site root. Further I would need a sub menu item (belonging the the Forum main menu item) to see the list of all forums (http://mywebsite/forums/)

I would like to listen with you guys what is the best way to achieve the above described function. Thanks in advance, your help is highly appreciated.

----------------------
While waiting for a better solution I've set up the following in Basic Board Information:
Index Page Route : find-new/posts
Home Page URL : http://mywebsite/

Currently going to http://mywebsite/ or clicking the the Home menu item both redirects to
http://mywebsite/find-new/6867/posts (The number keeps changing from time to another). The URL in the web browser changes. (I wish it would still show http://mywebsite/ )
Clicking the Forums menu item will of course still show the list of all my forums.

I've also tried to set Index Page Route to "find-new/34/posts". It works somewhat better because the URL in the browser is not changed. I realize though that the number "34" should not be hard coded as it's dynamic and will not be correct.
----------------------
 
What you have done is correct.

The number in the URL changes with each page load as it is a new search.

Thanks Brogan.

My current solution is not so good because the URL in the browser changes. I guess the browser gets redirected to another URL. Can that be avoided?
Also, the list of unread posts doesn't show up when when I the click the "Forums" main meny item and I would need a sub menu item (belonging the the Forum main menu item) to see the list of all forums.

I would prefer not to have a Home button at all since it's somewhat confusing that when it's clicked it gets inactive immediately. I send You the URL to my web site by a personal message in case You'd like to see how it works now. Thanks again.
 
My current solution is not so good because the URL in the browser changes. I guess the browser gets redirected to another URL. Can that be avoided?

The current solution is the correct way. The browser doesn't redirect you, it's just a different ID every time and it cannot be avoided.
 
The current solution is the correct way. The browser doesn't redirect you, it's just a different ID every time and it cannot be avoided.

It's definately a redirect that occurs, I've checked the server response. I believe my SEO ranking will suffer very much with the current solution.


Code:
Requesting http://mywebsite
SERVER RESPONSE: HTTP/1.1 303 See Other
Date:
Mon, 19 Jan 2015 19:58:48 GMT
Server:
Apache
X-Powered-By:
PHP/5.5.10
Expires:
Thu, 19 Nov 1981 08:52:00 GMT
Cache-control:
private, max-age=0
X-Frame-Options:
SAMEORIGIN
Set-Cookie:
xf_session=17d4dea14d9999396afdbf25fcdad8bf; path=/; httponly
Last-Modified:
Mon, 19 Jan 2015 19:58:48 GMT
Location:
http://mywebsite/find-new/7522/posts
Content-Type:
text/html; charset=UTF-8
Redirecting to: http://mywebsite/find-new/7522/posts

SERVER RESPONSE: HTTP/1.1 200 OK
Date:
Mon, 19 Jan 2015 19:58:48 GMT
Server:
Apache
X-Powered-By:
PHP/5.5.10
Expires:
Thu, 19 Nov 1981 08:52:00 GMT
Cache-control:
private, max-age=0
X-Frame-Options:
SAMEORIGIN
Set-Cookie:
xf_session=9f74166099e92b68b4e92293d0213474; path=/; httponly
Last-Modified:
Mon, 19 Jan 2015 19:58:49 GMT
Content-Length:
59116
Content-Type:
text/html; charset=UTF-8

(Redirection will not occur in case I'm logged in and no new posts exists.)
http://sharkseo.com/nohat/303-redirects-seo/
 
I know I'm not good in explaining things, I tend to complicate things. I'm sorry for that.
I will try to rephrase my question.


Is there a way to make my new XF 1.4 forum show the latest topics on the forum root URL (instead of showing the list of all available forums)?

I'd be really happy if someone can advice me how to do that or where to start look. :)
 
If I understand correctly you need the URl before it redirects to the URl with the number in it.

This should simply be yourforum.com/find-new/posts?recent=1 for recent and yourforum.com/find-new/posts for logged in new posts
 
Is there a way to make my new XF 1.4 forum show the latest topics on the forum root URL (instead of showing the list of all available forums)?

As the first page visitors get when they go to your site? If so, set the index route to find-new/posts, which you have done and what you've done is correct.
 
I think in your basic board settings you put the following into the index page route field

find-new/posts

or

find-new/posts?recent=1

(ie you don't include the /34/ you had in your OP)

This will in fact redirect but that is correct. The problem comes when people use the redirected URL (with the number) for a bookmark or inbound link from another site. I think this is an issue.
 
Last edited:
Thanks @Maru and @Mr Lucky

As the first page visitors get when they go to your site?
Yes that's correct. When they type http://mywebsite/ in the adress bar in the browser I want the latest topics (or unread topics) to show up at once.

I've already done the changes and it kind of works but as a result of that I changed the index page route field, a redirect occurs. I'm really worried that my SEO ratings will "go south" now when i have a permanent redirect on my root page. I wish my XF forum could just serve the page without making a 303 redirection. If so I wouldn't have to worry about someone bookmarking the temporary dynamic URL generated. ...
 
However, when you have find-new/posts in the index page route, then the home page URL should not include it, it would just be: yourforum.com - the find-new/posts link should not appear in the browser URL field. That's the whole point of a home page URL
 
However, when you have find-new/posts in the index page route, then the home page URL should not include it, it would just be: yourforum.com - the find-new/posts link should not appear in the browser URL field. That's the whole point of a home page URL

Thanks.
You can see my settings in the first attached file.
After entering http://mywebsite.com/ in the browsers web adress field, it imediately changes to what is shown in the second image. It's true that the find-new/posts link doesn't appear in my browser. It's a different URL each time but I wish it would not change at all and remain http://mywebsite/ :D

Untitled-2.webp
Untitled-3.webp
 
Unless you have a homepage, you can blank out the Home Page URL field.
Thank You Maru

Yes, I have tried that. The only thing that happens is that my visitors no longer have a menu item to browse to the site root. (I've linked the logotype to the site root but not all users are aware or used to that). So removing the "Home" button in the menu doesn't really help me in my struggle to get new posts to become the initial view of my web site.

I think of my web site as an online new paper. When a reader browses to the start page they get to see the latest news at once. No need to drill.
If a news paper had no news on their start page, that is only showed a list of their different news categories they would soon loose most of their readers. It's about catching their interest instantly.


For example, just have a look at http://www.independent.co.uk/ What if they didn't list some news on the web root but just a dull list
It wouldn't work at all.But it's supposed to work in the "web forum world" for some (probably technical) reason.

Also if some reader browsed to http://www.independent.co.uk/ and got redirected to http://www.independent.co.uk/whats-new-2015-01-21/ it would be several problems. First problem is that the news paper doesn't have a site root URL. It would be severely punished by search engines. Antother problems that arises is that readers bookmarking what they believe is that newspapers site root actually only will work one day. Next day it will show old news.

I can't believe that I'm the only forum manager in the world thinking this way.

Sorry I had to do the above analogy. Can someone understand my "odd" request?
 
I can't believe that I'm the only forum manager in the world thinking this way.
I think people would either have a home page separate from xenforo, or use a portal, e.g. xenporta or CTA featured threads. (e.g. see my forum link below)

I don't think just having the new posts list is any better than having the forum list.
 
I think people would either have a home page separate from xenforo, or use a portal, e.g. xenporta or CTA featured threads. (e.g. see my forum link below)

I don't think just having the new posts list is any better than having the forum list.
Thanks! I actually just bought xenporta 2.0. :D
 
@Brogan and @Mr Lucky , long time has passed. I've used XenPorta and I've also used wf widgets to accomplish having a thread list as my sites index page. Both the mentioned solutions had their cons and pros but I've been looking for something more lightweight and stable and also trying to use what's already in XenForo.

I've now managed to write an add-on that extends XenForo_ControllerPublic_FindNew, modifying the functions actionPosts and findNewPosts. Using my add-on, /find-new never redirects and I can use "find-new/posts" as my "Index Page Route".

Also if I go to "http://mysite.com/?recent=1" the URL stays the same when showing the results. I recently had problems with members bookmarking their old searches (e.g. http://mysite.com/find-new/206516/posts).

Also, a couple of minor things had to be changed like page title, description, canonical and noindex. I also made the code a bit more user friendly/helpful by just getting the recent posts when there were to unread posts to fetch. (No reason to ask)

I think I will not release this add-on. The reason is that I had to override the functions actionPosts and findNewPosts. It was impossible to just extend them due to the redirection that occurred in the original code. That makes my add-on sensitive for future code changes and it will prevent other add-ons from extending the same functions.

Cheers!
 
Top Bottom