I noticed this:

in this function:
function sc_newflag()
{
if(USER && is_array($this->newFlagList) && in_array($this->var['forum_id'], $this->newFlagList))
{
$url = $this->sc_lastpost('url');
return "<a href='".$url."'>".IMAGE_new.'</a>';
}
elseif(empty($this->var['forum_replies']) && defined('IMAGE_noreplies'))
{
return IMAGE_noreplies;
}
return IMAGE_nonew;
}
if I echo $url, output has already a tags:
<a href='/user.php?id.2'>username</a> <a href='/forum/dkdhvdbd/3/test/?last=1#post-3'><span data-livestamp="1481490078">36 mins ago</span></a>
No chance to test but forum_viewforum php line 821 :
$tVars->NEWFLAG = "".IMAGE_new."' < / a > ';
should it not be :
$tVars->NEWFLAG = "".IMAGE_new." " < / a > ";
see last quotation as code line starts with " should also end with " ? I added spaces to keep code visible, else it will delete the close A tag (the A tag is NOW surrounded by 2 " instead of ' tag ' .
edit : same goes for lines : 265; 500; 831
@tgtje I really don't know, first time working with forum plugin and I was able to find this code just by trying to change something and will see if something was changed.
Problem is from forum_template.php
$FORUM_TEMPLATE['main']['forum'] = "<tr>
<td>{NEWFLAG}</td>
and there is code from shortcode above.
By the way, I am still on main forum page, maybe you are right, I will find this later.
Same issue

@Jimmi08 @martyshep As soon i can, i'll give it a look, to see if i can solve it.
@tgtje Aren't you using a old forum code? Those $tvars are long gonne...
P.S.: It has something to do with the lastpost shortcode. As soon i can, i'll debug it...
@all Definetly, it's with sc_lastpost call. My fault...
Try change
$url = $this->sc_lastpost('url');
to this
$url = $this->sc_lastpost(array( 'type' => 'url'));
Please test it...
Currently i can't, so i'm trying to solve this from memory....
Hi @rica-carv I can't see the code similar to $url = $this->sc_lastpost('url'); within viewforum_shortcodes.php on master or on your branch of it. Wait.. Master is same as your branch for viewforum_shortcode.php anyway.
What I do see are:
function sc_newflag()
{
//-- global $newflag_list;
global $forum;
$newflag_list = $forum->forumGetUnreadForums();
/--
if(USER && is_array($newflag_list) && in_array($this->var['forum_id'], $newflag_list))
{
return "var['forum_id'])."'>".IMAGE_new.'';
}
return IMAGE_nonew;
--/
// $url = e107::getUrl()->create('forum/forum/mfar', 'id=' . $this->var['forum_id']);
$url = e107::url('forum', 'markread', $this->var);
return (USER && is_array($newflag_list) && in_array($this->var['forum_id'], $newflag_list)) ? "<a href='" . $url . "'>" . IMAGE_new . '</a>' : IMAGE_nonew;
and
function sc_newflag()
{
global $newflag_list;
if(USER && is_array($newflag_list) && in_array($this->var['forum_id'], $newflag_list))
{
return "<a href='".e107::getUrl()->create('forum/forum/mfar', 'id='.$this->var['forum_id'])."'>".IMAGE_new.'</a>';
}
return IMAGE_nonew;
}
@martyshep It's not in viewforum_shortcodes.php, it's in forum_shortcodes.php.
Sorry for all this mess...
Ok, my bad, files a little older.
After deeper investigation i discovered it actually is a break not fully implemented ? ..
i changed line 352 forum_shortcodes to
return "<a href='".$url."<br />".IMAGE_new."</a>";
outcome top 2 images
the bottom one is same but AFTER applied proposed patch

What to do ?
Interestingly the issue shown in 'old screen' disappears after the forum
post is read, but then when someone posts again, I get the old screen image
again.
On Mon, 12 Dec 2016 at 17:56 leo notifications@github.com wrote:
Ok, my bad, files a little older.
After deeper investigation i discovered it actually is a break not fully
implemented ? ..i changed line 352 forum_shortcodes to
return " I've tested my patch with latest files, in a clean e107 setup, and it returns the new forum flag with the correct url to the latest topic, as is intended to be...
@rica-carv correct your patch works 👍 but what i meant to express : in pre patch there was also the author and the time (textual) (linkage IS divided in 2 url's, correct). (left 1st column).
What to do : keep that extra info ? or use the new patching (only fa-star)? ( do we need/want User + text time?) It is an extra pointer, but also happens on right side too....
@martyshep the appearance of the old is correct by means of execute > when the post is 'read' the function is done, and will only show up in right side from there on. This untill a newer post exists (unread).
@tgtje The appearence is exactly the same as was before this mess up.
The last poster name & date is always on the right, there's no need (or logic) to have it again on the left side, above the star.
Old newflag code ($fVars->NEWFLAG):
if(USER && is_array($newflag_list) && in_array($f['forum_id'], $newflag_list))
{
$fVars->NEWFLAG = "<a href='".$e107->url->create('forum/forum/mfar', $f)."'>".IMAGE_new.'</a>';
}
elseif(empty($f['forum_replies']) && defined('IMAGE_noreplies'))
{
$fVars->NEWFLAG = IMAGE_noreplies;
}
else
{
$fVars->NEWFLAG = IMAGE_nonew;
}
As you can see, the newflag shortcode has never returned the last post author or date....
I'm no coder but I returned my forum to previous behaviour with this:
$url = $this->sc_lastpost('url');
return IMAGE_new;
}
elseif(empty($this->var['forum_replies']) && defined('IMAGE_noreplies'))
{
return IMAGE_noreplies;
}
return IMAGE_nonew;
Ok, before messup( harsh : code error) the code should NOT have been displayed in the first column.
Hence the original post asked as it was visible.
quote : no need (or logic) ?? _hmmmm it does trigger possible use for other things_ .... (despite wrong used code before). ( a keeper)
As for the eye of the beholder i leave it open. (logic = right = ok). I can vision users that are drawn to text instead of knowledge of the glyphs.
@martyshep If you have the latest github files, there's no way that code is acting correct... Have you cleaned cache before testing it?
@tgtje You can still have the lastpost user name & date via shortcode:
{LASTPOST:type=username} {LASTPOST:type=datelink}
You can put them wherever you like, even twice in the same template....