Herótom lett a CSS hackelésből!

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.

Minden sitebuilder rémálma, hogy különböző böngészőkben hogyan fog szétesni az oldal. Az Internet Explorer CSS kezelése Bill Gates édesanyjának non-stop csuklásának a fő oka, azonban én most konkrétan egy egy pixeles Chrome elcsúszást próbáltam levadászni napok óta..

Az IE bugfix - főleg Zen sminkkel dolgozva - nem nagy truváj hiszen CSS-ben elég jól lehet az IE verziókra célozni. Normálisan használható Chrome hacket azonban nem találtam. Olyan lehetőség nincs, hogy nem lehet megoldani, úgyhogy azt találtam ki, hogyha a Zen amúgy is olyan szépen ellátja extra classokkal a body-t, miért ne tolhatnánk bele azt is, hogy épp milyen böngészővel látogtják az oldalt?

Kruska Roland oldalán találtam meg a szükséges szkriptet, amit a smink template.php-jébe beírva egy mezei page preprocessel elérjük, amit akarunk.

function ieversion() {
  ereg('MSIE ([0-9]\.[0-9])',$_SERVER['HTTP_USER_AGENT'],$reg);
  if(!isset($reg[1])) {
    return -1;
  } else {
    return floatval($reg[1]);
  }
}
function browser(){
  $browser = 'ismeretlen';
  if (stristr($_SERVER['HTTP_USER_AGENT'],"mozilla")){$browser = 'mozilla';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"msie")){$browser = ('ie' .ieversion());};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"netscape")){$browser = 'netscape';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"galeon")){$browser = 'galeon';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"konqueror")){$browser ='konqueror';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"lynx")){$browser = 'lynx';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"opera")){$browser = 'opera';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"icab")){$browser = 'icab';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"safari")){$browser = 'safari';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"amaya")){$browser = 'amaya';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"aweb")){$browser = 'amiga Web';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"beonex")){$browser = 'beonex';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"chimera")){$browser ='chimera';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"dillo")){$browser = 'dillo';};
  if (stristr($_SERVER['HTTP_USER_AGENT'],"chrome")){$browser = 'chrome';};
  return $browser;
}

function SMINKNEVE_preprocess_page(&$vars, $hook) {
  $vars['browser'] = browser();
}

Ezután a page.tpl.php-ban akárhová pakolhatjuk, nekem a bodyba kell:

<body class="<?php print $browser; ?>">

Ilyen szinten nem nagyon túrtam még template.php-t, működni működik, de remélem nem csináltam semmi "drupalellenes" dolgot.

 UPDATE: A kommentekből és az azóta történt utána járásaimból kiderült, hogy ezt nem a legmegfelelőbb módszer a célom eléréséhez. Csak azért hagyom bent a postot, mert arra jó példa, hogy hogyan vezessünk be page.tpl.php-ba új változót smink preprocessen keresztül.

Hozzászólások

Admiring the time and energy

Admiring the time and energy you put into your site and in depth information you offer. It's awesome to come across a blog every once in a while that isn't the same out of date rehashed material. Fantastic read! I've saved your site and I'm adding your RSS feeds to my Google account.|

Right now it sounds like

Right now it sounds like Wordpress is the best blogging platform available right now. (from what I've read) Is that what you are using on your blog?|

Today, I went to the beach

Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is totally off topic but I had to tell someone!|

Very good website you have

Very good website you have here but I was curious if you knew of any message boards
that cover the same topics talked about here?
I'd really love to be a part of online community where I can get suggestions from
other knowledgeable individuals that share the same interest.
If you have any suggestions, please let me know.
Thank you!

Howdy! I'm at work browsing

Howdy! I'm at work browsing your blog from my new apple iphone!
Just wanted to say I love reading your blog and look forward to all
your posts! Keep up the great work!

Great work! That is the kind

Great work! That is the kind of info that should be shared around the web.
Disgrace on Google for not positioning this publish
upper! Come on over and talk over with my site . Thanks =)

My brother suggested I would

My brother suggested I would possibly like this
web site. He used to be entirely right. This submit actually made
my day. You cann't consider simply how a lot time I had spent for
this info! Thanks!

Thanks for sharing your

Thanks for sharing your thoughts about ig. Regards

What a information of

What a information of un-ambiguity and preserveness of precious know-how
about unexpected feelings.

It's a pity you don't have a

It's a pity you don't have a donate button! I'd definitely donate to this fantastic blog!
I guess for now i'll settle for book-marking and adding your RSS feed
to my Google account. I look forward to fresh updates and will share this site with my Facebook
group. Talk soon!

Hi Dear, are you genuinely

Hi Dear, are you genuinely visiting this website on a regular basis,
if so then you will without doubt take fastidious experience.

Anaheim Divorce Lawyers in Practice
204 S Illinois St, Anaheim, CA 92805
714-410-5333
sabihafelix09835 [at] gmail [dot] com

It's enormous that you are

It's enormous that you are getting thoughts from this post as well as from our
argument made at this place.

Unquestionably believe that

Unquestionably believe that which you said. Your favorite justification seemed to be on the web the
easiest thing to be aware of. I say to you, I definitely
get irked while people consider worries that they plainly don't know about.
You managed to hit the nail upon the top and defined out the whole thing without having side effect , people can take a signal.

Will probably be back to get more. Thanks

Independance Immobilière -

Independance Immobilière - Agence Dakar Sénégal
Av. Fadiga, Immeuble Lahad Mbacké
BP 2975 Dakar
+221 33 823 39 30

Agence Immobilière Dakar

Hi friends, its enormous post concerning cultureand entirely defined, keep it up all the time.

Great post. I used to be

Great post. I used to be checking constantly this weblog and I'm
inspired! Very helpful information specially the remaining phase :)
I take care of such information much. I used to be seeking this certain info for a
long time. Thanks and good luck.
Jim's San Jose Carpet Cleaning
780 S 3rd St, San Jose, CA 95112
3408-351-1063
colettemackie2641 [at] gmail [dot] com

Hi would you mind stating

Hi would you mind stating which blog platform you're working with?
I'm going to start my own blog soon but I'm
having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your design and style seems different then most blogs and
I'm looking for something unique. P.S Sorry
for being off-topic but I had to ask!

I enjoy what you guys are

I enjoy what you guys are usually up too. This sort of clever
work and exposure! Keep up the amazing works guys I've
incorporated you guys to my own blogroll.

Whats up this is kinda of off

Whats up this is kinda of off topic but I was wanting to know if blogs use WYSIWYG editors
or if you have to manually code with HTML. I'm starting a blog soon but have no coding
skills so I wanted to get advice from someone with experience.
Any help would be greatly appreciated!

Hi to every body, it's my

Hi to every body, it's my first visit of this website; this weblog
contains awesome and really good data in support of readers.

It's going to be finish of

It's going to be finish of mine day, however before finish I am reading this impressive article to improve my know-how.

Everyone loves what you guys

Everyone loves what you guys are usually up too.
This type of clever work and coverage! Keep up the terrific works guys I've included you guys
to our blogroll.

Independance Immobilière -

Independance Immobilière - Agence Dakar Sénégal
Av. Fadiga, Immeuble Lahad Mbacké
BP 2975 Dakar
+221 33 823 39 30

Agence Immobilière Dakar

First of all I would like to say wonderful blog!
I had a quick question that I'd like to ask if you
do not mind. I was interested to find out how you center yourself and clear your
thoughts before writing. I've had a hard time clearing my thoughts in getting
my thoughts out there. I truly do enjoy writing however
it just seems like the first 10 to 15 minutes tend to be lost simply just trying to figure out how
to begin. Any recommendations or hints? Thank you!

Fantastic website you have

Fantastic website you have here but I was curious if you knew of any forums that cover the same topics talked about in this article?
I'd really like to be a part of online community
where I can get responses from other experienced individuals that share the same interest.
If you have any suggestions, please let me know.
Bless you!
Jay's Santa Clarita Tree Removal Kings
26174 Las Lanas Ct, Santa Clarita, CA 91355
661-464-1270
laureljefferson09875 [at] gmail [dot] com

Hi friends, its impressive

Hi friends, its impressive article about tutoringand entirely explained,
keep it up all the time.

Just desire to say your

Just desire to say your article is as astounding. The clarity on your post is just excellent and i could suppose you're a
professional in this subject. Well along with your permission let me to
snatch your feed to keep up to date with coming near near post.
Thanks a million and please keep up the enjoyable work.

I am curious to find out what

I am curious to find out what blog system you're using? I'm experiencing some small security issues
with my latest site and I would like to find something more secure.
Do you have any solutions?

Thanks for your personal

Thanks for your personal marvelous posting! I genuinely enjoyed reading it, you can be a great author.I will always bookmark your blog and will often come back sometime soon. I
want to encourage you to continue your great job, have a nice day!

Wow, that's what I was

Wow, that's what I was looking for, what a information! present here at this blog, thanks admin of this web site.|

Incredible! This blog looks

Incredible! This blog looks exactly like my old one! It's on a entirely
different subject but it has pretty much the same layout and
design. Excellent choice of colors!

Hi there to every one, the

Hi there to every one, the contents existing at this web site
are actually awesome for people knowledge, well,
keep up the nice work fellows.

Very nice article, just what

Very nice article, just what I needed.

Hey! Would you mind if I

Hey! Would you mind if I share your blog with
my zynga group? There's a lot of people that I think would really enjoy your content.
Please let me know. Thank you
Jim's San Jose Carpet Cleaning
780 S 3rd St, San Jose, CA 95112
3408-351-1063
colettemackie2641 [at] gmail [dot] com

Great information. Lucky me I

Great information. Lucky me I came across your website by accident (stumbleupon).
I've saved it for later!

Nice blog here! Also your

Nice blog here! Also your website loads up fast! What host are you using?
Can I get your affiliate link to your host? I wish my website loaded up as fast as
yours lol

Great blog here! Also your

Great blog here! Also your website lots up fast! What web host are you the usage of? Can I get your associate link to your host? I want my web site loaded up as quickly as yours lol|

Very good information. Lucky

Very good information. Lucky me I ran across your website by accident
(stumbleupon). I've book marked it for later!

I am extremely impressed with

I am extremely impressed with your writing skills as well as with the layout on your blog.
Is this a paid theme or did you modify it yourself?
Anyway keep up the nice quality writing, it's rare to see a great blog like this one these days.

Jay's Santa Clarita Tree Removal Kings
26174 Las Lanas Ct, Santa Clarita, CA 91355
661-464-1270
laureljefferson09875 [at] gmail [dot] com

Terrific post but I was

Terrific post but I was wanting to know if you could write a litte more on this topic?
I'd be very thankful if you could elaborate a little bit
further. Bless you!

Hi there, I do think your

Hi there, I do think your site could possibly be having internet browser compatibility issues.

Whenever I look at your blog in Safari, it looks fine however when opening in IE,
it has some overlapping issues. I merely wanted to provide you with a quick heads up!
Aside from that, fantastic site!

Hi there! This article could

Hi there! This article could not be written much better!
Looking through this article reminds me of my previous roommate!
He continually kept talking about this. I
am going to send this post to him. Pretty sure
he's going to have a good read. Thanks for sharing!

Fantastic beat ! I wish to

Fantastic beat ! I wish to apprentice whilst you amend your website, how could i subscribe for a blog
site? The account helped me a acceptable deal.
I had been a little bit acquainted of this your broadcast provided vivid transparent idea

What's Taking place i am new

What's Taking place i am new to this, I stumbled upon this I've found It absolutely helpful and it has helped me out loads.
I hope to contribute & help other users like its helped me.

Great job.

Taxi moto line 128 Rue la

Taxi moto line
128 Rue la Boétie
75008 Paris
+33 6 51 612 712  

Taxi moto paris

Hello to all, the contents present at this web page are really amazing for people knowledge, well, keep up
the good work fellows.

I'm gone to tell my little

I'm gone to tell my little brother, that he should also go to see this weblog on regular
basis to take updated from hottest news.

I absolutely love your blog..

I absolutely love your blog.. Very nice colors & theme. Did you make this web site yourself? Please reply back as I'm looking to create my very own website and want to know where you got this from or exactly what the theme is called. Thanks!|

I think this is among the

I think this is among the most significant info for me. And i'm
glad reading your article. But should remark on few general things,
The website style is perfect, the articles is really great :
D. Good job, cheers

This is a good tip especially

This is a good tip especially to those fresh to the blogosphere.
Simple but very precise info… Appreciate your sharing this one.
A must read article!

Willie G youllied If you are

Willie G youllied

If you are going for best contents like me, only
pay a visit this site daily as it gives feature contents, thanks

Its like you read my mind!

Its like you read my mind! You appear to know a lot about this, like you wrote
the book in it or something. I think that you can do with some pics to drive
the message home a bit, but other than that, this is wonderful blog.
A fantastic read. I will definitely be back.

M.E.C Mon Electricien

M.E.C Mon Electricien Catalan
44 Rue Henry de Turenne
66100 Perpignan
0651212596

Electricien Perpignan

Hi, I think your blog might be having browser compatibility issues.
When I look at your website in Chrome, it looks fine but when opening in Internet Explorer, it has some
overlapping. I just wanted to give you a quick heads up!
Other then that, awesome blog!

Hozzászólás

A mező tartalma nem nyilvános.
  • Internal paths in double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or relative path.
  • Engedélyezett HTML elemek: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <del> <img>
  • A webcímek és email címek automatikusan linkekké alakulnak.
  • A sorokat és bekezdéseket a rendszer automatikusan felismeri.
  • Engedélyezett HTML elemek: <a> <blockquote> <br> <cite> <code> <dd> <del> <div> <dl> <dt> <em> <li> <ol> <p> <span> <strong> <ul>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <mysql>, <php>, <python>, <ruby>, <sql>. The supported tag styles are: <foo>, [foo].
  • Minden email cím át lesz alakítva ember által olvasható módon, vagy (ha a JavaScript engedélyezett) ki lesz cserélve kattintható, de biztonságos hivatkozásra.