[ALPHA] Placing the JUMPBOX in overall_header.tpl

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
florenceacademyforum
Registered User
Posts: 6
Joined: Tue Jan 29, 2008 3:21 pm

[ALPHA] Placing the JUMPBOX in overall_header.tpl

Post by florenceacademyforum » Tue Jan 29, 2008 3:59 pm

How I added the Jumpbox to my page header:

This is more of a design change. I'm not really sure if this counts a MOD but it made my users very pleased, because the jumpbox now remains fixed thoughout my entire board. You can see the results at:

http://florenceacademyforum.com/phpBB/

The jumpbox is normally located near the bottom of viewforum_body.tpl

Code: Select all

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
	<td align="right">{JUMPBOX}</td>
  </tr>
</table>
Note that {JUMPBOX} appears outside of the <form> tags that encompass most of this page. When I put it inside a form tag it wouldn't work. ;)

Placing {JUMPBOX} in another tpl file is simple enough, but the .php file that calls it must include this line:

Code: Select all

make_jumpbox('viewforum.'.$phpEx);
taken from viewforum.php:

Code: Select all

$template->set_filenames(array(
	'body' => 'viewforum_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx);

In order to add the jumpbox to overall_header.tpl we need to open includes/page_header.php

find this

Code: Select all

$template->set_filenames(array(
	'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl')
);
and after add:

Code: Select all

make_jumpbox('viewforum.'.$phpEx);
Now you can add {JUMPBOX} anywhere in overall_header.tpl (so long as it's outside of any <form></form> tags.) I also left the original jumpbox in on the viewforum page. Originally I had tried to use the jumpbox twice within viewforum_body.tpl but I discovered that a second jumpbox in any single .tpl file was giving me errors, such as "The forum you selected does not exist."

I think it's a good idea to speed up navigation by putting the jumpbox up at the top and keeping it there always. Please let me know if this method causes you any problems.

Also check out the redesigned jumpbox mod:
http://www.phpbb.com/community/viewtopic.php?t=373610
Last edited by florenceacademyforum on Mon Jul 14, 2008 8:17 pm, edited 1 time in total.
www.florenceacademyforum.com Running phpBB 2.0 bridged w/ Coppermine 1.4.1. MODS : Calendar Pro, eventlists, last_visited_1.1.1, Admin Userlist, Extended Private Message Notification, redesigned_jumpbox_100, Phoogle Maps, Skype, facebook, myspace

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25185
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Placing the JUMPBOX in overall_header.tpl

Post by Paul » Fri Feb 01, 2008 8:49 pm

Hello,

Please edit your topic title with a prefix as outlined in Modifications Development Forum Rules, section 3.a. This will allow people to see the development status of your modification at a glance.

Thank you,
The phpBB Modifications Team
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

NWCPNE1
Registered User
Posts: 222
Joined: Sat Feb 02, 2008 8:28 pm

Re: Placing the JUMPBOX in overall_header.tpl

Post by NWCPNE1 » Mon Apr 07, 2008 7:31 pm

Excellant, works a treat. Thanx
http://www.nwcpnefc.co.uk for PNE Fans in North Wales and Cheshire, but we welcome all, including fans from other clubs.

florenceacademyforum
Registered User
Posts: 6
Joined: Tue Jan 29, 2008 3:21 pm

Re: [ALPHA] Placing the JUMPBOX in overall_header.tpl

Post by florenceacademyforum » Mon Jul 14, 2008 8:20 pm

It's not really a MOD in my opinion, but I put [ALPHA] as in, "I think it works and others do to." :mrgreen:
www.florenceacademyforum.com Running phpBB 2.0 bridged w/ Coppermine 1.4.1. MODS : Calendar Pro, eventlists, last_visited_1.1.1, Admin Userlist, Extended Private Message Notification, redesigned_jumpbox_100, Phoogle Maps, Skype, facebook, myspace

Post Reply

Return to “[2.0.x] MODs in Development”