Is there a TRICK to getting the 404 page to work?

I went ahead and changed the included error 404 html to something that falls more in line with our site, its looks, and so on. But no matter what I type behind the end of our D7 dedicated domain, it always defaults back to a "Profile not available for view" page. Doesn't matter if I include image, html, or php endings and it doesn't matter whether or not I'm logged in. It's always that profile view screen that shows up ....

I'd really like to use the 404 page, particularily since it'll redirect to the main site after a few seconds. That's just a tiny touch more secure than having a non-existing profile page open indefinitely.

Quote · 1 May 2010

I did this.

Edit profile.php at line 36 look for this. Comment out section in red, and add section in green.

if ( !$profileID ) {
/*    header("HTTP/1.1 404 Not Found");
$_page['header'] = "{$site['title']} ". _t("_Member Profile");
$_page['header_text'] = _t("_View profile");
$_page['name_index'] = 0;
$_page_cont[0]['page_main_code'] = MsgBox( _t("_Profile NA") );
PageCode();
exit; */

header('Location: 404.html');

}


Then move dow to about line 80

if (!($p_arr['ID'] && ($logged['admin'] || $logged['moderator'] || $oProfile->owner || $p_arr['Status'] == 'Active')))
{
/*    header("HTTP/1.1 404 Not Found");
$_page['header'] = "{$site['title']} ". _t("_Member Profile");
$_page['header_text'] = "{$site['title']} ". _t("_Member Profile");
$_page['name_index'] = 0;
$_page_cont[0]['page_main_code'] = MsgBox( _t("_Profile NA") );
PageCode();
exit; */

header('Location: 404.html');
}

https://www.deanbassett.com
Quote · 1 May 2010

I did this.

Edit profile.php at line 36 look for this. Comment out section in red, and add section in green.

if ( !$profileID ) {
/*    header("HTTP/1.1 404 Not Found");
$_page['header'] = "{$site['title']} ". _t("_Member Profile");
$_page['header_text'] = _t("_View profile");
$_page['name_index'] = 0;
$_page_cont[0]['page_main_code'] = MsgBox( _t("_Profile NA") );
PageCode();
exit; */

header('Location: 404.html');

}


Then move dow to about line 80

if (!($p_arr['ID'] && ($logged['admin'] || $logged['moderator'] || $oProfile->owner || $p_arr['Status'] == 'Active')))
{
/*    header("HTTP/1.1 404 Not Found");
$_page['header'] = "{$site['title']} ". _t("_Member Profile");
$_page['header_text'] = "{$site['title']} ". _t("_Member Profile");
$_page['name_index'] = 0;
$_page_cont[0]['page_main_code'] = MsgBox( _t("_Profile NA") );
PageCode();
exit; */

header('Location: 404.html');
}

Thanks a bunch, but considering that both of those code blocks are the same (except for one line) and the fact that both of them contain red as well as green which was supposed to be removed from the first code block ... I'm not exactly sure what you ant me to do when I get down to line 80. I'm looking at it but it's definitely not self explanetory to me ... sorry ...

Quote · 1 May 2010

They are similar yes but they are 2 seperate locations not one.



The first one i posted starts at line 36. Find it, comment out what i marked in red and add the line in green

Then move down to line 80

The second block that needs to be changed starts there. Comment out what is in red, and add the line in green.

https://www.deanbassett.com
Quote · 1 May 2010

That is awesome !!!

Thanks a million, it works like a charm !!! Laughing

Quote · 2 May 2010

One line of code everyone. One line of code has made this man yelling awesome and laughing.

Good job deano92964 (why do you have that crazy number after your name - does it have meaning or was it because your name got owned by someone else)

That is awesome !!!

Thanks a million, it works like a charm !!! Laughing

Quote · 2 May 2010

One line of code in 2 locations actually.

Deano is normally used everywhere, so i just got in the habit of throwing my DOB on the end.

https://www.deanbassett.com
Quote · 2 May 2010

One line of code everyone. One line of code has made this man yelling awesome and laughing.

That is awesome !!!

Thanks a million, it works like a charm !!! Laughing

Yeah, well, one line of code (within two separate multi-line blocks) is nothing to you or others and a whole bucket full of question marks to someone with little to no php knowledge. Nowhere in the Dolphin requirements does it state that Dolphin is only for developers (perhaps it should though). No reason for sarcasm just because I'm thankful that my custom error 404 page is now showing up as it should. To me it was a big deal because it has graphics and other things on it. Never thought that saying thank you was something to make fun of ....

BTW, when you get to hit that 150 wpm mark and when you like to write it's not very hard for those long posts to get written. As you see I'm here on my Sunday off too. If people don't want to read what I'm saying all they have to do is to ignore it. No biggie, right? I'm not the only one with long posts either though, two other names come to mind right off the top of my head here in this forum.

Quote · 2 May 2010

I wasn't makin' fun of you so quit saying that.

Understand?

One line of code everyone. One line of code has made this man yelling awesome and laughing.

That is awesome !!!

Thanks a million, it works like a charm !!! Laughing

Yeah, well, one line of code (within two separate multi-line blocks) is nothing to you or others and a whole bucket full of question marks to someone with little to no php knowledge. Nowhere in the Dolphin requirements does it state that Dolphin is only for developers (perhaps it should though). No reason for sarcasm just because I'm thankful that my custom error 404 page is now showing up as it should. To me it was a big deal because it has graphics and other things on it. Never thought that saying thank you was something to make fun of ....

BTW, when you get to hit that 150 wpm mark and when you like to write it's not very hard for those long posts to get written. As you see I'm here on my Sunday off too. If people don't want to read what I'm saying all they have to do is to ignore it. No biggie, right? I'm not the only one with long posts either though, two other names come to mind right off the top of my head here in this forum.

Quote · 2 May 2010
 
 
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.