Jumpbox für die Seitenzahlen

Du suchst einen bestimmten Mod, weißt aber nicht genau wo bzw. ob er überhaupt existiert? Wenn dir dieser Artikel nicht weiterhilft, kannst du hier den von dir gewünschten/gesuchten Mod beschreiben ...
Falls ein Mod-Autor eine der Anfragen hier aufnimmt um einen neuen Mod zu entwicklen, geht's in phpBB 2.0: Mods in Entwicklung weiter.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
insy
Mitglied
Beiträge: 208
Registriert: 31.10.2005 23:01
Kontaktdaten:

Jumpbox für die Seitenzahlen

Beitrag von insy »

Hallo,

ich suche ein Snippet mit dem man in die viewtopic.php / viewtopic_body.tpl eine Jumpbox einbauen kann, mit der man auf jede x-beliebige Seite des aktuellen Topics springen kann.. wäre sehr praktisch für große Topics :)
ähnlich wie auch im vBulletin..

LG
hell is others..
Mavo460
Mitglied
Beiträge: 368
Registriert: 07.09.2005 20:16
Wohnort: Oldenburg
Kontaktdaten:

Beitrag von Mavo460 »

Code: Alles auswählen

##############################################################
## MOD Title: Pagination Select List & Input Box
## MOD Author: chatasos < chatasos@psclub.gr > (Tassos Chatzithomaoglou) http://www.psclub.gr
## MOD Description: This mod adds a select list or an input box to your pagination options, to help you in case of many pages.
## MOD Version: 1.0.1
## 
## Installation Level: Easy
## Installation Time: 3 minutes
## Files To Edit: includes/functions.php
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##	- Javascript must be enabled in order for the mod to work correctly.
##
##	- The select list or the input box are displayed wherever the default phpbb pagination is used :
##	viewforum, viewtopic, memberlist, search, etc., when there are more than 10 pages to be displayed.
##
##	- In select list, you just choose the page from the drop-down list and you are transferred there.
##
##	- In the input box, you write the page number into it, you press enter and you are transferred there.
##
##	- You can change the number of pages which make the select list or input box to appear,
##	by changing "10" to your own value, in the following line:
##
##		if ( $total_pages > 10 )
##
##	- The select list is displayed when the number of pages is smaller than 100 and the input box is displayed 
##	when the number of pages is bigger than 100. You can change this value (100) to your own, in the following line:
##
##		if ( $total_pages < 100 )
##
##############################################################
## MOD History:
##
##	2005-09-15 - Version 1.0.1
##	- Fixed possible template "incompatibility"
##	- Changed functionality in order to use only one of the choices depending on the number of pages
##
##	2005-09-03 - Version 1.0.0 
##	- First release.
## 
##############################################################
## 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;
#
#-----[ BEFORE, ADD ]------------------------------------------
#
	/****************************************
	* MOD: Pagination Select List & Input Box
	****************************************/
	// BEGIN : BEFORE, ADD
	if ( $total_pages > 10 )
	{	
		if ( $total_pages < 100 )
		{
			$select_list = '<select onChange="if (this.options[this.selectedIndex].value != -1) { window.location.href = this.options[this.selectedIndex].value; }">';

			for ($i = 1; $i <= $total_pages; $i++)
			{
				$select_list .= '<option value="' . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '"' . ( ( $i == $on_page ) ? ' selected="selected"' : '' ) . '>' . $i . '</option>';
			}

			$select_list .= '</select> ';
			$input_box = '';
		}
		else
		{
			$input_box = '<input type="text" size="4" value="'.$on_page.'" onKeyPress="var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; if ( keyCode == 13 ) { var page_no = parseInt(this.value, 10); if ( !isNaN(page_no) && page_no <= '.$total_pages.' && page_no > 0) { var start = String((page_no - 1)*'.$per_page.'); window.location.href = \'' . append_sid($base_url . '&start=\'+start+\'') . '\'; return false;} else { this.value = '.$on_page.'; return false;} }" /> ';
			$select_list = '';
		}
	}
	else
	{
		$input_box = '';
		$select_list = '';
	}

	$page_string = $input_box . $select_list . $page_string;
	// END : BEFORE, ADD

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Benutzeravatar
insy
Mitglied
Beiträge: 208
Registriert: 31.10.2005 23:01
Kontaktdaten:

Beitrag von insy »

Oh, vielen Dank dir <3
hell is others..
Antworten

Zurück zu „phpBB 2.0: Mod Suche/Anfragen“