Hiya,
I'm using SSI.php to create a list of latest topics.
When I click on a new topic it takes me right to the end posting of that topic because the link has the #new at the end.
How do I get rid of that?
Thanks,
Armada
it doesn't take you to the end posting... it takes you to the first post in the thread which is not marked as "read by you"
You would need to modify SSI.php.
you must be fetching latest post but not latest topics, if you fetch latest topics function then it should take you to latest topic only but not the latest post on that topic.
You should use :
ssi_boardNews($board = null, $limit = null, $start = null, $length = null, $output_method = 'echo')
boardnews? no, I don't think so. That fetches the entire post
ssi_recentTopics();
However... recentTopics AND recentPosts both include the #new
Guess, you are right, wanted to mention recentTopics(), however from recent topic, if he takes it as array, then can create url without #new thing.
Any help on this please?
Maybe knowing how you are using it would help quite a bit...
BTW I would do:
require_once('SSI.php');
$topics = ssi_recentTopics(WHATEVERYOUWANT, null, null, 'return');
foreach ($topics as $topic)
echo '<a href="' . $scripturl . '?topic=' . $topic['topic'] . '.0'">' . $topic['subject'] . '</a>';
Thanks for the help.
In the end, it was pretty easy.
I opened SSI.php and looked for the function ssi_recentTopics();
I then searched for ;topicseen#new and removed it.
Et voila! :)
#new takes you to the first unread post in the topic... surely that's a good thing?
Yes, that's a brilliant thing if you want all users to jump to the very latest and last message of every post. I can see that's really useful for a list of latest replies,
I was asking how to remove this behaviour, because we're using it for a slightly different purpose - a list of latest active topics.
I prefer it so that users are taken to the top of the page to read some of the messages above it so that they could get the context of the latest reply. It saves having to scroll up each time. :)
So, in reality it does become a list of "recent active Topics" rather than "recent replies". It also stops multiple replies on the same topic appearing on the list.
I suppose we all have our own preferences, and that makes things interesting.
Lainaus käyttäjältä: Armada - lokakuu 14, 2013, 09:34:37 AP
Yes, that's a brilliant thing if you want all users to jump to the very latest and last message of every post. I can see that's really useful for a list of latest replies,
Except if you read my post, that IS NOT WHAT IT DOES.
The whole point of #new is to go to the first post in a topic you have not yet read. That may be the last post in the topic. It frequently isn't, though.
If you haven't read the last two messages in a topic, you don't get pushed to the last one, you get pushed to the last one you haven't seen yet.
In fact there is still a 1/15 chance it still won't do what you want either ;)
Yes, I did read your post, unfortunately it did not answer the question, it just explained what the behaviour of the #new was or what it did, and your reply was after I'd posted the solution myself, just in case it would help somebody.
It's not a critisism of the '#new' thing, chill, it's just I don't want it for the way we integrate the forum with our own pages.
Now we have a wonderful list that does the following:
1) It lists all the topics that have been most recently contributed to.
2) It does not duplicate the topics that has more than one reply.
When they click on a topic:
1) It takes people to the last page of the topic if there are multiple topics.
2) It takes people to the top of the page.
Perfect for us, 100%. :) It does exactly what I want now, thank you for your concern, it works like a charm. :)
LainaaWhen they click on a topic:
1) It takes people to the last page of the topic if there are multiple topics.
2) It takes people to the top of the page.
Except it doesn't necessarily do that, which is the point. If the link has a .new in it as well, it will go to whichever page the last unread will be on, which could just as easily be the previous page in a multipage topic.
Nope. To coin your own phrase, "If you'd read my last post" you would have seen:
Perfect for us, 100%. :) It does exactly what I want now, thank you for your concern, it works like a charm. :)
Perfecto