Webmaster's Lounge Page 282

Started by aRedMoon October 19th, 2004 2:00 PM
  • 280471 views
  • 7065 replies

aRedMoon

Wait for me outside the lines

Age 34
Male
Minnesota
Seen April 23rd, 2018
Posted September 10th, 2013
11,126 posts
19.2 Years
Wait, there's an IE10? Wow am I behind...!
facebook \\ twitter \\ blog a.k.a life // tumblr // google+

june 10, 2003 = registered at old pc
march 24, 2004 = registered at new pc
june, 2004 = modded ;;; august, 2004 = quit/fired (point of debate)
december, 2004 = banned ;;; december 2, 2005 = unbanned
june 10, 2008 = omg... five years!
june 10, 2012 = countdown to nine years on pc...
Male
Seen November 6th, 2020
Posted May 17th, 2013
467 posts
11.3 Years
Let's see one more time, this time with real browsers (I was using Compat Mode):

IE 6 = Looks cramped but otherwise functional (navigation bar is problematic)
IE 7 = OK!
IE 8 = OK!
IE 9 = Even better OK!
IE 10/Firefox/Chrome/Safari/whatever modern browser = Perfect!
If you are using old IE and some things break, but they work in other browsers, I would recommend you check out some custom .htc files to include in your CSS.

One in particular is a file called "csshover3.htc", which should allow dropdown menus using CSS in browsers as old as IE7. It is a Javascript file that should fix the rules for the page...

Another thing I have ended up resorting to is browser sniffing and sending custom code accordingly, (Or running in what I like to call "Ugly mode", which is a basic version of the page that will work in the browser in question). You can do this with a simple Javascript function that checks "navigator.appName" and "navigator.appVersion" for certain strings.

aRedMoon

Wait for me outside the lines

Age 34
Male
Minnesota
Seen April 23rd, 2018
Posted September 10th, 2013
11,126 posts
19.2 Years
If I were to do anything like an "Ugly Version"... it would be a blank page with a link to google.com/chrome

;)
facebook \\ twitter \\ blog a.k.a life // tumblr // google+

june 10, 2003 = registered at old pc
march 24, 2004 = registered at new pc
june, 2004 = modded ;;; august, 2004 = quit/fired (point of debate)
december, 2004 = banned ;;; december 2, 2005 = unbanned
june 10, 2008 = omg... five years!
june 10, 2012 = countdown to nine years on pc...

Legendary Silke

You like dragons?

Seen December 23rd, 2021
Posted April 22nd, 2020
5,925 posts
12.5 Years
If I were to do anything like an "Ugly Version"... it would be a blank page with a link to google.com/chrome

;)
Hehe... Some trickery with Modernizr/feature detection libraries/conditional comments/browser sniffing (I DON'T recommend the latter) and CSS hiding rules will make it easy to do just that.

I don't shove browsers to people, though. Sometimes it's just cruel to force someone else to switch browsers, especially when I don't think one should have to.

Legendary Silke

You like dragons?

Seen December 23rd, 2021
Posted April 22nd, 2020
5,925 posts
12.5 Years
I'd just add a bar to the bottom that detects what browser they are using and if it isn't Chrome, I'd make it say that the page is better viewed in Chrome. That way, it's not forced, yet it is still seen.

I want to set that up. I should Google it up.
Before setting that up, do test in other browsers :)
Male
Seen November 6th, 2020
Posted May 17th, 2013
467 posts
11.3 Years
If I were to do anything like an "Ugly Version"... it would be a blank page with a link to google.com/chrome

;)
Ouch... Even though I loathe developing for some browsers, I always dislike it when people sniff out a browser and then send broken code if they happen to detect it. Just code a conditional section that says that their browser is not supported so things may be broken, but still let them try.

Eg: Adding this to your HTML:

<!-- if IE><div>This browser is unsupported, so some things may be broken in it</div><![endif]-->

aRedMoon

Wait for me outside the lines

Age 34
Male
Minnesota
Seen April 23rd, 2018
Posted September 10th, 2013
11,126 posts
19.2 Years
I've always envisioned myself to be a military dictator. The web wasn't designed to be a democracy where people got to chose stuff. ;p
facebook \\ twitter \\ blog a.k.a life // tumblr // google+

june 10, 2003 = registered at old pc
march 24, 2004 = registered at new pc
june, 2004 = modded ;;; august, 2004 = quit/fired (point of debate)
december, 2004 = banned ;;; december 2, 2005 = unbanned
june 10, 2008 = omg... five years!
june 10, 2012 = countdown to nine years on pc...

Legendary Silke

You like dragons?

Seen December 23rd, 2021
Posted April 22nd, 2020
5,925 posts
12.5 Years
Just out of curiousity's sake, what other names can I substitute for <!-- if IE> so it will detect other browsers? Or is there a way I can find the other codes? I'd really like to put a warning on my page for Wii Opera users as the site is rather broken with that browser and to add that warning to the bottom of the page.
Actually, Archenoth's code is broken.

The actual syntax for conditional comments:
<!--[if IE]>put HTML here<![endif]-->
You can put lt, gt, lte and gte in front of IE to designate that you want it to apply to versions of IE lesser, greater, less than or equal or greater than or equal to the designated version.

Put a number after IE to make clear that you're targeting a specific version of IE.

This will not work starting from IE10 because it acts like every other browser - it ignores them.

Conditional comments do not exist before IE5, too.

It is possible to target only IE Mobile by using IEMobile.

Forget about detecting Mac IE 5.

This one shows more about it:

http://en.wikipedia.org/wiki/Conditional_comment

This one is hack(-ish):
http://en.wikipedia.org/wiki/CSS_filter

Oh, and yes, you can target every NON-IE browser with it, but there's no way to directly target a specfic non-IE browser. You'll have to resort to JavaScript. Targeting non-IE browsers using conditional comments will also mean that you need to have a different kind of syntax.
Male
Seen November 6th, 2020
Posted May 17th, 2013
467 posts
11.3 Years
Actually, Archenoth's code is broken.
Oh dammit... You are right... And yes, for any other non-IE browser, you will have to resort to the Javascript Code I put in my previous post.

All of the methods you can use are described here.

Legendary Silke

You like dragons?

Seen December 23rd, 2021
Posted April 22nd, 2020
5,925 posts
12.5 Years
Oh, but if you are able to detect the features that you need (and have everything in your mind sorted all out), you might want to use a feature detection library, like Modernizr so that... you can make different stuff to appear or not appear or appear differently depending on the actual capabilities of the browser.
Okay, I hope someone here has a little vBulletin experience, but I've had someone request a feature to disable the ability to send a user friend requests. Would such a plugin exist or would I have to work magic with their profile? I've looked at the vbulletin.org forums to see if they have one, but I haven't seen it anywhere.
Sadly, there isn't a way for you to make that happen. The only option that is available is to turn off Friendship Request Emails.

Petie

Age 34
Male
Colorado
Seen June 25th, 2022
Posted July 14th, 2020
152 posts
14.5 Years
You could, theoretically, use template conditionals to hide the link if the "u" variable in the URL matches the user in question's user id. You would want to put something similar to the following in the user profile template in the template editor (obviously, you'll need to look up the proper syntax for vBulletin's template conditionals as I haven't used them in quite a while):

<if intval($_GET["u"]) != 12345>
[Existing vBulletin Friendship Request Link Here]
</if>
Replace 12345 with that user's ID and it will show it for every user except the one specified. Also, if I remember correctly, you can use some PHP functions in template conditionals so if you needed to hide the link for multiple users, you could do something like this:

<if !in_array(intval($_GET["u"]), array(12345, 12346, etc.)>
[Existing vBulletin Friendship Request Link Here]
</if>
Again, the user IDs you specify would cause the friendship request link to not appear on their profiles.

Do bear in mind that this would need to be done everywhere where that link appears and it won't completely disable the feature (you could do that by modifying the actual code that sends the request, using a similar format to the above, but I wouldn't recommend taking this route as you're editing system files at that point) - someone could send a request to them by modifying someone elses' URL. It's also worth noting that the functions and variables I used (specifically, $_GET) may or may not be available in template conditionals - I can't remember for sure. That said, for the most part, it should be pretty effective, it's just a decent bit of manual leg work for something pretty insignificant considering they can just turn off friendship request notifications (from the Edit Options section of the User CP).

Oryx

CoquettishCat

Age 30
Female
Seen January 30th, 2015
Posted December 27th, 2014
13,184 posts
12.2 Years
Orrrr you could abstract it from their unique profile, make it into an option, and then post it somewhere so other people that need help doing that can use it :3;


Theme * Pair * VM * PM

Not all men...

Are all men stupid?

That's right.

Petie

Age 34
Male
Colorado
Seen June 25th, 2022
Posted July 14th, 2020
152 posts
14.5 Years
Orrrr you could abstract it from their unique profile, make it into an option, and then post it somewhere so other people that need help doing that can use it :3;
This would still require pretty much the same steps, replacing the user ID check with a check for a custom profile field instead. It might be worth the effort if it was a common request but it sounds more like it's a single member who wants it so it likely isn't worth investing that kind of time. Definitely a good thought though.

aRedMoon

Wait for me outside the lines

Age 34
Male
Minnesota
Seen April 23rd, 2018
Posted September 10th, 2013
11,126 posts
19.2 Years
So, those that use Wordpress: is it just me or have there been an insane amount of plug-in updates the past 2 weeks or so? Almost everyday, I have an update to do. x_X
facebook \\ twitter \\ blog a.k.a life // tumblr // google+

june 10, 2003 = registered at old pc
march 24, 2004 = registered at new pc
june, 2004 = modded ;;; august, 2004 = quit/fired (point of debate)
december, 2004 = banned ;;; december 2, 2005 = unbanned
june 10, 2008 = omg... five years!
june 10, 2012 = countdown to nine years on pc...

Hybrid Trainer

Age 28
Him/Them
«UK»
Seen 4 Weeks Ago
Posted January 27th, 2022
2,096 posts
14.5 Years
I haven't really noticed .-.
I didn't touch my Wordpress for a good few weeks and the only updates I got were the actual wordpress one and a few plugin updates saying they were becoming compatible with the new version of Wordpress.
What plugins have you been using?

aRedMoon

Wait for me outside the lines

Age 34
Male
Minnesota
Seen April 23rd, 2018
Posted September 10th, 2013
11,126 posts
19.2 Years
A bundle of 'em. Maybe it's just me.

:P


You're really into typography, eh? *pokes your sig*
facebook \\ twitter \\ blog a.k.a life // tumblr // google+

june 10, 2003 = registered at old pc
march 24, 2004 = registered at new pc
june, 2004 = modded ;;; august, 2004 = quit/fired (point of debate)
december, 2004 = banned ;;; december 2, 2005 = unbanned
june 10, 2008 = omg... five years!
june 10, 2012 = countdown to nine years on pc...

Hybrid Trainer

Age 28
Him/Them
«UK»
Seen 4 Weeks Ago
Posted January 27th, 2022
2,096 posts
14.5 Years
Maybe you're just unlucky. Or lucky, I don't know it depends on what sort of update it was xD

And yea, I am :3 I love how you can make words into something visually pleasing.

Hybrid Trainer

Age 28
Him/Them
«UK»
Seen 4 Weeks Ago
Posted January 27th, 2022
2,096 posts
14.5 Years
I got all my updates and such from inside the wordpress admin control panel.