Blank Page Template

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
72
64%
Very Good
21
19%
Good
10
9%
Fair
2
2%
Poor
8
7%
 
Total votes: 113

wendas
Registered User
Posts: 11
Joined: Sat Jul 24, 2004 3:37 am

Post by wendas »

I may have a fix for Murian & Wyldb.. I am a relative newbie, so don't shoot me for trying, but I saw this error while trying to fix my own..

it is probably this line in your newpagename.php file that is causing it..

Code: Select all

// standard session management 
$userdata = session_pagestart($user_ip, PAGE_TEMPLATE); 
change the PAGE_TEMPLATE to PAGE_NEWPAGENAME

Also before you hit these errors, Although the rest of the mod seemed straight forward, the template.php file had other gottchas.. so here they are..

change TEMPLATE in the following code to newpagename

Code: Select all

$page_title = 'TEMPLATE'; 
Now the line they do tell you to change, change only one template & leave the other alone so that

Code: Select all

$template->set_filenames(array( 
        'body' => 'template.tpl')
becomes

Code: Select all

$template->set_filenames(array( 
        'body' => 'newpagename.tpl')
finally there is one more $template on this page below is the line.. but leave this $template alone.
$template->pparse('body');


Hope this helps. Currently I am still one of the people asking more then responding, but I do like to pay my debts when & where I can..

Wenda
Wyldb
Registered User
Posts: 133
Joined: Sat Jan 03, 2004 1:42 am
Location: Colorado

Post by Wyldb »

Hope this helps. Currently I am still one of the people asking more then responding, but I do like to pay my debts when & where I can..

This is the way we learn.
Thank you greatly Wendas - That fixed it!

...And Now, Off to Bigger and Better NewPages.php
:D :D :D
User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Post by Gremlinn »

As far as a demo showing you what this mod does...It integrates whatever you want into the forum engine. If you look at my site (follow the WWW image below or the link in my signature) you will find a few pages that aren't forum related and yet still have the forum header and footer. If you where to login to the forum, you would then be able to see yet another page or two.
Murrian
Registered User
Posts: 56
Joined: Wed Feb 19, 2003 1:51 am
Location: In Ga Ga Land
Contact:

Post by Murrian »

wendas wrote: I may have a fix for Murian & Wyldb.. I am a relative newbie, so don't shoot me for trying, but I saw this error while trying to fix my own..

it is probably this line in your newpagename.php file that is causing it..

Code: Select all

// standard session management 
$userdata = session_pagestart($user_ip, PAGE_TEMPLATE); 
Thanks, i changed PAGE_TEMPLATE to NEWPAGENAME instead of PAGE_NEWPAGENAME :oops:
Altered it but now get this header trouble on first browse, F5 it disapears or if you browse from any other page it's fine, just if you link straight to it

Code: Select all

Warning: Cannot add header information - headers already sent by (output started at /server/mdp/phpBB2/MDP001.php:2) in /server/mdp/phpBB2/includes/sessions.php on line 182

Warning: Cannot add header information - headers already sent by (output started at /server/mdp/phpBB2/MDP001.php:2) in /server/mdp/phpBB2/includes/sessions.php on line 183
on my sessions.php file for those lines i have

Code: Select all

	setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
	setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
Which would explain to me as to why i get the error on first browse and not from when you browse from another page in the forum. Just unfotuntaly my skills fail as to how to fix it ;)
Sorry for bugging you all here!
\m/ (^_^) \m/
User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Post by Gremlinn »

The reason it appears to work fine is that if you click refresh the page of recently clicked on another page, phpBB checks your session. Once it has your current location, it doesn't check again for about a minute (I haven't actually checked the actual time).

What I have found to be the problem is a mismatch in what you entered in the constants.php or viewonline.php (I can't remember the third file). They are the ones that have the PAGE_NEWPAGENAME lines and newpagename.php location.
leoz
Registered User
Posts: 35
Joined: Wed Nov 12, 2003 6:35 am
Location: Nashville, TN, USA.
Contact:

Re: Possible fix to the misunderstandings of the term "

Post by leoz »

spode wrote:
leoz wrote:a possible solution?


This would be a good idea. It would certainly save allot of confusion. One thing that should also be fixed though. In the section talking about editing the viewonline.php there is an extra character at the end of the text to be added.
leoz wrote: #
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_NEWPAGE:
$location = $lang['Newpage'];
$location_url = "newpage.$phpEx";
break;.

Note the period (or stop) at the end. If you copy this as written you will get an error on your Who's Online page. It should be copied as follows.
#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_NEWPAGE:
$location = $lang['Newpage'];
$location_url = "newpage.$phpEx";
break;


Just a little info for future users. I believe this was mentioned by murphyz
in an earlier post.


THANKS, I have fixed this in my posting. I don't remember the user's name who posted the 'clowns' example but that coding has the same misplaced period as I had. Glad to help where I can.
Last edited by leoz on Tue Aug 10, 2004 11:34 pm, edited 1 time in total.
leoz
Registered User
Posts: 35
Joined: Wed Nov 12, 2003 6:35 am
Location: Nashville, TN, USA.
Contact:

Post by leoz »

Gremlinn wrote: leoz: I would suggest increasing the number as you thought. If you don't, you may not see the correct page people are viewing when you look at the Who's Online or the ACP Index.


Thanks again, I was hoping I was right, but like I said I wasn't too sure on this one.

I remember seeing somewhere that this mod is limited to numbers -1045 thru -1049. What happens if we still have more pages to add, other than a possible conflict with other MODs using those numbers after -1049?
Murrian
Registered User
Posts: 56
Joined: Wed Feb 19, 2003 1:51 am
Location: In Ga Ga Land
Contact:

Post by Murrian »

Murrian wrote:

Code: Select all

Warning: Cannot add header information - headers already sent by (output started at /server/mdp/phpBB2/MDP001.php:2) in /server/mdp/phpBB2/includes/sessions.php on line 182

Warning: Cannot add header information - headers already sent by (output started at /server/mdp/phpBB2/MDP001.php:2) in /server/mdp/phpBB2/includes/sessions.php on line 183
Fixed it, lol, somehow i stupidly manage to get a return before the <?php in the template.php file.
\m/ (^_^) \m/
User avatar
Kalipo
Registered User
Posts: 551
Joined: Mon Dec 08, 2003 1:47 pm

Re: Possible fix to the misunderstandings of the term "

Post by Kalipo »

leoz wrote:
spode wrote:
leoz wrote:a possible solution?


This would be a good idea. It would certainly save allot of confusion. One thing that should also be fixed though. In the section talking about editing the viewonline.php there is an extra character at the end of the text to be added.
leoz wrote: #
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_NEWPAGE:
$location = $lang['Newpage'];
$location_url = "newpage.$phpEx";
break;.

Note the period (or stop) at the end. If you copy this as written you will get an error on your Who's Online page. It should be copied as follows.
#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_NEWPAGE:
$location = $lang['Newpage'];
$location_url = "newpage.$phpEx";
break;


Just a little info for future users. I believe this was mentioned by murphyz
in an earlier post.


THANKS, I have fixed this in my posting. I don't remember the user's name who posted the 'clowns' example but that coding has the same misplaced period as I had. Glad to help where I can.


DOH!

This post (the example) was supposed to be used as a guide (hence the red text). Reguardless, it's been edited (period removed).

Sorry for the late response.
ace2ace
Registered User
Posts: 364
Joined: Sat Aug 14, 2004 3:48 pm

Post by ace2ace »

I think the instruction would be clearer if you just called the new file:

newpage.tpl and newpage.php. if someone doesn't understant, he/she doesn't have to change the name of the file for this to work.

It gets confusing when I see something like:
copy template.php to template.php
copy templates/subSilver/template.tpl to templates/subSilver/template.tpl


But you already told us to rename the template.tpl to what we want. So what do we copy?

There are lots of things in the application that are called template. the word is used everywhere
ace2ace
Registered User
Posts: 364
Joined: Sat Aug 14, 2004 3:48 pm

Post by ace2ace »

Is this correct? shouldn't we also add the change to overall_header to provide a link? it would be a complete workable thing. Please help clarify.

##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ COPY ]------------------------------------------
#
#
# edit the following lines in newpage.php
# // assign template
# $template->set_filenames(array(
# 'body' => 'newpage.tpl')
# );
#
# edit templates/subsilver/newpage.tpl to have whatever content you want to display.
#
#
copy newpage.php to the top directory (phpBB2 by default)
copy newpage.tpl to templates/subSilver/

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

#
#-----[ FIND ]------------------------------------------
#
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),

#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_NEWPAGE' => $lang['Newpage'],
'U_NEWPAGE' => append_sid('newpage.'.$phpEx),

#
#-----[ OPEN ]------------------------------------------
#
viewonline.php

#
#-----[ FIND ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "faq.$phpEx";
break;

#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_NEWPAGE:
$location = $lang['Newpage'];
$location_url = "newpage.$phpEx";
break;.

#
#-----[ OPEN ]------------------------------------------
#
admin/index.php

#
#-----[ FIND ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;

#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_NEWPAGE:
$location = $lang['Newpage'];
$location_url = "template.$phpEx?pane=right";
break;

#
#-----[ FIND ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;

#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_NEWPAGE:
$location = $lang['Newpage'];
$location_url = "newpage.$phpEx?pane=right";
break;

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['newpage'] = 'Newpage';

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

#
#-----[ FIND ]------------------------------------------
#
define('PAGE_GROUPCP', -11);

#
#-----[ AFTER, ADD ]------------------------------------------
#
define('PAGE_NEWPAGE', -1045);


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Post by Gremlinn »

The copy statements like this are easymod compatable. They say "copy template.php from the mod directory to the phpBB root directory and keep the file named template.php.
copy template.php to template.php



These copy statements will error with easymod.
copy newpage.php to the top directory (phpBB2 by default)
copy newpage.tpl to templates/subSilver/


This is not to say that you can't do this:
copy template.php to newpage.php
Poupoune
Former Team Member
Posts: 702
Joined: Sun Apr 18, 2004 4:04 pm
Location: In the stars... where you left me, and where I will wait for you... always...
Contact:

Post by Poupoune »

Hi, I'm sorry for my absence past weeks, but here is the v2 for this MOD awaiting for validation :

MOD Description: With this MOD you can easily add blank pages to your board.
These pages:
- are totally integrated into phpBB
- are fully administrable by the ACP
- are using session management ( user register, viewonline )
- are under phpBB authorization system
- are linked on the overall_header into a jumpbox (alternative nav menu may be developped)

Demo: not yet
Download: Click here
Poupoune - http://www.poup.net
My styles : [ La courbe de tes yeux ] - [ Stars are for dying ] - [ Plenitude ] - [ genElectro ]
User avatar
Gremlinn
Registered User
Posts: 2133
Joined: Mon Aug 04, 2003 12:13 am
Location: Rochester, NY
Name: Nathan

Post by Gremlinn »

:arrow: Poupoune: What is supposed to update the table with data? Also, the items within the root folder need to be brought back one folder level for easymod to work. Or, change the copy lines to copy from root/...

But, the features you mention show promise and definite value.
Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 »

Could not update private message new/read time for user

DEBUG MODE

SQL Error : 1146 Table 'forum.add_pages_table' doesn't exist

SELECT * FROM ADD_PAGES_TABLE ORDER BY page_name

Line : 770
File : \www\phpbb\includes\page_header.php

Warning: Cannot modify header information - headers already sent by (output started at \www\phpbb\cache\tpl_DarkBlack.admin.page_header.php:115) in \www\phpbb\includes\sessions.php on line 312

Warning: Cannot modify header information - headers already sent by (output started at \www\phpbb\cache\tpl_DarkBlack.admin.page_header.php:115) in \www\phpbb\includes\sessions.php on line 313
I did the SQL and i still get that,i am using Poupoune mod
my forum prefix is phpbb
Whos missing up my sig?
Post Reply

Return to “[2.0.x] MOD Database Releases”