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

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.
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

In 1993, Maurizio pushed

In 1993, Maurizio pushed Gucci to the brink of bankruptcy because of frequent decision-making errors. In 1993, the shareholders of the company voted to evict him from the board of directors. Maurizio sold all his shares to Investcorp, thus announcing the end of the management and control of the company by the Gucci family.

Eight-point stitching

Eight-point stitching trousers, top with space pattern, hollow collar style, the whole match, fashionable temperament

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 from now on every time a comment is added I recieve four emails with the exact same comment. There has to be an easy method you are able to remove me from that service? Thanks!|

Hey very interesting blog!|

Hey very interesting blog!|

Wow, that's what I was

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

Tremendous things here. I'm

Tremendous things here. I'm very happy to peer your post. Thanks so much and I'm taking a look ahead to touch you. Will you kindly drop me a e-mail?|

I just could not go away your

I just could not go away your website before suggesting that I actually enjoyed the usual info a person supply on your visitors? Is gonna be back incessantly in order to check up on new posts|

Hmm it seems like your blog

Hmm it seems like your blog ate my first comment (it was super long) so I guess I'll just sum it up what I had written and say, I'm thoroughly enjoying your blog. I too am an aspiring blog blogger but I'm still new to the whole thing. Do you have any points for beginner blog writers? I'd definitely appreciate it.|

Greetings! This is my first

Greetings! This is my first comment here so I just wanted to give a quick shout out and tell you I genuinely enjoy reading through your articles. Can you recommend any other blogs/websites/forums that deal with the same subjects? Thank you so much!|

I visited multiple web sites

I visited multiple web sites however the audio quality for audio songs current at this web site is in fact marvelous.|

I'll immediately grab your

I'll immediately grab your rss as I can not to find your email subscription hyperlink or e-newsletter service. Do you've any? Kindly let me realize so that I could subscribe. Thanks.|

Thanks for finally writing

Thanks for finally writing about > %blog_title% < Liked it!|

It's nearly impossible to

It's nearly impossible to find educated people for this subject, but you sound like you know what you're talking about! Thanks|

Hello, I do think your blog

Hello, I do think your blog could possibly be having browser compatibility problems. Whenever I look at your blog in Safari, it looks fine however when opening in IE, it's got some overlapping issues. I simply wanted to give you a quick heads up! Other than that, wonderful blog!|

Hi there i am kavin, its my

Hi there i am kavin, its my first occasion to commenting anyplace, when i read this post i thought i could also create comment due to this brilliant piece of writing.|

fantastic put up, very

fantastic put up, very informative. I'm wondering why the other experts of this sector don't realize this. You should continue your writing. I'm sure, you have a huge readers' base already!|

My brother recommended I

My brother recommended I might like this website. He was entirely right. This post truly made my day. You cann't imagine just how much time I had spent for this info! Thanks!|

Hey just wanted to give you a

Hey just wanted to give you a quick heads up. The words in your post seem to be running off the screen in Internet explorer. I'm not sure if this is a formatting issue or something to do with browser compatibility but I figured I'd post to let you know. The design look great though! Hope you get the issue fixed soon. Thanks|

Thanks a bunch for sharing

Thanks a bunch for sharing this with all people you actually realize what you're talking approximately! Bookmarked. Please additionally discuss with my website =). We will have a hyperlink alternate agreement among us|

What a material of

What a material of un-ambiguity and preserveness of precious knowledge about unexpected emotions.|

I every time used to study

I every time used to study article in news papers but now as I am a user of internet therefore from now I am using net for articles, thanks to web.|

It's really a cool and

It's really a cool and helpful piece of info. I'm satisfied that you shared this useful info with us. Please keep us up to date like this. Thanks for sharing.|

I really like your blog..

I really like your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz respond as I'm looking to construct my own blog and would like to know where u got this from. kudos|

You need to take part in a

You need to take part in a contest for one of the finest blogs online. I will recommend this website!|

This website really has all

This website really has all the information I needed about this subject and didn't know who to ask. |

Aw, this was a very nice

Aw, this was a very nice post. Spending some time and actual effort to make a good article… but what can I say… I put things off a whole lot and never seem to get anything done.|

I am regular reader, how are

I am regular reader, how are you everybody? This paragraph posted at this site is truly nice.|

I know this web site presents

I know this web site presents quality dependent articles or reviews and other material, is there any other web site which presents these kinds of information in quality?|

Excellent write-up. I

Excellent write-up. I absolutely love this site. Thanks!|

hello there and thank you for

hello there and thank you for your info – I have certainly picked up anything new from right here. I did however expertise a few technical issues using this website, as I experienced to reload the website lots of times previous to I could get it to load correctly. I had been wondering if your web host is OK? Not that I am complaining, but slow loading instances times will sometimes affect your placement in google and could damage your high quality score if ads and marketing with Adwords. Well I am adding this RSS to my e-mail and can look out for a lot more of your respective fascinating content. Ensure that you update this again soon.|

I'm curious to find out what

I'm curious to find out what blog platform you happen to be using? I'm experiencing some small security issues with my latest website and I'd like to find something more safe. Do you have any suggestions?|

If you would like to increase

If you would like to increase your know-how only keep visiting this web site and be updated with the hottest information posted here.|

Hi there, all the time i used

Hi there, all the time i used to check web site posts here in the early hours in the morning, because i like to gain knowledge of more and more.|

I pay a visit every day a few

I pay a visit every day a few web sites and websites to read articles, but this website presents quality based writing.|

Fine way of explaining, and

Fine way of explaining, and fastidious article to obtain information on the topic of my presentation focus, which i am going to present in academy.|

Awesome! Its really

Awesome! Its really remarkable article, I have got much clear idea about from this post.|

Hi there are using Wordpress

Hi there are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started and create my own. Do you require any coding knowledge to make your own blog? Any help would be really appreciated!|

This paragraph will help the

This paragraph will help the internet visitors for building up
new blog or even a weblog from start to end.

Your mode of describing the

Your mode of describing the whole thing in this paragraph is genuinely fastidious, all can easily be aware of it, Thanks a lot.|

Hi there are using Wordpress

Hi there are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started and create my own. Do you need any coding expertise to make your own blog? Any help would be really appreciated!|

Hello colleagues, fastidious

Hello colleagues, fastidious piece of writing and good urging commented at this place, I am actually enjoying by these.|

This design is incredible!

This design is incredible! You most certainly know how to keep a reader entertained.
Between your wit and your videos, I was almost moved to start
my own blog (well, almost...HaHa!) Excellent job.
I really loved what you had to say, and more than that, how you presented it.
Too cool!
Jay's Santa Clarita Tree Removal Kings
26174 Las Lanas Ct, Santa Clarita, CA 91355
661-464-1270
laureljefferson09875 [at] gmail [dot] com

Hello there I am so excited I

Hello there I am so excited I found your web site, I really found you by error, while I was browsing on Yahoo for something else, Anyhow I am here now and would just like to say thank you for a fantastic post and a all round entertaining blog (I also love the theme/design), I don’t have time to go through it all at the moment but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the great b.|

I'm now not positive the

I'm now not positive the place you are getting your info, however good topic.
I must spend some time studying much more or figuring out more.
Thank you for fantastic info I was looking
for this information for my mission.

Heya i'm for the first time

Heya i'm for the first time here. I came across this board and I find It really useful & it helped me out a lot. I hope to provide one thing again and help others such as you helped me.|

I truly love your website..

I truly love your website.. Excellent colors & theme. Did you build this website yourself? Please reply back as I'm hoping to create my own personal website and would love to know where you got this from or exactly what the theme is called. Thanks!|

What's up it's me, I am also

What's up it's me, I am also visiting this web site regularly, this website is genuinely nice and the people are really sharing pleasant thoughts.

Thank you for the good

Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to far added agreeable from you! However,
how can we communicate?
Jay's Santa Clarita Tree Removal Kings
26174 Las Lanas Ct, Santa Clarita, CA 91355
661-464-1270
laureljefferson09875 [at] gmail [dot] com

You ought to be a part of a

You ought to be a part of a contest for one of the most useful websites online. I most certainly will recommend this site!|

I visited many web sites

I visited many web sites however the audio quality for audio songs existing at this web site is truly marvelous.|

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.