Jump to page MOD (go to specific page)

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
danmax
Registered User
Posts: 64
Joined: Thu Nov 25, 2004 12:44 am
Location: Santa Barbara, California

Jump to page MOD (go to specific page)

Post by danmax »

There was a great mod back in phpBB2 where you could jump to any page in threads or topics where there are a lot of pages. It looked like this below. Is there something similar available for phpBB 3.0.0.

Always thanks

#################################################################
## Mod Title: Goto specific page
## Mod Version: 1.0.0
## Author: mkiefer <mkiefer@earthlink.net>
## Description: Adds a drop-down list to the pagination whenever more than 5 pages are available. This allows users to jump to page #s which may not otherwise be displayed (because "..." may be used instead.
##
## Installation Level: Easy
## Installation Time: 1-2 Minutes
## Files To Edit: includes/functions.php## Included Files: N/A
#################################################################
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################

#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]------------------------------------------
$page_string = $lang['Goto_page'] . ' ' . $page_string;
#
#-----[ REPLACE ]----------------------------------------------
#
/// --- BEGIN MOD: Goto specific page
if ( $total_pages > 5 )
{
$select_page = ' <select name="generate_pagination" onChange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">';
for($i = 1; $i <= $total_pages; $i++)
{
$selected = ( $i == $on_page ) ? ' selected="selected"' : ''; // highlight current page by default
$select_page .= '<option value="' . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '"' . $selected . '>' . $i . '</option>';
}
$select_page .= '</select>:';
}
else
$select_page = '';
/// --- END MOD: Goto specific page

$page_string = $lang['Goto_page'] . $select_page . ' ' . $page_string;
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: Jump to page MOD (go to specific page)

Post by ameeck »

In prosilver, try looking at a topic with more pages and click the Page 1 of XX link next to the page number boxes, a query box for jumping to another page will appear :-)
danmax
Registered User
Posts: 64
Joined: Thu Nov 25, 2004 12:44 am
Location: Santa Barbara, California

Re: Jump to page MOD (go to specific page)

Post by danmax »

I'm using Subsilver2. Back in 2.0.22, here's what the Jump to Page looked like:

Image
User avatar
Interlog
Registered User
Posts: 1258
Joined: Sat Jun 11, 2005 4:11 pm
Location: London, UK
Contact:

Re: Jump to page MOD (go to specific page)

Post by Interlog »

The same applies for the subsilver2 style.. just press the "Go to page" link when viewing a topic and you can type in the page number you wish to navigate to.

Mark :D
Image
319
Registered User
Posts: 144
Joined: Fri Dec 21, 2007 12:47 am
Contact:

Re: Jump to page MOD (go to specific page)

Post by 319 »

danmax wrote: #
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]------------------------------------------
$page_string = $lang['Goto_page'] . ' ' . $page_string;
#
I didn't have this in my phpBB 3.0 Gold in functions.php!!!
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Scotland
Name: Kenny Cameron
Contact:

Re: Jump to page MOD (go to specific page)

Post by stickerboy »

That's because it's phpBB2 code - the OP is looking for this MOD ported to phpBB 3.
This is already included with prosilver (kind of) - see my screenshots.
Not available in subSilver2 (can't remember why though).
Attachments
phpbb2.gif
phpbb2.gif (24.31 KiB) Viewed 312 times
phpbb1.gif
phpbb1.gif (9.48 KiB) Viewed 453 times
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
danmax
Registered User
Posts: 64
Joined: Thu Nov 25, 2004 12:44 am
Location: Santa Barbara, California

Re: Jump to page MOD (go to specific page)

Post by danmax »

Thanks for all the feedback you guys. I guess there are some things I had come to enjoy in the old board, but the new board 3.0.0 is really fine. I will just click it up in this next generation.

And really, thanks again for all the replies!
Locked

Return to “[3.0.x] MOD Requests”