| Another blank page template | |
Posted: 02/24/2006 2:18 PM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 1:36 PM
Location: St Pete, FL
|
|
|
|
|
|
binarypsycho, this is what you need to do to correct your problem. Make a backup of your template.php file. Then open another copy in your editor and replace all the contents with the following. Make sure you Expand this window so that you get all the code. I would normally offer you a text link for this file but my FTP Application is hosed at the moment due to my HDD problem and installing it may hose Windows again. So this is the next best option...
Code:
|
<?php
/********************************************************************* ******
* template.php [ Blank Template MOD ]
* -------------------
* Début : 08-08-2004
* Auteur : Poupoune < >
* Contact : http://php-tools.org/poupoune/
*
********************************************************************* ******/
// standard hack prevent
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
// standard session management
$page_template = - (intval($HTTP_GET_VARS['page']) + PAGE_TEMPLATE);
$userdata = session_pagestart($user_ip, $page_template);
init_userprefs($userdata);
// On récupère les données
if( $HTTP_GET_VARS['page'] )
{
$sql = "SELECT * FROM ". ADD_PAGES_TABLE ."
WHERE page_id = ". intval($HTTP_GET_VARS['page']);
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete forum information!", "", __LINE__, __FILE__, $sql);
}
if( $row = $db->sql_fetchrow($result) )
{
if( $userdata['session_logged_in'] )
{
if( ( $userdata['user_level'] == ADMIN ) || ( $userdata['user_level'] >= $row['page_auth'] ) )
{
// set page title
$page_title = $row['page_name'];
$page_content = $row['page_content'];
}
else
{
$message = sprintf($lang['Not_auth'], $lang['Moderators']);
message_die(GENERAL_MESSAGE, $message, '', '', '', '');
}
}
else
{
if ( !$userdata['session_logged_in'] && $row['page_auth'] == -1)
{
// set page title
$page_title = $row['page_name'];
$page_content = $row['page_content'];
}
else if( $row['user_auth'] != ANONYMOUS )
{
$message = sprintf($lang['Not_auth'], $lang['Users']);
message_die(GENERAL_MESSAGE, $message, '', '', '', '');
}
}
}
else
{
$page_content = '';
message_die(GENERAL_MESSAGE, $lang['No_page_exists'], '', '', '', '');
}
}
else
{
$page_content = '';
message_die(GENERAL_MESSAGE, $lang['No_page_exists'], '', '', '', '');
}
// standard page header
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
// assign template
$template->set_filenames(array(
'body' => 'template.tpl')
);
$template->assign_vars( array(
'PAGE_TITLE' => $page_title,
'PAGE_CONTENT' => $page_content
));
$template->pparse('body');
// standard page footer
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
|
|
|
|
|
|
Back to Top |
|
|
| Another blank page template | |
Posted: 02/24/2006 3:11 PM |
|
|
|
|
Hummingbird |
Posts |
3 |
Word Cnt. |
477 |
BDay |
N/A |
Sign |
N/A |
|
|
|
|
|
Joined: Feb 21, 2006
Local time: 12:36 PM
|
|
|
|
|
|
Nightrider, thanks a lot for all this effort!
I'll give this one a try and then i'll reply if it works!
Man, i feel sorry about your HDD... what a bad luck, eh?
BTW, i always avoid buying Maxtor HDDs..
I work with IT here at my job and we prefer to buy machines equipped with Seagate or Samsung ones. I assure you they are a bit more reliable than Maxtor ones... we have plenty of them dead on a locker here... almost a Maxtor cemetery...
Good luck with the reassembling of your puter, anyway!
BP |
|
|
|
|
Back to Top |
|
|
| Another blank page template | |
Posted: 02/24/2006 3:27 PM |
|
|
|
|
Hummingbird |
Posts |
3 |
Word Cnt. |
477 |
BDay |
N/A |
Sign |
N/A |
|
|
|
|
|
Joined: Feb 21, 2006
Local time: 12:36 PM
|
|
|
|
|
|
Man, WORKED LIKE A CHARM! Congrats!
All the authentication settings are back to normal!
I think you should get some credits on this fix, man!
Why not post a new version with this patched code
on www.phpbbhacks.com ? A lot of people there are burning their brains
trying to get this to work properly, without answers on their forum.
If you don't have the time I may do it for you, applying your credits where necessary, after all this code already passed through two consecutive authors!
Thanks again! Now my work may continue on my site... by the way, i'll throw you a link after it is finished!
Thank you guys for the quick reply, Glenn's and rb2d2xp (what a difficult nick to remember! ) too!
You guys may find me on msn if you need something that I may help ya!
BP |
|
|
|
|
Back to Top |
|
|
| Another blank page template | |
Posted: 02/24/2006 3:51 PM |
|
|
|
|
Site Admin |
Posts |
49593 |
Word Cnt. |
2,756,445 |
BDay |
Apr 22 |
Sign |
Taurus |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 11:36 AM
Location: Texas
|
|
|
|
|
|
Good to see a happy binarypsycho!! LOL
Yes Nightrider is pretty good at this stuff alright.
You can call me rb or RB. RB are the initials of my real name.
Come back often.
|
|
|
|
|
Back to Top |
|
|
| Another blank page template | |
Posted: 02/24/2006 4:11 PM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 1:36 PM
Location: St Pete, FL
|
|
|
|
|
|
binarypsycho, do you have a link to the topic in phpBBHacks.com? I would be happy to post what I did if others have a need for the resolution too...
Congratulations. I'm happy that this worked for you...
I have bought almost all Maxtors (Quantum) and unfortunately, I have had many fail. But when I read about other HDD brands, they seem to have a lot of trouble too. If I continue to have problems in the future with Maxtor, I will probably take your recommendation and try Seagate or Samsung. They usually cost more, but they would be worth it if they didn't fail. This fighting HDD problems is getting old...
|
|
|
|
|
Back to Top |
|
|
| Re: Another blank page template | |
Posted: 02/24/2006 4:33 PM |
|
|
|
|
Citation |
Posts |
2152 |
Word Cnt. |
78,257 |
BDay |
Jun 15 |
Sign |
Gemini |
Sex |
|
|
|
|
Joined: Apr 22, 2005
Local time: 3:36 AM
Location: Upside down
|
|
|
|
|
|
I'll give this a try when I get my online shop going. So I just replace the template file and it shouldn't muck up my existing pages? |
|
|
|
|
Back to Top |
|
|
| Another blank page template | |
Posted: 02/24/2006 5:01 PM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 1:36 PM
Location: St Pete, FL
|
|
|
|
|
|
Yes, this should be identical to what we did before. Unless you accidentally overwrote what you had, you should already have this version, Glenn. Make sure you create a backup of your current template.php file before you overwrite it with this version...
|
|
|
|
|
Back to Top |
|
|
| Another blank page template | |
Posted: 02/24/2006 5:19 PM |
|
|
|
|
Site Admin |
Posts |
49593 |
Word Cnt. |
2,756,445 |
BDay |
Apr 22 |
Sign |
Taurus |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 11:36 AM
Location: Texas
|
|
|
|
|
|
Nightrider wrote:
|
I will probably take your recommendation and try Seagate or Samsung.
|
In my opinion you can't beat a Samsung! But you hardly ever see them on sale. Matter of fact I don't think I ever have.
|
|
|
|
|
Back to Top |
|
|
| Re: Another blank page template | |
Posted: 02/25/2006 4:49 PM |
|
|
|
|
Citation |
Posts |
2152 |
Word Cnt. |
78,257 |
BDay |
Jun 15 |
Sign |
Gemini |
Sex |
|
|
|
|
Joined: Apr 22, 2005
Local time: 3:36 AM
Location: Upside down
|
|
|
|
|
|
I created a page last night nad it worked. I didn't have to apply the above fix because it must of been done before. Weird that because I created a page a while ago and had the same problem. Ohh well it's working so that's all that matters. |
|
|
|
|
Back to Top |
|
|
| Another blank page template | |
Posted: 02/25/2006 4:58 PM |
|
|
|
|
Site Admin |
Posts |
30756 |
Word Cnt. |
2,628,678 |
BDay |
Jul 28 |
Sign |
Leo |
Sex |
|
|
|
|
Joined: Sep 25, 2004
Local time: 1:36 PM
Location: St Pete, FL
|
|
|
|
|
|
Good. Unless you had overwritten my previous modifications, then the template.php file should continue to work properly for you with this MOD...
|
|
|
|
|
Back to Top |
|
|
| Information | |
|