ElkArte Community

Title: Sauces stuff (me luv sauces)
Post by: Antechinus on June 13, 2013, 10:42:32 pm
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.
Title: Re: Sauces stuff (me luv sauces)
Post by: emanuele on June 14, 2013, 05:45:04 am
I put it there because... well, I didn't know where else put it... lol

/me has always good reasons to do things.
Title: Re: Sauces stuff (me luv sauces)
Post by: Antechinus on June 14, 2013, 06:20:20 am
K. @todo :D
Title: Re: Sauces stuff (me luv sauces)
Post by: emanuele on September 08, 2013, 06:13:39 am
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).