PDA

View Full Version : 1.5RC4 and blank.php


dscottf
22nd of July 2004 (Thu), 16:51
I used to use a 'blank.php' for static content (like terms of use)

essentially, an EE page that followed the theme, but had no content. I would put my own text content in and rename the file to use.

now, upon calling one of these files (terms.php) I get the url redirected to

http://photo.fx4.net/gallery/terms.php?reverted_to_english_because_language__is _not_available&exhibition=&lang=

which loops.

I am guessing I need a new blank.php, but I can't make heads or tails of the code in any of teh php pages I have looked at so far.

Pekka? I assume you could make this easily (a page with nothing returnd that has a comment of "your text here" right after where the code would close the header.)

Pekka
22nd of July 2004 (Thu), 18:00
When you call your blank php, add to the link &lang=eng to the URL or better still

&lang=<?php print $lang; ?> if you are "inside EE".

See if that helps.

There were couple of logic bugs (or rather extraprotective language code) in that language code which I have fixed here in developement version but I can't unfortunately release the fixes now as the rest of the code does not match the RC4 code....

dscottf
23rd of July 2004 (Fri), 08:12
nope:
The requested URL /gallery/terms.php&lang=eng was not found on this server

is there a place inside the 'blank.php' where I could specify the language?

I tried adding:

// begin language hack
include_once ($toroot . "language.php");
// end language hack


Right above:
include ($toroot . "fetchsettings.php");
(otherwise I get all sorts of errors)

which allows the page to display, but does print this error at the top:
Notice: Undefined variable: exhibition in ./fetchsettings.php on line 517

I tired giving a value to $exhibition, but that resulted in all kinds of errors

you can download the blank.php I am trying at http://photo.fx4.net/blank.php.zip

wkitty42
31st of July 2004 (Sat), 15:37
you can download the blank.php I am trying at http://photo.fx4.net/blank.php.zip

there's something wrong with that file, i think... i downloaded it to take a look and see if i could help but the files in side extract as zero bytes with winzip 6.2...

i had to resort to an old copy of pkzip 2.04g to get the one file out... the one in the macosx directory won't come out with the old dos version...

just thought i'd let you know... now to take a look at what i was able to get out of the file ;)

wkitty42
31st of July 2004 (Sat), 16:53
ok, got it... everything works... had to add some and remove some to get everything going... charset was missing as well as the header and the scheme colors ;) all that should be taken care of now 8)

<?php
if (isset ($HTTP_GET_VARS['debug'])) {
$debug = "1";
error_reporting (E_ALL);
}

ob_start ("ob_gzhandler");
ob_start();

include ("toroot.php");
include ($toroot . "add/connect.php");
include ($toroot . "language.php");
include ($toroot . "slashwork.php");

// WITHOUT THIS, THE CHOSEN STYLE DOESN'T WORK
$this_is_index = "1";

include ($toroot . "fetchsettings.php");

// CHANGE THE NAME OF THE PAGE FOR MULTILANGUAGE SUPPORT
$currentpage = "blank";

$getlang = $toroot . "languages/" . $lang . "/" . $currentpage . ".php";
include($getlang);
$getlang = $toroot . "languages/" . $lang . "/global.php";
include($getlang);

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE><!-- INSERT YOUR TITLE HERE --> BLANK PHP PAGE</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=<?php print trim($s_charset); ?>">

<?php
print $stylesheet;
print $framebust;
?>
</HEAD>
<body<?php if ($s_zeromargin=="1") { print " leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginwidth=\"0\" marginheight=\"0\" style=\"margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px;\""; } ?>>

<?php
if (ee_stripslashes($s_include_header)!="") {
print ee_stripslashes($s_include_header);
}
else {
include($toroot . "header.php");
}

if ($s_on == "0") {
print $s_off_message;
exit();
}
?>

<!-- INSERT CONTENT HERE -->
<BR><BR>
This Section Not Yet Implemented

<!-- Coding, structure and concept by Pekka Saarinen ©2002 -->

</BODY>
</HTML>
<?php
ob_end_flush();
?>

i know that's going to be ugly but hopefully you and others can get it copied and make use of it... thanks for the idea! ;) its somthing that i may add to my footer area :lol:

dscottf
3rd of August 2004 (Tue), 13:11
thanks wkitty42, but that didn't work either (parse error line 3)

I hacked your page and mine together and got something that appears to work:
<?php
ob_start ("ob_gzhandler");
ob_start();
$feedbacklink = "1";

include ("toroot.php");
include ($toroot . "slashwork.php");

include ($toroot . "add/connect.php");

// begin language hack
include_once ($toroot . "language.php");
// end language hack



// WITHOUT THIS, THE CHOSEN STYLE DOESN'T WORK
$this_is_index = "1";

include ($toroot . "fetchsettings.php");

// CHANGE THE NAME OF THE PAGE FOR MULTILANGUAGE SUPPORT
$currentpage = "blank";

$getlang = $toroot . "languages/" . $lang . "/" . $currentpage . ".php";
//include($getlang);
$getlang = $toroot . "languages/" . $lang . "/global.php";
//include($getlang);





?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>
<!-- INSERT YOUR TITLE HERE -->
BLANK PHP PAGE
</TITLE>

ย* <META http-equiv="Content-Type" content="text/html; charset=<?php print trim($s_charset); ?>">


<?php
print $stylesheet;

print $framebust;

?>

<SCRIPT language="JavaScript" type="text/javascript">
<!--
var rowHighlight = true
var colHighlight = true

function getElement(el) {
var tagList = new Object
for (var i = 1; i < arguments.length; i++)
tagList[arguments[i]] = true
while ((el!=null) && (tagList[el.tagName]==null))
el = el.parentElement
return el
}

function checkHighlight(which) {
var el = getElement(event.srcElement,"TD")
if (el==null) return

if ((el.tagName=="TD") && (rowHighlight)) {
var row = getElement(el, "TR")
var table = getElement(row, "TABLE")
if (which)
row.className = "rover"
else
row.className = ""
cache = row
}
}
// -->
</SCRIPT>
</HEAD>

<body<?php if ($s_zeromargin=="1") { print " leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" marginwidth=\"0\" marginheight=\"0\" style=\"margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px;\""; } ?>>

<?php
if (ee_stripslashes($s_include_header)!="") {
print ee_stripslashes($s_include_header);
}
else {
include($toroot . "header.php");
}

if ($s_on == "0") {
print $s_off_message;
exit();
}
?>

<!-- INSERT CONTENT HERE -->
<BR><BR>
THIS Section not yet implemented



<!-- Coding, structure and concept by Pekka Saarinen ©2002 -->

</BODY>
</HTML>
<?php
ob_end_flush();
?>

probably very kludgy, and I am sure it will not work for multi languages

wkitty42
6th of August 2004 (Fri), 10:36
thanks wkitty42, but that didn't work either (parse error line 3)
that's funny as that code came out of an existing and working v1.5RC4 file... possibly index.php but i don't recall at this time...

I hacked your page and mine together and got something that appears to work:
excellent... at least you have something that works for you, now :)

probably very kludgy, and I am sure it will not work for multi languages
yeah, i dunno... i didn't test for languages... i just know that i was getting a white page until i added that one line about getting the style... note that i force all my exhibits to one style in the misc config and (IIRC) i've found that i also have to actually set the style in /each/ exhibit... possibly the exhibit style overrides the default, forced misc settings style... i dunno...

dscottf
6th of August 2004 (Fri), 10:52
note that i force all my exhibits to one style in the misc config and (IIRC) i've found that i also have to actually set the style in /each/ exhibit... possibly the exhibit style overrides the default, forced misc settings style... i dunno..

You mean where it says:

Select index style
(affects also
ยท ALL EXHIBITIONS COMBINED
ยท FEEDBACK
ยท GEAR INFO
ยท GROUP INDEX)

I believe that only refers to the 'front page' (index.php) and the pages listed. I don't think it effects exhibitions

wkitty42
6th of August 2004 (Fri), 10:55
note that i force all my exhibits to one style in the misc config and (IIRC) i've found that i also have to actually set the style in /each/ exhibit... possibly the exhibit style overrides the default, forced misc settings style... i dunno..

You mean where it says:

Select index style
(affects also
ยท ALL EXHIBITIONS COMBINED
ยท FEEDBACK
ยท GEAR INFO
ยท GROUP INDEX)

I believe that only refers to the 'front page' (index.php) and the pages listed. I don't think it effects exhibitions
yes... unless i'm misinterpreting what is meant by "ALL EXHIBITS COMBINED" and that really indicates that one has chosen the "combined" setting from the dropdown box when one is viewing the site... hummm...

dscottf
6th of August 2004 (Fri), 11:05
and that really indicates that one has chosen the "combined" setting from the dropdown box when one is viewing the site... hummm...

That is how I read it. If one chooses "combined" from the drop down, there would not be a style set in the resulting (virtual?) exhibition, since you didn't create that one