News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[GH#3028] Page index presentation locked in Sources

Started by Antechinus, August 26, 2015, 09:21:53 PM

Previous topic - Next topic

Antechinus

This is going to be a real nuisance if anyone decides they want different styling on the pages index for topics:

Code (MessageIndex.php) Select
// Decide how many pages the topic should have.
if ($row['num_replies'] + 1 > $context['messages_per_page'])
{
$pages = '« ';

// We can't pass start by reference.
$start = -1;
$pages .= constructPageIndex($scripturl . '?topic=' . $row['id_topic'] . '.%1$d', $start, $row['num_replies'] + 1, $context['messages_per_page'], true, false);

// If we can use all, show all.
if (!empty($modSettings['enableAllMessages']) && $row['num_replies'] + 1 < $modSettings['enableAllMessages'])
$pages .= ' &nbsp;<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0;all">' . $txt['all'] . '</a>';
$pages .= ' &#187;';
}


So you've inherited the old crud from 2.0.x, which locks in << and >> before and after the actual page index. There's no way of targetting it from outside of Sources. This is presentation stuff and should be handled via CSS. If you leave it to the CSS anyone can change it. If you lock it in Sources, it'll require a mod.

Not only that, but my bet is the same stuff is still locked into the other Sources files that control templates that use the small page index (unread posts, etc, etc) so it'll require a mod that targets a several Sources files, and since it involves deleting something out of the forced markup it's going to be a real PITA to do it with hooks, AFAICT.

Leave the Dark Side. Use CSS. :D

Antechinus

Oh yeah, this is a 2.1 bug. Would have added that to the previous post, but for some weird reason your permissions setup won't allow me to edit my post in this board.

Ninja ZX-10RR

Quote from: Antechinus on August 26, 2015, 11:02:10 PM
some weird reason your permissions setup won't allow me to edit my post in this board.
No weird reason, it's the way they set it up, you can't edit your posts now after an hour.

Besides good catch.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Oldiesmann

It appears to be fixed in some areas but not in others. I'll take a look in the coming days and see if I can clean it up some.
Michael Eshom
Christian Metal Fans

Ninja ZX-10RR

Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Oldiesmann

Michael Eshom
Christian Metal Fans

Advertisement: