Scroll To Top

Extensions & Styles for phpBB 3.1.X maintained and supported by Stoker
Jammy Johnny
BBCoder I
BBCoder I
Posts: 4
Joined: 28 Dec 2014, 13:55
BBCodes: 25
Favourite MOD: Pages
Location: Scotland

Re: Scroll To Top

Post by Jammy Johnny »

Great little extension. All these add up to make great looking boards. Thank you. A couple more and I will soon be hitting the donate button
Jammy Johnny
BBCoder I
BBCoder I
Posts: 4
Joined: 28 Dec 2014, 13:55
BBCodes: 25
Favourite MOD: Pages
Location: Scotland

Re: Scroll To Top

Post by Jammy Johnny »

Has this stopped working since 3.1.3
User avatar
Stoker
Site Admin
Site Admin
Posts: 3545
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Re: Scroll To Top

Post by Stoker »

Still works here
Board rules! No PM support
Leinad4Mind
BBCoder II
BBCoder II
Posts: 27
Joined: 28 Apr 2011, 10:55

Re: Scroll To Top

Post by Leinad4Mind »

Hi there stoker. I need help on this, if you could help. Dont know where I could post this since I cant create new topics no more oO

Description: Adds a last post link to take you to the last post in the topic.

Open viewtopic.php
find:

Code: Select all

// Replace naughty words in title
$topic_data['topic_title'] = censor_text($topic_data['topic_title']);
add after:

Code: Select all

$view_topic_url_params = 'f=' . $forum_id . '&t=' . $topic_id;
find:

Code: Select all

   'U_EMAIL_TOPIC'         => ($auth->acl_get('f_email', $forum_id) && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=email&t=$topic_id") : '',
add after:

Code: Select all

    // begin last post
	'U_LAST_POST'			=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&p=' . $topic_data['topic_last_post_id']) . '#p' . $topic_data['topic_last_post_id'],
   // end last post
Open language/en/viewtopic.php
find:

Code: Select all

   'LINKAGE_FORBIDDEN'      => 'You are not authorised to view, download or link from/to this site.',
add before:

Code: Select all

   'LAST_POST'            => 'Go to last post',
Open styles/prosilver/template/viewtopic_topic_tools.html
find:

Code: Select all

<!-- IF PAGE_NUMBER --><!-- IF PAGINATION -->
add after:

Code: Select all

&bull; <a href="{U_LAST_POST}">{L_LAST_POST}</a>
After all those edits I'll have a link to the last post of the topic. If the topic has 3 pages it will take me to the last post of the 3rd page.
BUT, what I really want to acheive is to go to the last post of the current page.
So if a topic has 3 pages and im on the 2nd page and click that button, then I need to be redirected to the last post of that 2nd page.

Can you help? THANKS!