aos101
08-12-2006, 07:59 AM
No one seemed to notice my mention of the bug here (http://www.vbadvanced.com/forum/showpost.php?p=91903&postcount=2), so I thought I'd put it in its own thread. The last post icon which links to the last post in the news archive is still using the old format link in vBadvanced 2.2.0, so clicking the links gives an error. The lastesttopics module seems to have been updated to the new format and latesttopics.php fetches thread.lastpostid from the database, but news.php doesn't fetch this field at all and the adv_portal_news_archivebits template hasn't been updated. I've just checked the download and the template in vbacmps_install.php still has the old format link.
I've managed to fix this myself, but the download on the site should be updated with a fix I think. To fix it:
In modules/news.php find on line 107:
thred.threadid,
And put straight after it:
thread.laspostid,
So it looks like (obviously without the '...'):
thread.threadid, thread.lastpostid, post.title, thre....
Then in the adv_portal_news_archivebits template find:
<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]goto=lastpost&t=$news[threadid]">
And replace with:
<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]p=$news[lastpostid]#post$news[lastpostid]">
Anyone who applies this fix does so at their own risk - if it breaks your board don't blame me (my fix may be wrong, but works for me). People should wait until Brian fixes this, unless you really know what you are doing.
Edit: Changed last post link format so it works with Opera, as mentioned here (http://www.vbadvanced.com/forum/showpost.php?p=92218&postcount=29).
I've managed to fix this myself, but the download on the site should be updated with a fix I think. To fix it:
In modules/news.php find on line 107:
thred.threadid,
And put straight after it:
thread.laspostid,
So it looks like (obviously without the '...'):
thread.threadid, thread.lastpostid, post.title, thre....
Then in the adv_portal_news_archivebits template find:
<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]goto=lastpost&t=$news[threadid]">
And replace with:
<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]p=$news[lastpostid]#post$news[lastpostid]">
Anyone who applies this fix does so at their own risk - if it breaks your board don't blame me (my fix may be wrong, but works for me). People should wait until Brian fixes this, unless you really know what you are doing.
Edit: Changed last post link format so it works with Opera, as mentioned here (http://www.vbadvanced.com/forum/showpost.php?p=92218&postcount=29).