-
AuthorPosts
-
wooohanetworks Friend
wooohanetworks
- Join date:
- September 2008
- Posts:
- 1239
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 148
- Thanked:
- 138 times in 41 posts
May 24, 2009 at 2:39 pm #141423I see a ton of threads where this “IE compat code” is thrown around like bubble gum. This really does not make it in the long run and as you can see, by now all the JA Templates are IE8 compatible by default already.
Into all those templates, when it is an older one, JA has placed an additional stylesheet and code to let IE8 render the site properly.
So what you can do, you can open the source view of any JA template demo and look for some lines that look like the ones below and should mostly refer to an additional stylesheet name “ie8.css”. Now when you compare it with your older index.php that is located in the template folder you will see the differences. In the major cases all what is needed is to add the mentioned “MSIE conditional” statements to your site and it takes not a long longer then adding the IE compat mode code to the same file and you have your JA site being a true IE8 compatible site that does not need the cheat trick to let IE8 display the site in the IE7 mode. This way you do it like it should be done and it is indeed the better and more professional solution in the long run.
Below the quick overview, with any questions, simply post those in addition.
This here is an example for JA Teline II —->
You may try to add the code in red to your sites (index.php in template folder) and this extra css file for IE8, this should let the site work correctly without the annoying cheat code in it:
<blockquote><!–>
<style type=”text/css”>
.clearfix {height: 1%;}
img {border: none;}
</style>
<!–><!–>
<style type=”text/css”>
.clearfix {display: inline-block;}
</style>
<!–><!–>
<link href=”http://template15.joomlart.com/ja_teline_ii/templates/ja_teline_ii/css/ie8.css” rel=”stylesheet” type=”text/css” />
<!–><script type=”text/javascript”>
hs.graphicsDir = ‘http://template15.joomlart.com/ja_teline_ii/templates/ja_teline_ii/highslide/graphics/’;
hs.showCredits = true; // you can set this to false if you want
hs.creditsText = ‘Powered by JA Highslide’;
hs.creditsHref = ‘http://joomlart.com/’;
hs.creditsTitle =’Go to the Highslide JA homepage’;
</script></head> </blockquote>
You should upload the css to your server like in the same as the regular css is and change the shown path above to your site and css.
In case anyone wants to know what the “if gte IE7” and “if gt IE7” stands for, each are those conditional statements that show the browser that when “if the browser is gte=greater or equal to IE7” or “if gt=greater than IE7” the additional stylesheet has to be used to display the site. There are more statements like this, “lt” stands for “less than” and “lte” for example for “less than or equal to”. Same are used for lower versions of IE like IE6 and so on. Just google for “MSIE conditional statements” to get some good tutorials about how to use those.
1 user says Thank You to wooohanetworks for this useful post
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
May 24, 2009 at 2:56 pm #305761<!–>
<link href=”http://template15.joomlart.com/ja_teline_ii/templates/ja_teline_ii/css/ie8.css” rel=”stylesheet” type=”text/css” />
<!–>This text should NOT be used.
The correct text is….
<!-->
<link href="<?php echo $tmpTools->templateurl(); ?>/css/ie8.css" rel="stylesheet" type="text/css" />
<!-->
or if it’s not a JA template….<!-->
<link href="PATH TO YOUR TEMPLATE/css/ie8.css" rel="stylesheet" type="text/css" />
<!-->mfcphil Friendmfcphil
- Join date:
- September 2007
- Posts:
- 2866
- Downloads:
- 3
- Uploads:
- 218
- Thanks:
- 211
- Thanked:
- 388 times in 133 posts
May 24, 2009 at 3:01 pm #305762Scotty thanks for the correction and thanks also for warning people to back-up files before editing.
My template php file already has
<!–>
<link href=”<?php echo $tmpTools->templateurl(); ?>/css/ie8.css” rel=”stylesheet” type=”text/css” />
<!–>but I still needed to add the compatability code in the head to get my site to look correct in IE8
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
May 24, 2009 at 6:38 pm #305771Yea Joomlarts ie8.css will only fix template issues. It will not correct any user added stuff like article or module styling that is not IE8 compatible.
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
May 24, 2009 at 7:02 pm #305772Fortunately, MS gave us a compatability tag;)
mfcphil Friendmfcphil
- Join date:
- September 2007
- Posts:
- 2866
- Downloads:
- 3
- Uploads:
- 218
- Thanks:
- 211
- Thanked:
- 388 times in 133 posts
May 24, 2009 at 7:54 pm #305774<em>@phill luckhurst 130046 wrote:</em><blockquote>Fortunately, MS gave us a compatability tag;)</blockquote>
Is this the code that you first gave me and we have been telling people to use that woo has called the “cheat trick”?
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
wooohanetworks Friendwooohanetworks
- Join date:
- September 2008
- Posts:
- 1239
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 148
- Thanked:
- 138 times in 41 posts
May 24, 2009 at 9:34 pm #305785Your choice, either use the compat code or make your site correct, none of my sites use this compat code, all are created Ie8 compatible. One for example is a JA site, the other one a Rockettheme site, the other one a stand alone eCommerce system and so on. For each site I work with IE8 and IE7, when any errors comes up I do correct those line by line, this is my job, not to place a compat code and cheat.
The reason why I am not into this compat code thing, is because, also when the site is not displayed correctly immediately when adding new stylesheets alone, I do the rest to make the site compatible. This is a template club where the forum is about webdevelopment, so I see no reason not to use the real methods of webdevelopment and not the compat code trick that goes around all the principles of webdesign and development stands for, making anyone who does it automatically to a lower grade of professionalism to no professionalism and often this will lead to less respect and less acceptance in the business and a lot of business in this business is business2business….;) (Who did rise here? Someone not having the skills to do the manual adjustments only rose in his mind but not in the reality when he or she is around the leading people who actually rose due to manually adjusting anything and not using a compat code also when it is provided by MS, provided to end users but not to webdevelopers. You missed the point on for whom this code was provided, not for the pros but the end users who have no skills and do not want to learn the real way.)
It is up to anyone to do what he likes with his sites, and also when it is no 100% out of the box soiution like the compat trick, it will in any way give your some additional skills when you gone the hard way. When this forum is not about learning but only doing some quickest cheating to sites, I think the members who do not do it this way are not present enough to represent some bit higher level of principles for others to follow.
From my perspective, and for this special case, people too much have the strong wish to get such “place this code to your done site, and the browser will display the site like the outdated IE did”. Sorry, this is not the Joomlart.com Forum I initially joned, it was about doing all the little or bigger things needed when I first stepped into this forum and not forum of “Anti MS attitudes combined with doing only those things, the worst beginners do”, but “a more professional wind with a lot of manual IE adjustments that simply come mandatory” and not to only hate MS for bringing out a new browser and do the cheat trick with it, sorry!
Due to that, that I saw all those real tweaks here in the forum I learned that this is the correct way, to manually do the work, IMAGINE WHAT IF JA DID NOT CORRECT ALL THEIR TEMPLATES BUT ONLY HAD PLACED THIS COMPAT CODE INTO THE OLD TEMPLATES! Think you understand my point, I am with the JA that stands for “Joomla A Grade” and still exists. Thanks to JA i learned this method and not to call myself a risen pro who does not even know how to use CSS to make a site compatible.
When you are only a real complete END USER, who did never change on thing on the site of your own, use the compat code, but anyone who already knows how to work with CSS and php, do it the right way and free yourself. Thanks!
Much success with your sites and businesses!
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
May 24, 2009 at 10:07 pm #305786Not everyone is a top level genius of a coder like yourself, if they were they would not need this forum.
Not everyone has the time to correct a large site in the “proper way”.
None of this makes a person a “lower grade professional” (posting code telling everyone to do it “my way” then getting that code wrong is very unprofessional IMHO)
If MS did not feel there was a genuine need for this meta tag they would not have made it available.
What you also have to remember is that MS have a compatibility list of the really big sites and to make them display correctly force them into compatibility mode behind the scenes. So, when you request one of the “listed” sites via IE8 a check is done with MS and if needed the browser automatically switches to compatibility mode unbeknown to the end user. MS regularly check to see if those sites still need to be on the list and if needed will remove them. Currently, that list is still growing.
mfcphil Friendmfcphil
- Join date:
- September 2007
- Posts:
- 2866
- Downloads:
- 3
- Uploads:
- 218
- Thanks:
- 211
- Thanked:
- 388 times in 133 posts
May 24, 2009 at 10:29 pm #305787What about all the none developers out there who are simply browsing the internet.
What if they don’t know what the compatability button is….would you have them simply assume your site i broken because it is not how it should be in IE8.
The compatability code makes sure your site looks correct.
I have lost count of the people here at JA that have used the code including myself, and have found it to be an ideal fix….I had a user who could not log in because my log-in box had dissapeared in IE8 as soon as I entered the code all was well again.
Yes I added the updated code from JA when they made it available, but the code still works.In my opinion you are wrong to tell people not to use a code that we all know to work.
But you as always will do as you please.
June 12, 2009 at 7:46 am #307692<em>@scotty 130030 wrote:</em><blockquote>This text should NOT be used.
The correct text is….
<!-->
<link href="<?php echo $tmpTools->templateurl(); ?>/css/ie8.css" rel="stylesheet" type="text/css" />
<!-->
or if it’s not a JA template….<!-->
<link href="PATH TO YOUR TEMPLATE/css/ie8.css" rel="stylesheet" type="text/css" />
<!-->
</blockquote>
Just to add my little bit 🙂Template modified is JA Dravity
I added the compatibilty code and Scotty’s correct code but that didn’t solve the issue.After a few hours of attempts at mods to the IE8 css, I removed the following from the template index.php and voila!!
<!–>
<style type=”text/css”>
.clearfix {display: inline-block;}
</style>
<!–>Hope this helps someone.
-
AuthorPosts
This topic contains 11 replies, has 5 voices, and was last updated by jenn 15 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum