PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 How to fix login breaking out of frames 
Description: This will quickly show how to enable phpBB to login correctly when using frames
Author: Anon
Date: Wed Oct 26, 2005 8:26 am
Type: Fix
Keywords: login,frames,target
Category: Miscellanea
Intro

Ever notiiced that if you use frames for your site/forums, when phpBB attempts to login it breaks out of the frames that you use? Do not dispair, as I will attempt to provide a quick fix for this problem

Why use a frame?

You may be using frames more than you know. Some sites use them as they can preserve menus etc so they are sitewide. Also, they can be used as floating headers.

A very common reason is free domains. Services such as No-IP, .TK and uni.cc all offer free domain names, and all you have to do is place your forums address in and poof! The domain now points to your forums.

The catch with this though is they use frames to enable quick and easy pointing. While it is good for static web pages, it tends to break the login functionality of phpBB. As such, if you use a free domain name you may be best applying this fix if you encounter this problem

The fix

Open

phpBB2/templates/xxx/login_body.tpl

Note: xxx is a variable. On the default installation, it will be subSilver, but if you have installed another template( IE You don't use subSilver) then you will have to apply this fix to login_body.tpl for the other templates too

Find

Code:
<form action="{S_LOGIN_ACTION}" method="post" target="_top">


Replace with

Code:
<form action="{S_LOGIN_ACTION}" method="post" target="_self">


Save and upload

As with all MODs/file edits, backup before hand, in case something goes wrong. It's generally a good idea to keep regular SQL and file backups!

There is is. If you are having any problems whateoever with this or any other phpBB problem, don't hesitate to post in the Support forum and a knowledgable person will be able to help Smile

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.