News:

Wondering if this will always be free?  See why free is better.

Main Menu

mapping NEXT + PREV post to arrow keys

Started by supernova777, January 21, 2016, 09:49:53 PM

Previous topic - Next topic

supernova777

has anyone made a mod that can do this? the way u step thru pics on facebook .. with the cursor arrow keys.. left + right
i want to be able to move thru posts on my forum this way
can anyone help me

Kindred

IIRC someone has alreayd made this request and the consensus is that it is not easily done, if it's even possible at all
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mashby

I like what you are suggesting. And it surely makes sense for pictures. A picture is one thing. And navigation from one thing to another thing using arrow keys makes sense. But a topic is more than one thing. It could be if you only allowed the topic starter to make a topic and have no replies. But that would arguably be boring and against the grain of a forum. Posts are the foundation of any forum-based site and navigating posts like images isn't a real good user experience.
Always be a little kinder than necessary.
- James M. Barrie

supernova777

Quote from: mashby on January 21, 2016, 11:06:39 PM
I like what you are suggesting. And it surely makes sense for pictures. A picture is one thing. And navigation from one thing to another thing using arrow keys makes sense. But a topic is more than one thing. It could be if you only allowed the topic starter to make a topic and have no replies. But that would arguably be boring and against the grain of a forum. Posts are the foundation of any forum-based site and navigating posts like images isn't a real good user experience.

my threads are used to post information that is to be reviewed .. if the next + prev links stayed stationary in one vertically locked position i could use them for the same effect
but everytime a thread is reloaded the buttons move and u have to scroll to find them

for example click the buttons on THIS THREAD
at the top right "« previous next »"
and u will see what i mean that it scrolls the page all wacky so u cant keep skipping to the next thread
because it auto scrolls to the last post of the thread
why does it do that?

if i could remove the #new part of this link maybe it would work great

which file outputs these links so i can remove the anchor?

supernova777

come on guys..

i just need the filename to edit

supernova777

im trying to edit index.template.php
is that right?

Quote// If we're viewing a topic, these should be the previous and next topics, respectively.
   if (!empty($context['current_topic']))
      echo '
   <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
   <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

   // If we're in a board, or a topic for that matter, the index will be the board's index.
   if (!empty($context['current_board']))
      echo '
   <link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0" />';

   // We'll have to use the cookie to remember the header...
   if ($context['user']['is_guest'])
   {
      $options['collapse_header'] = !empty($_COOKIE['upshrink']);
      $options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']);
   }

   // Output any remaining HTML headers. (from mods, maybe?)
   echo $context['html_headers'];

i cant tell whats adding the "#NEW" in the link :(
maybe this isnt the right file

supernova777

please if someone could give me a bit of direction here ..

Irisado

Please avoid bumping your topic within 24 hours.  You have done this twice now, which, in addition to cross posting, is not allowed here.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

margarett

@supernova777, please drop the attitude. By being demanding, as well as not following the rules (like Irisado politely asked you, to which you responded with more attitude) and PM (multiple) Team members with support requests will only get you on people's ignore list...
This is a peaceful and polite request, please treat it as such ;)

Onto your question:
- the part where you move the selection with the keys should require some JavaScript and I suck at it :P so I can't help you
- The #new thing, this is built in Sources/Display.php:
// 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>' : '';

Just delete the 2 #new bits of that line and you should be fine.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

supernova777

AMAZING!!!   8) 8) 8) 8) 8) 8)

thank you very much .. it works ;)
its in the file u specified .. just search for $context['previous_next'] and there it is, in plain text .. just delete "#new" from both links and it works as i require

this was realyl frustrating because i was searching in the php files +getting no results..

supernova777

Quote from: margarett on January 22, 2016, 08:02:13 PM
@supernova777, please drop the attitude. By being demanding, as well as not following the rules (like Irisado politely asked you, to which you responded with more attitude) and PM (multiple) Team members with support requests will only get you on people's ignore list...
This is a peaceful and polite request, please treat it as such ;)

Onto your question:
- the part where you move the selection with the keys should require some JavaScript and I suck at it :P so I can't help you
- The #new thing, this is built in Sources/Display.php:
// 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>' : '';

Just delete the 2 #new bits of that line and you should be fine.

do u know which file attaches/includes/embeds the themes/default/scripts/*.js files?
i have a new library for doing the keybind i want to add to the page to attempt the keybind..
(a library called "mousetrap")

ok i thinki found it under themes/default/index.template.php

Advertisement: