| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
- Pages:
- 1
- 2
| [ ! ] Autodirect to Last Post when Clicking Thread | |
|---|---|
| Tweet Topic Started: Mar 8 2015, 12:05 PM (754 Views) | |
| Kractero | Mar 8 2015, 12:05 PM Post #1 |
|
Member
![]() ![]() ![]()
|
Is there a way to only autodirect if you have not read the post? Automatically directing you to the last post is annoying. |
![]() |
|
| Cory | Mar 12 2015, 09:41 PM Post #2 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I put a code together to accomplish this effect, but it's not working properly and I cannot figure out why. It redirects to the first topic page no matter what the alt text of the topic marker is.I'll leave the code here for another coder to look at. |
![]() |
|
| ItalicJupiter | Oct 1 2015, 01:21 AM Post #3 |
|
Member
![]() ![]() ![]()
|
This code is not working. I tried it many times and its still not working.
|
![]() |
|
| Moonface | Oct 1 2015, 06:30 AM Post #4 |
![]()
|
Cory stated the code does not work properly and that he hopes another coder can figure out why. |
![]() |
|
| ItalicJupiter | Oct 1 2015, 03:10 PM Post #5 |
|
Member
![]() ![]() ![]()
|
Its been 7 months. I'm not sure if Coder can figure it out. Which one this code for...? JavaScript? Top of the Page? Or Above the Board..? Edited by ItalicJupiter, Oct 1 2015, 03:12 PM.
|
![]() |
|
| DaPizzaMan | Oct 1 2015, 03:42 PM Post #6 |
![]()
#TeamSupport
![]()
|
@Cory: It's because you're actually loading the topic page when you use the GET request on the topic URL, which makes the topic icon always turn out to be the "No New" one. For anyone who wants such a code, it wouldn't be realistic to achieve such a code. |
![]() |
|
| Moonface | Oct 1 2015, 04:00 PM Post #7 |
![]()
|
The code simply does not work to send users to the last post in a thread automatically. Placing it anywhere on your board will be a waste. As DPM has pointed out, a code to achieve this isn't possible and therefore the code Cory supplied can not be fixed, and therefore is unusable to achieve an effect of sending users to the last post in a thread. |
![]() |
|
| Quozzo | Oct 1 2015, 04:11 PM Post #8 |
|
By the blood of Sanguinius!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
What should happen if they have read the post? Should it go to the first page? |
![]() |
|
| DaPizzaMan | Oct 1 2015, 04:16 PM Post #9 |
![]()
#TeamSupport
![]()
|
Well, by default, if there is a new post (meaning the user has not read the topic), the user is sent to the new post. Any time after that, while there are no new posts, the user is sent to the top of the last page. So I assume when the user has read the new post, instead of going to the top of the last page, he/she should be sent to the first? Technically the person who requested this didn't specify what he wants to do when the topic has been read. |
![]() |
|
| Quozzo | Oct 1 2015, 04:18 PM Post #10 |
|
By the blood of Sanguinius!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
It always goes to the last post in the last page when i've read all posts in a topic. I know the OP didn't specify what should happen (hence the question ) but I'm opening it up to the community to see if there is a consensus on the matter.
|
![]() |
|
| DaPizzaMan | Oct 1 2015, 04:31 PM Post #11 |
![]()
#TeamSupport
![]()
|
Yes, you're right. I was thinking about how that does not happen when #new is removed from the URL. Which doesn't happen when clicking on a topic URL from anywhere unless specifying a page number. If I may ask, what would you plan to do based on the answer to your question? |
![]() |
|
| Quozzo | Oct 1 2015, 04:43 PM Post #12 |
|
By the blood of Sanguinius!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
...this...
it just opens the first page. Edit the value for `location.href` as you see fit ![]() Oops. made a booboo Edited by Quozzo, Oct 1 2015, 04:44 PM.
|
![]() |
|
| DaPizzaMan | Oct 1 2015, 04:48 PM Post #13 |
![]()
#TeamSupport
![]()
|
And what about clicking a topic link from the index? |
![]() |
|
| Quozzo | Oct 1 2015, 05:04 PM Post #14 |
|
By the blood of Sanguinius!
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Oh right, yeah. I never do that. That would require AJAX (as Cory did). If the board orders the topics by last post then entering the forum and using my code above would suffice (as it would be the top topic (unless there has been another post in the space of the page loading and the user clicking the link)). But if it's ordered by OP like the request forum then it wont work. I thought specifying a user (like this) might have worked, but alas, ZB is being ZB! |
![]() |
|
| DaPizzaMan | Oct 1 2015, 05:08 PM Post #15 |
![]()
#TeamSupport
![]()
|
Even then, what if the topic is in a subforum? Then you'll have to look through the forum and each of its subforums until you find the topic. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Closed Requests · Next Topic » |
- Pages:
- 1
- 2
| Track Topic · E-mail Topic |
3:23 PM Jul 11
|


![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)




) but I'm opening it up to the community to see if there is a consensus on the matter.

3:23 PM Jul 11