> 2- - I had a look at www.linuxyen.com/test/htdocs this is the
first
> production site I have seen using freetrade and I was very
impressed.
> It's all starting to make sense now. It seems that you are able
to pull
> in static pages so long as they are called from index.php -
What I
> would like to know is what is the easiest way to change the to
change
> the layout of the index.php - I looked at ./modules/layout/?
( what
> should'nt I touch ) - how do I go about getting a fancy layout
like
> linuxyen.com and not break what I have already ? Would the
above have a
> seperate screen to allow login as admin.
I currently have my version of freetrade working in framesets...
i had to make some heavy mods to do it... The side nav resides in
the left frame... so i had to send refresh commands to the left
frame everytime the cart changed... which required setting a
variable to true at the end of some ACTIONS modules...
(CREATE_INVOICE, SAVE_BASKET, LOGOUT_USER, LOGIN_USER,
ADD_FROM_WISHLIST)
Then I created three new SCREENS (xxxx_body, xxxx_side, xxxx_top)
and used them to create the content in the three frames (that
will be setup) ... remember to add these new screens to the
/includes/ScreenInfo file ...
then I changed the with_side_nav file to display a frameset.
(note, that I do not use print statements to dump out the html...
makes it harder to read (for me anyway) so PHP commands are
parsed only when actually needed...
<?php
/*
** layout the page with frames
*/
?>
<frame src="<?php echo ScreenURL("behr_top"); ?>"
name="topNav"
id="topNav"
frameborder="0"
scrolling="Auto"
marginwidth="0"
marginheight="0">
<frameset cols="150,*"
framespacing="0"
frameborder="0"
border="0">
<frame src="<?php echo ScreenURL("behr_side"); ?>"
name="sideNav"
id="sideNav"
frameborder="0"
scrolling="Auto"
marginwidth="0"
marginheight="0">
<frame src="<?php echo ScreenURL("behr_body"); ?>"
name="content"
id="content"
frameborder="0"
scrolling="Auto"
marginwidth="0"
marginheight="0">
</frameset>
<?php
/* end of new with_side_nav */
?>
And we're not done yet!!!
I opened index.php3 and copied it to engine.php3 -- index.php3 is
used only ONCE to create the initial frameset... (this is
towards the end of the file... it's my frameset start tag... then
i open the layout file with_side_nav
print("</HEAD>\n");
//print("<BODY BGCOLOR=\"white\">\n"); /* not needed because of
frameset */
?>
<frameset rows="150,*"
framespacing="0"
frameborder="0"
border="0">
<?php
/*
** include the page body
*/
echo $screen;
include(APPLICATION_ROOT .
"/modules/layout/".$ScreenInfo[$SCREEN][3]);
/*
** close page
*/
?>
</frameset>
_____________________________________
The engine.php3 script is basically the original index.php3
script... it is used to display the SCREENS in the frames as the
original index.php3 would with a non-framed site.
but there is a code change... here it is (you'll find this at the
top of the file at the end of the pre-header code.... (here
you'll see the variable that was set to true in the above
mentions ACTIONS modules)
This refreshes my side nav frame so it can update the display...
it just reloads the frame with the current session stats and cart
contents... simple javascript.
/*
** --------------------------------------------------------------
---------
** no output should be generated above this line because both
** check_sid and GENERATE_SID send cookies.
*/
if ($REFRESH_SIDE_NAV) {
?>
<script language="javascript">
top.sideNav.location.reload();
</script>
<?php
}
______________________________________
Also... the define statement at the top of the index.php3 and
engine.php3 files need to change to point to the enging.php3
script instead of index.php3
define("SERVER_NAME", $SERVER_NAME);
define("SCRIPT_NAME", "engine.php3");
define("APPLICATION_ROOT", "/path/to/cart-files/");
define("EXTERNAL_PATH", dirname($SCRIPT_NAME) . "/");
______________________________________
I also made some other changes, but they were purely cosmetic...
this should get you on your way to modifying the layout however
you see fit... there are definitely easier ways to do this than
mine :) but i'm a modify freak! and people always ask me to do
this crazy stuff when making sites... so i have to do crazy
things to work with all my resources...
enjoy! hope this helps and doesn't confuse too much... and if
there is a better way to do this... i'm all eyes!
Roger
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Site: http://www.working-dogs.com/freetrade/
Problems?: [EMAIL PROTECTED]