Ötlet: Dinamikusan változtatható szélességű Facebook pluginek

Kategória: 
Gyorstippek

Ez egy ötlet, ami működik, viszont nem vagyok egy Stahl Judit, süti témában annyit tudok, hogy vannak, és lehet használni. Tehát a kockázatok és mellékhatások következményeiről írjon itt a kommentben, vagy kérdezze meg sminkmesterét, sitebuilderét (hopp, fail.. ez én vagyok..)

Probléma a következő: Adott egy manapság oly divatos reszponzív drupal smink. Szépen be van állítva cssből, hogy milyen méretekben, hogyan jelenjen meg. Igenám, de a facebook plugineknek többnyire van egy olyan csúnya paraméterük, hogy "width". Ezt php-ből állítani tudjuk, de szerveroldalon nem tudunk meggyőződni a böngésző szélességéről.

Mi most mégis megcsináljuk, az alapötlet rém egyszerű:

Vegyük a facebook pluginek méretét alapértelmezetten a legkisebbre, ami a reszponzív sminkünk legkisebb felbontás melletti formázásaihoz passzol.

Jqueryvel tegyünk egy hosszúlejáratú sütit a user gépére.

[geshifilter-drupal6](function ($) { Drupal.behaviors.tm_hooks = { attach: function(context, settings) { $.cookie("en_kicsi_kukim", $(window).width(), {expires : 365}); } }; })(jQuery); [/geshifilter-drupal6]

Majd phpvel kiolvasva állítsuk a facebook plugin paraméterét a kívánt értékre a sminkfüggvényünkben, vagy templateben.

Pl 1280-nál kisebb böngészőnél 350pxes, annál nagyobbnál 520px-es plugint kérünk.
És itt kell még egy help: Az a fránya jquery nem igazán a böngésző rendes szélességét adja vissza, legalábbis ami a firefox web developer toolbar méretezését illeti, szóval ez most hogy is van?
[geshifilter-drupal6] $fb['width'] = isset($_COOKIE['en_kicsi_kukim']) && $_COOKIE['en_kicsi_kukim'] > 1263 ? 520 : 350;[/geshifilter-drupal6]

Ebben az esetben mindössze egyetlen alkalommal fog a felhasználónál a legkisebb méretű plugin megjelenni, és még ha át is méretezi a böngészőt, az is korrigálva lesz a következő oldalletöltéskor.

Kérdések:

  1. Mennyire ok, ez módszer, nincs-e benne valami buktató, amit benéztem?
  2. Van-e más lehetőség?
    • Css kilőve, egy likeboxnál még keservesen be lehet jól sminkelni, de egy fb_commentnél már kizárt.
    • Valami jquery vudu, amivel az iframen belül lehet babrálni? Ezzel megint olyan gázt érzek, hogy az fb azért a szélesség paraméter alapján elég sok mindent kiszámol. Szóval ez valahogy a dokumentum betöltése előtt jöhet szóba, tehát nem kizárt.
    • Valami a facebook apiban?

Hozzászólások

Hey there! Quick question

Hey there! Quick question that's totally off
topic. Do you know how to make your site mobile friendly?

My weblog looks weird when browsing from my iphone4.
I'm trying to find a theme or plugin that might be able to
fix this issue. If you have any recommendations, please share.
Appreciate it!

I wish to express thanks to

I wish to express thanks to you for bailing me out of such a challenge. After surfing through the the web and obtaining suggestions that were not pleasant, I figured my entire life was well over. he factors that I fully don’t agree with you on don’t fit my common sense. http://khelomcx.com/

Hi to every body, it's my

Hi to every body, it's my first visit of this web site; this webpage carries awesome and
actually fine data in favor of visitors.

I want to to thank you for

I want to to thank you for this excellent read!! I certainly enjoyed every little bit of it.
I have got you book-marked to check out new stuff you post…

whoah this blog is

whoah this blog is magnificent i like studying your articles.

Keep up the great work! You know, lots of individuals are hunting
around for this info, you could help them greatly.

bookmarked!!, I like your web

bookmarked!!, I like your web site!

Wonderful site. Plenty of

Wonderful site. Plenty of useful info here. I am sending it to a few buddies ans also sharing in delicious.

And certainly, thank you in your effort!

Spot on with this write-up, I

Spot on with this write-up, I honestly believe this website
needs far more attention. I'll probably be back again to
read more, thanks for the info!

After I originally left a

After I originally left a comment I appear to have
clicked on the -Notify me when new comments are
added- checkbox and now whenever a comment is added I get 4 emails with
the exact same comment. Is there a means you are able to remove me from that service?
Cheers!

Your way of explaining

Your way of explaining everything in this paragraph is actually
fastidious, all be able to without difficulty be aware of it, Thanks a lot.

Incredible! This blog looks

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

Hey there would you mind

Hey there would you mind sharing which blog platform you're using?
I'm looking to start my own blog soon but I'm having a tough
time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your layout seems different then most blogs
and I'm looking for something unique. P.S My apologies
for being off-topic but I had to ask!

Hey There. I found your blog

Hey There. I found your blog using msn. This is an extremely well written article.
I'll be sure to bookmark it and return to read more of your useful
information. Thanks for the post. I will definitely return.

My brother suggested I would

My brother suggested I would possibly like this website.
He was entirely right. This post actually made my day.
You can not imagine just how a lot time I had spent for this
information! Thank you!

It is appropriate time to

It is appropriate time to make some plans for the longer term and it's
time to be happy. I have read this submit and if I could I want to counsel you few attention-grabbing things or suggestions.
Maybe you could write next articles regarding this article.
I want to learn even more things approximately it!

Every weekend i used to pay a

Every weekend i used to pay a visit this site, for the reason that i want enjoyment, since this
this website conations actually fastidious funny data
too.

Quality content is the

Quality content is the crucial to attract the visitors to visit the site, that's what this web page is providing.

I am curious to find out what

I am curious to find out what blog system you happen to be utilizing?
I'm experiencing some small security problems with my latest blog and I'd like to find something
more risk-free. Do you have any suggestions?

magnificent issues

magnificent issues altogether, you just won a new reader.

What could you recommend in regards to your put up that you simply made some days ago?

Any sure?

My spouse and I absolutely

My spouse and I absolutely love your blog and find the majority
of your post's to be exactly I'm looking for. Would you offer
guest writers to write content for you personally? I wouldn't mind composing a post or elaborating on a
few of the subjects you write in relation to here. Again, awesome web
site!

Hey there, You've done an

Hey there, You've done an excellent job. I'll certainly digg it and
personally recommend to my friends. I am sure they will be benefited from this web site.

What's up, its good article

What's up, its good article about media print, we all be aware of media is
a great source of data.

I was suggested this web site

I was suggested this web site through my cousin. I
am no longer certain whether this submit is written by him as
no one else recognise such precise approximately my difficulty.
You're amazing! Thank you!

We're a group of volunteers

We're a group of volunteers and opening a new scheme in our community.
Your web site provided us with valuable information to work on. You've done an impressive job and our whole community will be grateful to you.

Thanks for some other

Thanks for some other wonderful article. Where else may just anyone get that kind of information in such a perfect method of writing?
I have a presentation next week, and I am on the search for such info.

It's very easy to find out

It's very easy to find out any matter on web as compared to books, as I found this article at
this website.

Appreciate this post. Will

Appreciate this post. Will try it out.

Thanks very nice blog!

Thanks very nice blog!

hi!,I love your writing so

hi!,I love your writing so much! proportion we be in contact extra about your
article on AOL? I need an expert in this area to unravel my problem.
May be that's you! Looking ahead to see you.

Very nice post. I juyst

Very nice post. I juyst stumbled upon your weblog and wanted tto say
thawt I've truly ennoyed browsing your blog posts.
After all I'll be subscribing to your rss feed and I hope you write again soon!

My web site :: best sleep aid

This post is in fact a good

This post is in fact a good one it helps new net users,
who are wishing for blogging.

great issues altogether, you

great issues altogether, you just won a new reader.

What would you recommend in regards to your publish that you just made a few
days in the past? Any certain?

Pretty! Ƭhіs wass an

Pretty! Ƭhіs wass an incredibly wonderful article.
Тhank yօu for providing these details.

my homeрage - Cash for annuity

Today, I went to the beach

Today, I went to the beach 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!

Hi, after reading this

Hi, after reading this awesome piece of writing i am as well happy to share my experience here with colleagues.

Hi there, i read your blog

Hi there, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot
of spam responses? If so how do you protect against
it, any plugin or anything you can advise?
I get so much lately it's driving me insane so any support is
very much appreciated.

Hello! I could have sworn

Hello! I could have sworn I've been to this website
before but after browsing through some of the post I realized it's new to me.
Anyways, I'm definitely glad I found it and I'll be bookmarking and checking back frequently!
www.blogesaurus.com quest protein bars

I enjoy what you guys tend to

I enjoy what you guys tend to be up too. This kind of clever work and
exposure! Keep up the good works guys I've included you guys to my own blogroll.

This is my first time visit

This is my first time visit at here and i am in fact pleassant to read everthing at alone place.

Everything is very open with

Everything is very open with a really clear description of the challenges.
It was definitely informative. Your site is extremely helpful.
Thank you for sharing!

Here is my blog post; Alcohol Rehab Centers Cincinnati Ohio

That is a good tip especially

That is a good tip especially to those new to the blogosphere.

Short but very precise information… Thank you for sharing this one.
A must read article!

My blog post - heated battery socks

Nowadays, as the development

Nowadays, as the development of high technology, people like to use computer, they use computer to read the news, to play the game buy Yamaha Boat Motors and so on. Now more and more computer functions have been developed, people like to do business on the computer, it saves people a lot of time and it is very convenient for Yamaha Outboards Sale. Shopping online is most people’s choice today, but it has disadvantages. First, the products will be not in good quality, people can’t touch the Suzuki Outboards, they only can see the pictures, so they can’t figure out the real products’ quality. Second, when people pay the money online, they will have the chance to leak out their message, their online account will be attacked by the hackers and thus to lose the money. According to shopping Honda Marine online is more and more popular, we must take care of personal message when shopping online.

It is truly a nice and useful

It is truly a nice and useful piece of info.
I am glad that you shared this helpful information with us.
Please keep us up to date like this. Thanks for sharing.

There's certainly a great

There's certainly a great deal to learn about this issue.
I love all the points you made.

Hey I know this is off topic

Hey I know this is off topic but I was wondering
if you knew of any widgets I could add to my blog that automatically tweet
my newest twitter updates. I've been looking for a plug-in like this for quite some time and was hoping maybe
you would have some experience with something like this.
Please let me know if you run into anything. I truly enjoy reading your blog and I look
forward to your new updates.

My developer is trying to

My developer is trying to persuade me to move to .net from PHP.
I have always disliked the idea because of the expenses.
But he's tryiong none the less. I've been using Movable-type on numerous websites for about a year and am concerned
about switching to another platform. I have heard excellent things about blogengine.net.
Is there a way I can import all my wordpress posts into it?
Any help would be greatly appreciated!

Excellent blog here! Also

Excellent 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

After I initially left a

After I initially left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and now
every time a comment is added I get four emails with the same comment.
Perhaps there is an easy method you are able to remove me from that service?
Thanks!

Outstanding post however I

Outstanding post however I was wanting to know if
you could write a litte more on this subject? I'd be very
thankful if you could elaborate a little bit further. Kudos!

of course like your web-site

of course like your web-site but you need to test the spelling on several of your
posts. Several of them are rife with spelling issues and I in finding it very
bothersome to tell the reality then again I will definitely come again again.

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.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.