[SOLVED] Portal Header (Left Blocks) not on every page

Support for IntegraMOD 140

Moderator: Integra Moderator

[SOLVED] Portal Header (Left Blocks) not on every page

PostAuthor: Jason Sanborn » Sun Apr 09, 2006 3:44 pm

I posted this on the other IntegraMOD site a little over a month ago. Bumped it twice, and never received an answer. I'm hoping that someone here might know the answer to this question.

IntegraMOD 1.4.0
phpBB 2.0.19
Forum Wide headers are enabled.

When navigating my site, I always want my board navigation and other left (header) blocks enabled. On most pages, they are enabled, as a result of the Forum Wide headers. The problem I have, though, is on a couple pages of the forum where the user is given "information" such as when no topics are found in a search.

I use the "Posts Since Last Visit" (which I renamed to "New Posts") heavily to see what is new on my site. If there's nothing new, then my board navigation doesn't appear. From what I could tell, it appears that the switch for portal_header isn't being called. Any ideas on why this is happening, or how I can fix it?
Last edited by Jason Sanborn on Sun Apr 09, 2006 6:34 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 10:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: Simon N » Sun Apr 09, 2006 5:33 pm

When there are no new posts the search obviously can not find anything so is told to output an error message via the language key of $lang['No_search_match']

this would be something like:
Code: Select all
else                 {                     message_die(GENERAL_MESSAGE, $lang['No_search_match']);                 }


My guess is since this is an information message only there is no need to output the page as usual.

In short this is by design and not an error. So no amount of settings changes can alter this.

However a few edits can sort this for you so]                     message_die(GENERAL_MESSAGE, $lang['No_search_match']);[/code]

BEFORE, ADD
Code: Select all
                // start proper output of page                 include($phpbb_root_path . 'includes/page_header.'.$phpEx);                 // end proper output


As said there are 3 instances and be sure to find them all and add the above code before. SAVE & CLOSE file.

The comments are just to enable deletion of changes if need be. Hope this helps.
Last edited by Simon N on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[marq=left][url=http][img=left]http://www.tau-designs.org.uk/pictures/im2_88x32.png[/img][/url] | [url=http][img=left]http://www.free-riders.co.uk/images/banners/freeriders_88_31.gif[/img][/url][/marq]
User avatar
Simon N
Sr Integra Member
Sr Integra Member
 
Posts: 242
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:43 pm
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Sun Apr 09, 2006 6:29 pm

Ah. Its so nice having the left panel in place even when there are "No topics or posts met your search criteria" 8)
Last edited by Jason Sanborn on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 10:40 am
Cash on hand: 0.00
Location: Marina, CA

Re: [SOLVED] Portal Header (Left Blocks) not on every page

PostAuthor: Helter » Tue Apr 11, 2006 7:57 pm

this would be a good addition to 141, because the error page breaks many templates with images that span from header to footer
Last edited by Helter on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
"Success is getting what you want. Happiness is wanting what you get." - Dale Carnegie
User avatar
Helter
Administrator
Administrator
 
Posts: 4554
Likes: 40 posts
Liked in: 116 posts
Images: 0
Joined: Sat Mar 11, 2006 4:46 pm
Cash on hand: 1,959.15
Location: Seattle Wa
IntegraMOD version: phpBB2x

PostAuthor: Simon N » Wed Apr 12, 2006 3:05 am

Did I do somethign right <img> yay for me!!! LOL
Last edited by Simon N on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[marq=left][url=http][img=left]http://www.tau-designs.org.uk/pictures/im2_88x32.png[/img][/url] | [url=http][img=left]http://www.free-riders.co.uk/images/banners/freeriders_88_31.gif[/img][/url][/marq]
User avatar
Simon N
Sr Integra Member
Sr Integra Member
 
Posts: 242
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:43 pm
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Wed Apr 12, 2006 9:44 am

Just a thought I had. This modification added the code to one specific area. Isn't there a code page that handles error generation? Instead of including the include before calling the error, what if the include for page_header.php and page_footer.php were included in the php page that generates the error message itself? Would that be possible, and easier to implement?
Last edited by Jason Sanborn on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 10:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: Eon » Wed Apr 12, 2006 10:00 am

Yeah, cause when you mark all forums read, the left blocks are not there either..
Last edited by Eon on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Eon
Sr Integra Member
Sr Integra Member
 
Posts: 627
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 28, 2006 10:15 am
Cash on hand: 0.00

PostAuthor: Simon N » Wed Apr 12, 2006 10:27 am

The error handling is not on one page...but its easy to add that code into all error handling sequences.

Half asleep at moment but will look at this later.
Last edited by Simon N on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[marq=left][url=http][img=left]http://www.tau-designs.org.uk/pictures/im2_88x32.png[/img][/url] | [url=http][img=left]http://www.free-riders.co.uk/images/banners/freeriders_88_31.gif[/img][/url][/marq]
User avatar
Simon N
Sr Integra Member
Sr Integra Member
 
Posts: 242
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:43 pm
Cash on hand: 0.00

PostAuthor: Jason Sanborn » Sat Apr 29, 2006 9:33 pm

I found the solution to show the "header" on every page, including when message_die() is called. This is preferred over Simon's solution, as it only requires editing one file to handle all message_die() calls.

OPEN: includes/functions.php

FIND:
Code: Select all
    if(defined('HAS_DIED'))     {//+MOD]
BEFORE, ADD:[code]// Enable header variables to be used in the message_die() callinclude($phpbb_root_path . 'includes/page_header.'.$phpEx);


I've tested this locally, and am going to add it to my test site, but so far it appears to work without problem.
Last edited by Jason Sanborn on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 10:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: Jason Sanborn » Sat Apr 29, 2006 9:44 pm

Hmmm. I actually made a mistake, the code to add should be:

Code: Select all
// Enable header variables to be used in the message_die() callif (!defined('IN_ADMIN')) {     include($phpbb_root_path . 'includes/page_header.'.$phpEx);}


Otherwise it will distort things in the ACP, which I found out after implemented on my test site. <img>
Last edited by Jason Sanborn on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 10:40 am
Cash on hand: 0.00
Location: Marina, CA

PostAuthor: Jason Sanborn » Mon May 01, 2006 10:22 am

<img>

This still doesn't work, and caused an error in the knowledge base. If you've added the code in either of the two previous posts, remove them. Simon's is still the best solution.
Last edited by Jason Sanborn on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[url=http][img=left]http://images.cbreview.net/banners/cloney2.gif[/img]
Comic Book Review: Comics, Role Playing and More[/url]
User avatar
Jason Sanborn
Sr Integra Member
Sr Integra Member
 
Posts: 436
Likes: 0 post
Liked in: 0 post
Joined: Sat Apr 08, 2006 10:40 am
Cash on hand: 0.00
Location: Marina, CA


Return to IntegraMOD 140

Who is online

Registered users: App360MonitorBot, Bing [Bot]