Learned that ‘=’ can be used only for assignment of values to variable, i.e. x=3.
If you want to compare to variables in a conditional, you must use ‘==’, i.e. 2==3 is false.
Learned that ‘=’ can be used only for assignment of values to variable, i.e. x=3.
If you want to compare to variables in a conditional, you must use ‘==’, i.e. 2==3 is false.
Broke down the page by section. Now want to have a single page that will reload itself, containing the section selected and the index.
This article suggests how to write a php page that would accept a variable. Now I need the syntax for if/then/else so that the page would include different text depending on the passed variable.
This article discusses if/then/else.
Try this:
if (some test) $nextpage = ‘page1.php‘;
else $nextpage = ‘page2.php‘;
header(“Location: $nextpage“);
I have revised my position (and the page) since this original post. I found performing the include was to problematic in that manner. I have returned to manipulation of the theme.tpl for output (viewable), and .css changes for control of how it is rendered.
————————————————————————————————————————-
The php include worked like this however- I made a page which was called new.php, on which the design (style) of the page was defined using existing site specific css. I utilized it exactly like a template file, but instead of call for content, the page was strictly for links and positioning of site specific navigational blocks/areas. the conclusion of the page was left ‘open’….meaning the last line was <div id=”content”>. Then another page was created titled newend.php, and you guessed it- was everything I wanted displayed after the division content was sealed. Then I went into gallery, and on the page titled main.php, in the header I linked the existing site specific css adjacent to the gallery generated css. Just under the header I performed a php include “../new.php”; and at the end of the page another include “../newend.php”;…the output on some browsers was decent, and flat bad on others, there were too many things to go wrong so I quit this method.
————————————————————————————————————————-The manner in which I do it now is just link the site specific css in the head of the theme.tpl I have chosen to use. Then I C&P everything from new.php before any gallery specific calls…which includes opening the div tag content..it works. Tweak the css for some things an it seems to be fine. I set up overflow to auto, and changed the block for admin tools to be specific size and overflow scroll as wel. the font needed changing in both methods from em’s to absolute (I used 8, 10, and 12pt)….
If you would like copy of these files I will get them to you, but it is not something you can see by observing source, because much of it is pre-handled.
And this about adding hit counter to bottom of pages.
This obviously brings Gallery2 into the website. Maybe this is the way to go.
Created a test php version of the index page. Had to update the ssi include codes to php includes, such as <?php include(“./ssi/Main_Menu.htm”);?>. Learned that the syntax for the path of an included file in different in PHP. In HTML, starting the path with ‘/’ means the root of the web site. In php, ‘/’ means the root of the web server. As suggested here and here, there must be php code to change the location of what is considered ‘root’, but I have yet to figure this out.
There must also be PHP specific code to include the “last modified date” and to run the CGI hit counter. Found this solution for CGI in PHP:
<?php echo system(‘mycgi.cgi’); ?>
is probably easier still. You may have to specify the directory with ./ or even more fully with http://www.example.com/ .
The above did not work on my site. Powweb must require an include statement. The syntax that works is : <?php include(“http://www.glenpritchard.com/cgi-bin/mcount.cgi”);?>
As for the last modified date, the discussion here is useful, although the last entry is confusing and does not seem to work.
Created a new banner gif, but the edges looked jagged. This tutorial about transparent gif creation (specifically the discussion of the matte option) solved the problem.
Added WordPress (this blog). Will need to study how to visually integrate WordPress with the rest of the site. Found this article on the subject.
Made progress in the wee hours converting the photo gallery to CSS. I had 2 installations of Gallery 2, and I was working on the wrong one. Had no luck creating a “local” version of of the template as described here. Also useful will be this page on customizing themes. The theme.tpl in the local directory simply would not take control of the parent file. So, I edited the parent file. The original file is in the local directory in the event that I ever need to restore the old theme. I also made some changes to theme.css in htdocs/Photography/themes/matrix/ which is the main style sheet controlling the appearance of most pages. I commented out the original code. The page does not render correctly from subdomain photography.glenpritchard.com. I will need to specify a static path to the style sheet files.
And then all of a sudden, without explanation or warning, the local copy of the Gallery theme.tpl kicked in and is running the show. Go figure. So, theme.tpl at ftp://glenpritchard.com/htdocs/Photography/themes/matrix/templates/local/ is the integration. The original file in the parent directory is the original full page version. I also changed the reference to all style sheets and graphics to static http addresses so that all elements work at http://photography.glenpritchard.com/main.php as well as http://www.glenpritchard.com/Photography/main.php. Largly finished tweeking the appearance of the gallery, although I still don’t like the blue background in the body area.
Converted Document Library and Paralegal pages to CSS. Added last modified date to footer. Added Facebook and LinkIn logos.
Added a new CGI hit counter to the footer. It’s the best text counter I have seen. It automatically configures itself to track each page. In addition to the total number of hits, it will tell you how many hits in a day, week, and year. And, it’s free! I found MultiCount, and a great tutorial on how to use it, here.
Used “background-attachment:fixed” to freeze star field back ground. Used “position:fixed” to keep nav menu in view at all times.
Added menu items. Converted “Who is Glen” page to CSS. Stayed up late last night trying to get the hit counter provided by Powweb to center in the footer. No luck. Will settle for static “serving the universe” footer until I can find and install a better CGL counter. Made adjustment to the style sheet to make text and hyperlinks more readable. Added ‘min height’ to the green box in which this text appears so the box will always be 500 pixels high even if empty. Rambled on enough to see how the text will flow around the YouTube video object to the right. Added a 10px margin to the <div> containing the video to prevent text from getting too close. Converted Hall of Accolades to CSS. Added the contact me page and e-mail form. Began converting Lawyers Favorite Websites page to CSS.
Glen’s World has a new look thanks to the wonders of Cascading Style Sheets! There is much to learn, so it’ll take a while to get organized. The “old” HTML Glen’s World is here.