PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Mon Feb 22, 2010 6:52 pm Reply with quote Back to top

When you use the php if statement, does the code that does not apply slow down load time?

Example: you have a an if statement for IE6 browser and an else for all other browsers, will that if statement have an impact on non IE6 browsers load times or is it ignored?
View user's profile Send private message Send e-mail Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Mon Feb 22, 2010 7:29 pm Reply with quote Back to top

nuken, not 100% sure where you are going with this. When you say "load time", that could mean different things to different people. I suspect you mean the overall performance of the server producing the page. Others could think it means "parsing time". Essentially no different in terms of code parsing. When it comes to code execution, what is the alternative? If you want to perform one thing for IE6 and other code if not IE6, you have no choice. HOWEVER, since IE6 users are FAR LESS likely than the others, I would put that in the else, but it may also be important as to what kind of test you are making. Your most likely conditional should be up front and as best it can be to be on the "positive" side and not complicated, the better.

If you have specifics that you would like to share - some alternatives that you are considering - go ahead of post them and let us see what seems the better choice.
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Feb 22, 2010 7:52 pm Reply with quote Back to top

If I had to guess, and I am, I would say that what you are referring to would be to minuscule to measure.
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Mon Feb 22, 2010 7:54 pm Reply with quote Back to top

Specifically, I added a jquery star rating system to the Tricked Out News. The css for the rating system does not work well with IE6. Today I have been testing using the original rating system with IE6 and the new with all other browsers. It seems to work fine. I was then considering what impact the extra code would have on the over all performance of the articles.php verses removing the IE6 specific code and using a css based work around for IE6.
View user's profile Send private message Send e-mail Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Feb 22, 2010 8:32 pm Reply with quote Back to top

Normally jQuery handles the browser differences for their plugins. If you did this already then sorry for the redundancy Wink. Google for jquery star rating.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Mon Feb 22, 2010 9:29 pm Reply with quote Back to top

The jquery star rating works fine in IE6, the issue is with consistent location in IE6 with the css. I think I will tinker with the css some more to work the bugs out. All other browsers it seems to work as expected.
View user's profile Send private message Send e-mail Visit poster's website
gazj
Worker
Worker


Joined: Apr 28, 2006
Posts: 150
Location: doncaster england

PostPosted: Tue Feb 23, 2010 8:51 am Reply with quote Back to top

nuken im no wizzkid with css but i seem to have a good track record with working with it and learn more n more as i work with ie specific css and other css hit me up on my site sometime via chat and i may be able to work it out with you as i dont fully understand what your getting at
View user's profile Send private message Visit poster's website
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Tue Feb 23, 2010 10:32 am Reply with quote Back to top

Thank you gazj. My issue is that in IE6 the placement of the stars changes depending on the theme used. Every other browser works fine no matter what theme is used. I just about have it worked out though.
View user's profile Send private message Send e-mail Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Feb 25, 2010 1:42 am Reply with quote Back to top

Maybe this would help:
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
djmaze
Subject Matter Expert


Joined: May 15, 2004
Posts: 689
Location: http://tinyurl.com/5z8dmv

PostPosted: Thu Feb 25, 2010 10:40 am Reply with quote Back to top

Every IE has issues and the trouble really starts with IE8

You can detect the mode using document.documentMode
The values can be:

5 = IE5 mode
7 = IE7 mode
8 = IE8 mode

Each mode handles javascript, html and css differently.
Declare a DOCTYPE and IE5 mode is gone (only IE7 and IE8 modes remain)

Then try this:
Code:

some text
<span style="float:right">more text</span>

Now view the code in IE7, IE8, IE8+Compatibility mode, Firefox, Safari and Opera

Oh, and just skip IE6. Everyone is abandoning it anyway.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9136
Location: Arizona

PostPosted: Fri Feb 26, 2010 6:49 am Reply with quote Back to top

djmaze wrote:
Oh, and just skip IE6. Everyone is abandoning it anyway.


Could not agree more. I just wish those who voted "Yes" in our recent poll would have added their reasons why in the comments like I had asked:
Only registered users can see links on this board!
Get registered or login to the forums!


However, in my opinion, still enough to conclude that we can stop trying to tweak everything to work on IE6. JMO though and not a reflection of any official RN policy. Laughing
View user's profile Send private message Visit poster's website
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Fri Feb 26, 2010 11:55 am Reply with quote Back to top

I thought these snippets of jquery were interesting, It requires JS so I wouldn't use for major restyles... but if you are just selectively tweaking the appearance for a feature that requires JS anyway, you can target any browser you want.

Code:
   <script type="text/javascript">$.browser.camino = /camino/.test(navigator.userAgent.toLowerCase()); if ($.browser.camino) {
   document.write('<link rel="stylesheet" href="http://yoursite.com/css/camino.css" type="text/css" media="screen">'); }</script>

   <script type="text/javascript">$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase()); if ($.browser.chrome) {
   document.write('<link rel="stylesheet" href="http://yoursite.com/css/chrome.css" type="text/css" media="screen">'); }</script>

   <script type="text/javascript">$.browser.opera  = /opera/.test(navigator.userAgent.toLowerCase());  if ($.browser.opera)  {
   document.write('<link rel="stylesheet" href="http://yoursite.com/css/opera.css"  type="text/css" media="screen">'); }</script>

   <script type="text/javascript">$.browser.safari = /safari/.test(navigator.userAgent.toLowerCase()); if ($.browser.safari) {
   document.write('<link rel="stylesheet" href="http://yoursite.com/css/safari.css" type="text/css" media="screen">'); }</script>


You can target other browsers by emulating of the pattern of the user-agent/name
View user's profile Send private message
djmaze
Subject Matter Expert


Joined: May 15, 2004
Posts: 689
Location: http://tinyurl.com/5z8dmv

PostPosted: Fri Mar 12, 2010 1:56 pm Reply with quote Back to top

@spasticdonkey

Your code fails miserably on XHTML documents. document.write() doesn't exist in XHTML

Don't say: it works in IE. yes... IE is NOT a xhtml parser it thinks it is HTML.
View user's profile Send private message Visit poster's website
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1364
Location: Texas, USA

PostPosted: Fri Mar 12, 2010 2:13 pm Reply with quote Back to top

good point, I've never actually used it... and would probably shy away from any JS style corrections unless there was no other easy method... it was more for concept than anything... also in jQuery 1.4 the $.browser variable is changed to $.support
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum