Page 1 of 2
php and mac - problems
Posted: Fri Feb 13, 2004 4:44 am
by starchild
Hi all!
I am having trouble getting our website to display properly on macs. The stylesheet doesn't seem to be called properly, and some flash animations won't display either.
I then made a mac friendly version, which basically meant removing the flash portion at the top of the page.
This leads me to believe that there must be some kind of tag that a mac OS needs to view the page properly. Is this the case? Did the HTML that I added to the top of the page to embed the flash muck up the coding, maybe?
The page that wont display properly is
http://baylounge.com/catalog/
The mac friendly version is
http://baylounge.com/noflash/catalog/
Any help is much appreciated,
tim
Posted: Fri Feb 13, 2004 5:31 am
by JayBird
and what has this to do with PHP Code?
Posted: Fri Feb 13, 2004 5:36 am
by starchild
sorry,
I thought maybe there were specific php tags that were needed......apologies if this was a stupid question,
tim
Posted: Fri Feb 13, 2004 5:48 am
by JayBird
for starters, you have the Flash EMBED code before the opening HTML tag which isn't good practice.
Not sure about the stylesheet tho.
Mark
Posted: Fri Feb 13, 2004 6:20 am
by starchild
Thanks Bech100 - I'm only learning about coding really through trial and error.....
I think I've fixed what you were reffering to - hopefully this will fix the problem - just need a someone with a mac now to see for sure!!!!!!!
Cheers,
tim
Ik works for me
Posted: Fri Feb 13, 2004 11:30 am
by jeanloui
I'm in a Mac (Safari) and I see the flash perfect here!
Maybe a problem of your browser- flash plugin?
Posted: Wed Feb 18, 2004 1:41 pm
by no_memories
try using an absolute path for your style sheet.
Now -->
<link rel="stylesheet" type="text/css" href="stylesheet.css">
try -->
<link rel="stylesheet" type="text/css" href="
http://baylounge.com/catalog/ stylesheet.css">
And I noticed your <base href="
http://www.baylounge.com/catalog/">
When a browser looks for the base reference to a www. addy when your link is refered to a none www address ( your refering link
http://baylounge.com/catalog/) this can cause conflics in certain instances.
The browser sees this address and the base in the coding says another thing.

CODING!!! lol
osCommerce
Posted: Wed Feb 18, 2004 3:17 pm
by jeanloui
the stylesheet of an osCommerce portal is (ussually) at
catalog/includes/stylesheet.css
Posted: Wed Feb 18, 2004 8:36 pm
by ilovetoast
I'm on a Mac. I can see the Flash fine. There are layout problems, though. Those are the result of bad HTML, not the Mac. Run your code through a syntax checker. There are several errors that I can see at first glance.
peace
Posted: Wed Feb 18, 2004 9:59 pm
by starchild
Thanks everyone for your contributions and advice. I am trying to clean the code up, as best I can, with the knowledge I have.
The only problem i see with an absolute reference to the stylesheet is that of secure mode. I guess I could make the reference https:/... instead of http:/.. and that would overcome that problem.
As far as i am aware, the usual location of an oscommerce stylesheet is in "domain.com/catalog/" - as I haven't moved it from the default installation.
Anyway, I will keep on plugging away until I get it right I guess.
Thanks a million to everyone again!
tim
Posted: Thu Feb 19, 2004 3:37 am
by jeanloui
starchild wrote:As far as i am aware, the usual location of an oscommerce stylesheet is in "domain.com/catalog/" - as I haven't moved it from the default installation.
I'm running "The Exchange Project Preview Release 2.1
" and the stylesheet is at catalog/includes/stylesheet.css
but I see you have hacked the osCommerce (if this is an osComm) on a very strange (and unstable) way
Posted: Thu Feb 19, 2004 6:13 am
by starchild
hi Jeanloui,
I'm actually running Osc ms2 MAX 1.5 (found at
http://oscdox.com/index.php). In this version, the stylesheet is actually in the catalog folder by default - due maybe to the fact that MAX runs on a template system. I am however going to give the "absolute path" a try and see if this fixes things.....
I viewed the site today on a friends Mac, and both flash movies are in the right spot, and working - leaving only the stylesheet issue to be fixed now. I
think I have fixed the bad HTML coding.
Let's see how it goes.
Thanks again for your input,
tim
Posted: Thu Feb 19, 2004 6:28 am
by starchild
no_memories wrote:try using an absolute path for your style sheet.
Now -->
<link rel="stylesheet" type="text/css" href="stylesheet.css">
try -->
<link rel="stylesheet" type="text/css" href="
http://baylounge.com/catalog/ stylesheet.css">
And I noticed your <base href="
http://www.baylounge.com/catalog/">
When a browser looks for the base reference to a www. addy when your link is refered to a none www address ( your refering link
http://baylounge.com/catalog/) this can cause conflics in certain instances.
The browser sees this address and the base in the coding says another thing.

CODING!!! lol
Thanks no_memories: i actually changed the base reference anyway, as it was conflicting with the SSL certificate, which was issued to
http://www.baylounge.com, not baylounge.com ( it was coming up with that annoying info box questioning the authenticity of the certificate, as the site name didnt match the name on the certificate).
tim
Posted: Mon Feb 23, 2004 8:47 pm
by starchild
Hello again,
OK - I've applied all the changes that were kindly suggested, and still no luck. The weird thing is that the stylesheet is being called in the no flash version of the site. This would lead me to believe that there is something wrong with the flash coding and it's synergy with the php coding, but I'm sure that I've fixed this.
Does anyone have anymore ideas?
Fixes made include:
* excess html tags removed
* absolute path to stylesheet included
* general code cleaning - ie removing excess php tags.....
* base reference and referring link now same
This is really doing my head in!
Thanks again folks,
tim
http://www.baylounge.com/catalog
Posted: Mon Feb 23, 2004 9:52 pm
by ilovetoast
All righty, time to take a closer look. Here's what I found for you:
HTML Errors:
Line 7: The doc type you specify doesn't allow empty <meta /> element.
Line 8: Again, the doc type you specify doesn't allow empty <meta /> element.
Line 11: The doc type you specify doesn't allow marginwidth, marginheight, topmargin, bottommargin, leftmargin, or right margin attributes. Granted on some browsers these attributes may be neeeded for proper display - thank you Micro$oft for non-compliant browsers.
Lines 23-27: The embed tag is missing a height attribute. This one should be there. It is also missing an align attribute, which could be empty, but still should be there.
Line 33: Table width must be a number or a percent. Not an empty value.
Line 45: Your doc type doesn't allow a background attribute for td elements, and its empty anyways.
Line 50: You have a br element inside a table (but not inside a td). This isn't allowed with the doc type.
Line 51: You have a close p tag but no p tag. Plus its improperly placed in a table element (see line 50).
Line 52: You have a td element inside a table element. Again, not allowed. Needs to be in a tr for this doc type.
Line 269-270: You should follow proper form and include a bgcolor param. It is missing.
Line 270: You should follow proper form and include bgcolor and name attributes in your embed tag. They are missing.
Line 288: The value for the bgcolor attribute must be a hex value or a predefined color. You have an empty balue.
Line 322: © is unencoded. It needs to be encoded as "©" to use properly.
HTML Warnings:
Lines 94, 130, 166, 202, 242: You have implicitly closed multiple tr's. Nasty windows code. Don't do that.
Style Sheet errors:
Great googly moogly. What an nasty turd this is. Sorry if you made it, but this is an ugly mother.
On the first day, God made coding standards. He created stadard spacing, accepted codes styles and it was good. This document is a case study in bad coding standards.
On the second day, God made the quotation mark. He said use it as it is good. Font name should be in quotes, so sayeth W3C.
On the third day God reminded us that using one font for the font-family was just plain silly. It says "family," put multiple fonts in the list in case the end user doesn't have the one font you specify.
Line 12: Put font names in quotes.
Line 15: There is a line break after "14" and before "px".
One line 21, I got <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> off. I'm off to download the original style sheet from oscommerce.com. This is a mess. If they wrote it they should be flogged. If you wrote it, well, that's why you're here asking for help. Make no mistake, I'm not upset with you -- you admit problems and are seeking help. I'm upset as this appears to be something that someone else wrote and distributes, someone who should know better. I'm also upset because my carpal tunnel is flaring today and I'm typing with one left hand.
I'm going through this damn thing line by line and I'll post a fixed version when done. Off to download. Next post to contain more....
peace
sour toast