page_header explanation

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

page_header explanation

Post by Stoker 4.0 »

Hello,

Im trying to reduce the use of queries on some custom pages I have made.
This made me look at: page_header($user->lang['PAGE_HEADLINE']);

I dont need to load online data on those custom pages and using this: page_header($user->lang['PAGE_HEADLINE'], false); seems to disable loading of online data and saves 3 queries on each page.
Is that correct or am I missing something?
User avatar
AmigoJack
Registered User
Posts: 5904
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: page_header explanation

Post by AmigoJack »

Why don't you look up the definitions instead of guessing?

Code: Select all

function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
Precisely you skip 3 queries, in a rare case up to 5 queries.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: page_header explanation

Post by Stoker 4.0 »

Just wanted to be completely sure.
I havent seen this in any mods which I think is weird and confusing.
User avatar
AmigoJack
Registered User
Posts: 5904
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: page_header explanation

Post by AmigoJack »

Indeed - there is no MOD coming to my mind which actually uses the online list data. Created PHPBB3-11360.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
Locked

Return to “[3.0.x] MOD Writers Discussion”