more whitespace / bottom block / includes
Rushian 0
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: more whitespace / bottom block / includes
Rushian
OP
0
From: -
From: -
more whitespace / bottom block / includes
Originally posted by Philipp:
Ok, this works perfect. It allows me to keep the list 'external' and easily editable as the data changes, and is fast enough when loading the main page. *Perfect*!!
Originally posted by Philipp:
You need to add the following in the PHP part of the template:
dbconnect();
$query = DBQuery(“SELECT page_text from esselbach_st_pages WHERE page_id = ‘1’”);
list($page) = mysql_fetch_row($query);
The HTML of page 1 is now in $page
Ok, this works perfect. It allows me to keep the list 'external' and easily editable as the data changes, and is fast enough when loading the main page. *Perfect*!!
1 Re: more whitespace / bottom block / includes
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
more whitespace / bottom block / includes
You need to add the following in the PHP part of the template:
The HTML of page 1 is now in $page
You need to add the following in the PHP part of the template:
dbconnect();
$query = DBQuery(“SELECT page_text from esselbach_st_pages WHERE page_id = ‘1’”);
list($page) = mysql_fetch_row($query);
The HTML of page 1 is now in $page
1 Re: more whitespace / bottom block / includes
Rushian
OP
0
From: -
From: -
more whitespace / bottom block / includes
Originally posted by Philipp:
I turned the cache on, and really, it didn't help. The page still pauses while it reads in the external HTML file. As a last restort, I'm going to just embed the HTML into the page footer template.
I'll check out that accelerator tho I guess..
How about a way to insert the output of page ID #1 into the template?
Originally posted by Philipp:
Try turning the cache on. This should help a little.
Unfortunately, Windows is not the perfect platform for PHP applications. You could also enhance the overall PHP performance with an accelerator such as eAccelerator.
A Windows port of eAccelerator is available here:
http://www.future-tense.org/eaccelerator/
I turned the cache on, and really, it didn't help. The page still pauses while it reads in the external HTML file. As a last restort, I'm going to just embed the HTML into the page footer template.
I'll check out that accelerator tho I guess..
How about a way to insert the output of page ID #1 into the template?
1 Re: more whitespace / bottom block / includes
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
more whitespace / bottom block / includes
Try turning the cache on. This should help a little.
Unfortunately, Windows is not the perfect platform for PHP applications. You could also enhance the overall PHP performance with an accelerator such as eAccelerator.
A Windows port of eAccelerator is available here:
http://www.future-tense.org/eaccelerator/
Try turning the cache on. This should help a little.
Unfortunately, Windows is not the perfect platform for PHP applications. You could also enhance the overall PHP performance with an accelerator such as eAccelerator.
A Windows port of eAccelerator is available here:
http://www.future-tense.org/eaccelerator/
1 Re: more whitespace / bottom block / includes
Rushian
OP
0
From: -
From: -
more whitespace / bottom block / includes
Is there a more effecient way to do this? The HTML file I'm inserting is 18Kb is size, and causes the page to load slowly as the file is read. Right now since I'm still tweaking things, I have the cache turned off. Would turning the cache on make the initial page load any faster?
Along the same lines, I have duplicated the release dates list into the 'Pages' section. Can that be used in the footer template to display the output of page ID #1. Would that be any faster?
Originally posted by Rushian:
Lastly, how can I insert an already-created static HTML page into a template? I have a standalone HTML page with release dates in it that I want inserted into the site footer (which will actually be in the 'right menu'.) How is that done as well?
Here the code:
<?php
global $insert;
$htmlfile = "myfile.html";
$htmlopen = fopen($htmlfile,"r");
$myhtmlfile = fread($htmlopen, filesize($htmlfile));
fclose($htmlopen);
This will copy the content of your HTML page to the variable $myhtmlfile. You need to replace myfile.html with the file name of your HTML page.
Is there a more effecient way to do this? The HTML file I'm inserting is 18Kb is size, and causes the page to load slowly as the file is read. Right now since I'm still tweaking things, I have the cache turned off. Would turning the cache on make the initial page load any faster?
Along the same lines, I have duplicated the release dates list into the 'Pages' section. Can that be used in the footer template to display the output of page ID #1. Would that be any faster?
1 Re: more whitespace / bottom block / includes
Rushian
OP
0
From: -
From: -
more whitespace / bottom block / includes
UPDATE
It is a path issue. I think ST can't see "above" itself. I copied the HTML file to the ST root dir and it works..
Now I just gotta re-do the old colors to match the new design.
UPDATE
It is a path issue. I think ST can't see "above" itself. I copied the HTML file to the ST root dir and it works..
Now I just gotta re-do the old colors to match the new design.
1 Re: more whitespace / bottom block / includes
Rushian
OP
0
From: -
From: -
more whitespace / bottom block / includes
re: whitespace: figured it out right after I posted. Thanks tho!
re: conditional HTML: Works great! Thanks again!
re: inserting static HTML: Can't get this to work.. Some background: I'm running ST 1.7.2 free. The site url is http://www.specforce.net/cgi-bin/storyteller/index.php and the html file is in the root (ie. 2 levels up) named release_dates2.htm. I'm using PHP ver 4.3.9 and MySQL 3.23.54-nt with MyISAM tables.
My guess is I have the path wrong. I used "/release_dates2.htm" as the filename, and used the $myhtmlfile var where I wanted the HMTL inserted, but nothing was. Would a full server path work? I'm on a windows box, so it's be something like c:inetpubwwwrootmysiterelease_dates2.htm
So close!
Also, gotta say, thanks for all the support. I have tons more questions too!
re: whitespace: figured it out right after I posted. Thanks tho!
re: conditional HTML: Works great! Thanks again!
re: inserting static HTML: Can't get this to work.. Some background: I'm running ST 1.7.2 free. The site url is http://www.specforce.net/cgi-bin/storyteller/index.php and the html file is in the root (ie. 2 levels up) named release_dates2.htm. I'm using PHP ver 4.3.9 and MySQL 3.23.54-nt with MyISAM tables.
My guess is I have the path wrong. I used "/release_dates2.htm" as the filename, and used the $myhtmlfile var where I wanted the HMTL inserted, but nothing was. Would a full server path work? I'm on a windows box, so it's be something like c:inetpubwwwrootmysiterelease_dates2.htm
So close!
Also, gotta say, thanks for all the support. I have tons more questions too!
1 Re: more whitespace / bottom block / includes
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
more whitespace / bottom block / includes
Originally posted by Rushian:
Your are looking for the first line in this last part of site_header:
You need to add addtional & nbsp;'s to increase the space
Originally posted by Rushian:
You can use site_footer . Here is how:
Replace the code in $myhtml with your HTML code and add $myhtml to the HTML part of the template
Originally posted by Rushian:
Here the code:
This will copy the content of your HTML page to the variable $myhtmlfile. You need to replace myfile.html with the file name of your HTML page.
Originally posted by Rushian:
How do I get more whitespace between by left menu and the news items (or the rest of the modules I guess) on the page? It looks about 8 pixels now, and I'd like 20-30 pixels.
I'm hoping I can do it in the site header template, and not have to edit each module template individually!
Your are looking for the first line in this last part of site_header:
<td>& nbsp;</td>
<td valign="top" width="85%">
$insert[login_header]
You need to add addtional & nbsp;'s to increase the space
Originally posted by Rushian:
Also, I need a way to get a new bottom block of HTML (ie, not a link list) on only the newspage, so I can't use the site footer.. Can this be done?
You can use site_footer . Here is how:
<?php
global $insert;
if (preg_match("/index/", $_SERVER[PHP_SELF]))
{
$myhtml = "Some HTML code here";
}
$EST_TEMPLATE = <<<TEMPLATE
<!-- Template site_footer -->
Replace the code in $myhtml with your HTML code and add $myhtml to the HTML part of the template
Originally posted by Rushian:
Lastly, how can I insert an already-created static HTML page into a template? I have a standalone HTML page with release dates in it that I want inserted into the site footer (which will actually be in the 'right menu'.) How is that done as well?
Here the code:
<?php
global $insert;
$htmlfile = "myfile.html";
$htmlopen = fopen($htmlfile,"r");
$myhtmlfile = fread($htmlopen, filesize($htmlfile));
fclose($htmlopen);
This will copy the content of your HTML page to the variable $myhtmlfile. You need to replace myfile.html with the file name of your HTML page.
How do I get more whitespace between by left menu and the news items (or the rest of the modules I guess) on the page? It looks about 8 pixels now, and I'd like 20-30 pixels.
I'm hoping I can do it in the site header template, and not have to edit each module template individually!
Also, I need a way to get a new bottom block of HTML (ie, not a link list) on only the newspage, so I can't use the site footer.. Can this be done?
Lastly, how can I insert an already-created static HTML page into a template? I have a standalone HTML page with release dates in it that I want inserted into the site footer (which will actually be in the 'right menu'.) How is that done as well?
Thanks!