Skip to main content
Topic: Sauces stuff (me luv sauces) (Read 6585 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sauces stuff (me luv sauces)

Ok, I found it! Nice try on hiding it, but it didn't work. :D

Display.controller.php
Code: [Select]
		// Create a previous next string if the selected theme has it as a selected option.
$context['previous_next'] = $modSettings['enablePreviousNext'] ? '<a href="' . $scripturl . '?topic=' . $topic . '.0;prev_next=prev#new">' . $txt['previous_next_back'] . '</a> - <a href="' . $scripturl . '?topic=' . $topic . '.0;prev_next=next#new">' . $txt['previous_next_forward'] . '</a>' : '';
if (!empty($context['topic_derived_from']))
$context['previous_next'] .= ' - <a href="' . $scripturl . '?msg=' . $context['topic_derived_from']['derived_from'] . '">' . sprintf($txt['topic_derived_from'], '<em>' . shorten_text($context['topic_derived_from']['subject'], !empty($modSettings['subject_length']) ? $modSettings['subject_length'] : 24)) . '</em></a>';

So I was wondering how much of a bother it would be to split the topic_derived_from stuff into a seperate thingy for use in the template.

What got me thinking about this was that the current arrangement seems a bit odd. When viewing the template, it sort of reads like "Next Topic - Topic derived from .....", which is not the case with the next topic, if you see what I mean.

If it's not too much trouble to call the derived bit seperately, that would give more scope for where people want it. Alternatively, if it's better to call it as part of something else, we just find a better way of displaying it in the browser. I'm inclined to think it would be better in the same brackets as the (Read **** times), or something.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Sauces stuff (me luv sauces)

Reply #1

I put it there because... well, I didn't know where else put it... lol

 emanuele has always good reasons to do things.
Last Edit: June 14, 2013, 06:58:56 am by emanuele
Bugs creator.
Features destroyer.
Template killer.

Re: Sauces stuff (me luv sauces)

Reply #2

K. @todo :D
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Sauces stuff (me luv sauces)

Reply #3

Done in a commit I still have to push online.
In the meantime I also separated the previous and next links.
Well, in fact In that commit I did something more, I used the $context['links'] array as a "container" for both the links used in the header and these links (I didn't want to invent yet another index for $context :P).
Bugs creator.
Features destroyer.
Template killer.