$page['header'] output is that the same as Title?

Can some one explain to me if the page['header'] result is the same as what we see in the title or browser tab.

 

Quote · 7 Oct 2013

I don't know but I would guess header is either the HTML header <head></head> or the sub header part generated by _sub_header.html

Geeks, making the world a better place
Quote · 7 Oct 2013

okay let me explain what i do.. i have splashpage and i only want some pages to be viewed by guests.
i use the code from deano in the design.inc file that checks the $page['header'] output.

if ((int)$_COOKIE['memberID'] == 0) {
 $url_find = $_page['header']; // header
 if (strstr($url_find, "Profile")) {
 }elseif (strstr($url_find, "Listing")) {
 }elseif (strstr($url_find, "Join")) {
 }elseif (strstr($url_find, "Email confirmation")) {
}else {
   header('Location: ' . BX_DOL_URL_ROOT  . 'splash.php');
}

all the pages work but not the listing! when i put the listingname there or part of listing name it works fine.
So that is kinda weird...

 

Quote · 7 Oct 2013

Yes. $_page['header'] is the title.

all the pages work but not the listing! when i put the listingname there or part of listing name it works fine.
In the first part of that sentence you state the listing does not work, but at the end of the same sentence you say it works fine. There is a contradiction there so it does not make any sense to me.

Better explanation please.




https://www.deanbassett.com
Quote · 7 Oct 2013

deano, what I mean is that if use a part of the business name it works fine.

example: title = mycompanyname | LA | my sitename  it strstr("header_info", "company")

but i have a new title = Look at this: mycompanyname | LA | my sitename --> Look at this: is tekst what i added myself

it strstr("header_info", "Look at this") it doesn't work.

I hope you get it what i mean..

 

Better explanation please.

 

Quote · 7 Oct 2013

Still not quite understanding.

How was the title changed? Was it done with my head injections mod? If so, then it will not match the new title. $_page['header'] contains the original title, not the one changed with my mod.

If not, then i do not know why.

You may be better off matching pages by the $_SERVER['REQUEST_URI'] instead.


https://www.deanbassett.com
Quote · 7 Oct 2013

The title is set like this: $this->_oTemplate->setPageTitle ('Listing: ' . $sTitle . ' | '. $sLocation . ' | '. $sSiteTitle);

and in the design.inc.php i have your code to check if want a guest to return or stay on splashpage or allow guest to view the page i want.

 

what does the  $_SERVER['REQUEST_URI'] return? do you have a example for me..

i used your code you posted on another forum post a while back.

if ((int)$_COOKIE['memberID'] == 0) {
 $url_find = $_page['header']; // header
 if (strstr($url_find, "Profile")) {
 }elseif (strstr($url_find, "Listing")) {
 }elseif (strstr($url_find, "Join")) {
 }elseif (strstr($url_find, "Email confirmation")) {
}else {
   header('Location: ' . BX_DOL_URL_ROOT  . 'splash.php');
}

Quote · 7 Oct 2013

Oh, Ok. because of the way the title got changed, the title may be in a different variable.

The title is not always in $_page['header']. It can sometimes be in $GLOBALS['BxDolTemplatePageTitle']

You may try changing this

$url_find = $_page['header']; // header

To this which will check both and assign the one that is in use.

if(!empty($GLOBALS['BxDolTemplatePageTitle']))
    $url_find = $GLOBALS['BxDolTemplatePageTitle'];
else if(isset($_page['header']))
    $url_find = $_page['header'];



https://www.deanbassett.com
Quote · 7 Oct 2013

DEANO, you are the best!!!

that did it. :-))

thank you for your help.

Quote · 7 Oct 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.