Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
I need a way for a redirection to the latest new comment by clicking '%number% new'*
after enter into the theme by click it is focused by the last comment and #Item signature is added to the url .
How to make the entering without focusing to last comment?
2.0.18
0
Best Answers
-
For that, open the
/conf/config.php
in your Vanilla forum directory, and add this line at the end of the file:$Configuration['Vanilla']['Comments']['AutoOffset'] = FALSE;
0
Answers
For that, open the
/conf/config.php
in your Vanilla forum directory, and add this line at the end of the file:Thank you, badlearner
It doesnt go to the last comment.... it goes to the last comment you read.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
Well, I really need a way for a redirection to the latest new comment by clicking '%number% new' notification.
How to do this?
New comments in discussion list (and (New comments in Bookmarked))
???
////////////////////////////////////////
1
$Configuration['Vanilla']['Comments']['AutoOffset'] = TRUE;
further in file: forum\applications\vanilla\views\discussions\helper_functions.php
function WriteDiscussion(
2 change
$DiscussionUrlNew = '/discussion/'
setting to$DiscussionUrlNew='/forum/discussion/'
.3 adding definition
$DiscussionUrl = '/discussion/'.$Discussion->DiscussionID.'/'.Gdn_Format::Url($Discussion->Name);
4
if ($Session->IsValid() && $Discussion->CountUnreadComments > 0) echo '<strong><a href="'.$DiscussionUrlNew.'">'.Plural($Discussion->CountUnreadComments, '%s New', '%s New Plural').'</a></strong>';
5
in file: forum\applications\vanilla\controllers\class.discussioncontroller.php
comment lines
.............
bugs, bugs...
must be
1 paragraph in previous scheme changed to false
$Configuration['Vanilla']['Comments']['AutoOffset'] = FALSE;
5 paragraph - uncomment .
So 2-3 paragraphs make almost all right.
in this case the posted comment is positioned on page.
and a click on NEWS "tries" positioning on #Item
and a click on the Discussion opens it from startpost
But
UNproperly counting of news works now.
I make a new post in Safari - Get @1 new@ notification in Opera.
Click on @1 new@ - go to new post. then go to discussion list and get 15 new posts notification... ((((((
about 4 paragraph - making @Url-New@ for a link in the notification.
in class.discussioncontroller.php the $offset are counted and $limit.
then these variables are used in
so in 4th paragraph the same urls with pages must be used ....
Futher investigations....
in the Discussions List I set every discussion to be ended with "\p1" to show the first page by click. and latest comments ar shown by clicking the "new"-notification.
Clicking the p1-ended-discussion erases off $CountCommentWatch to the start of second page .
forum\applications\vanilla\views\modules\discussion.php