News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Small linking error

Started by Dav999, November 29, 2014, 07:21:52 PM

Previous topic - Next topic

Dav999

Not sure if this has ever been reported, but on the page in the admin center to view all attachments, the links to posts containing the attachments look like this: (...)/index.php?topic=123.0.msg12345#msg12345. As a result, the link always leads to the first page of the topic. Nothing really major, as you can just remove the 0 from the URL, but I thought I'd point it out so it can be fixed. :)

This happens in both 2.0.x and the 2.1 beta (and probably 1.1.x too but I haven't tested it on that).

ApplianceJunk

Hmm, my links from ( /index.php?action=admin;area=manageattachments ) seem to lead to the post the attachment is in and not to the top of the topic as they do for you. Unless I'm not understanding you correctly.

Arantor

Confirmed.

2.0 fix - ManageAttachments.php approx line 419

$date .= sprintf(\'<br />%1$s <a href="%2$s?topic=%3$d.0.msg%4$d#msg%4$d">%5$s</a>\', $txt[\'in\'], $scripturl, $rowData[\'id_topic\'], $rowData[\'id_msg\'], $rowData[\'subject\']);

Replace with
$date .= sprintf(\'<br />%1$s <a href="%2$s?topic=%3$d.msg%4$d#msg%4$d">%5$s</a>\', $txt[\'in\'], $scripturl, $rowData[\'id_topic\'], $rowData[\'id_msg\'], $rowData[\'subject\']);

Steve

DO NOT pm me for support!

shawnb61

Closing this one out, as the fix was applied in a prior release.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: